Skip to content

[Bug]: iOS Bundle identifier, App Group mismatch #545

@yusufkildan

Description

@yusufkildan

What happened?

If the previous post-process scripts change the bundle identifier, OneSignal's BuildPostProcessor script uses the wrong bundle identifier and it is causing CI build errors.

Steps to reproduce?

1. Create post-process script with 0 callback order.
2. Change PlayerSettings.applicationIdentifier with script.
3. Run OneSignal's BuildPostProcessor script.

_appGroupName field of com.onesignal.unity.ios/Editor/BuildPostProcessor.cs uses old bundle identifier.

What did you expect to happen?

Solution suggestion:
private readonly string _appGroupName = $"group.{PlayerSettings.applicationIdentifier}.onesignal";
can be updated as property instead of field:
private string _appGroupName => $"group.{PlayerSettings.applicationIdentifier}.onesignal";

Unity version

2020.3.35.f1

OneSignal Unity SDK version

3.0.4

Platform

iOS

Relevant log output

❌  error: Provisioning profile "Bitrise iOS development - (com.x.x.dev.OneSignalNotificationServiceExtension)" doesn't support the group.com.x.x.onesignal App Group. (in target 'OneSignalNotificationServiceExtension' from project 'Unity-iPhone')
❌  error: Provisioning profile "Bitrise iOS development - (com.x.x.dev.OneSignalNotificationServiceExtension)" doesn't match the entitlements file's value for the com.apple.security.application-groups entitlement. (in target 'OneSignalNotificationServiceExtension' from project 'Unity-iPhone')

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions