I'm still a bit of a newbie on iOS / Xcode.
The readme for this demo (Swift version) told me to set my bundle identifier, so I did. I've installed the pod.
I cannot get the demo to build. Here's the show-stopping error:
error: Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.
Embedded Binary Bundle Identifier: com.onesignal.example.OneSignalNotificationServiceExtension
Parent App Bundle Identifier: com.WhiteStonePublishing.PushTest
Hi @DougJoseph
If you followed the iOS SDK Setup guide you go into your project settings, you will see two targets, your app and the OneSignalNotificationServiceExtension
If you look at your app's bundle ID, it will be something like com.myapp.test
You need to go into the OneSignalNotificationServiceExtension target and change it so that the _beginning_ of the extension service' bundle ID matches the main app.
So for example, if your main app bundle ID is com.myapp.test, your notification service bundle ID should be com.myapp.test.OneSignalNotificationServiceExtension
Please feel free to ask if you have any other problems or questions!
I don’t know how to do that but I will look for it. Thank you!
Sincerely,
Pastor Doug Joseph
Sent from my iPhone
On Jan 5, 2018, at 2:25 PM, Brad Hesse notifications@github.com wrote:
Hi @DougJoseph
If you followed the iOS SDK Setup guide you go into your project settings, you will see two targets, your app and the OneSignalNotificationServiceExtension
If you look at your app's bundle ID, it will be something like com.myapp.test
You need to go into the OneSignalNotificationServiceExtension target and change it so that the beginning of the extension service' bundle ID matches the main app.
So for example, if your main app bundle ID is com.myapp.test, your notification service bundle ID should be com.myapp.test.OneSignalNotificationServiceExtension
Please feel free to ask if you have any other problems or questions!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
@DougJoseph
Here is a screenshot that should help explain what I am saying. When you go to the Project Settings (pictured), you will see the Bundle Identifier for both your app and the OneSignalNotificationServiceExtension.
You need to make sure that your OneSignalNotificationServiceExtension's bundle ID is the same as your app's, but with .OneSignalNotificationServiceExtension added to the end.


I hope that clears things up. If not, please go to this URL and click the Chat button at the bottom right and our support would be happy to assist.
Awesome. Thank you!
Sincerely,
Pastor Doug Joseph
Sent from my iPhone
On Jan 5, 2018, at 5:25 PM, Brad Hesse notifications@github.com wrote:
@DougJoseph
Here is a screenshot that should help explain what I am saying. When you go to the Project Settings (pictured), you will see the Bundle Identifier for both your app and the OneSignalNotificationServiceExtension.
You need to make sure that your OneSignalNotificationServiceExtension's bundle ID is the same as your app's, but with .OneSignalNotificationServiceExtension added to the end.
I hope that clears things up. If not, please go to this URL and click the Chat button at the bottom right and our support would be happy to assist.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Thank you again. That worked of course. Awesome stuff. I got the example to build and run, and I am using what I learned there, and some of the code, in my project.
One function that's really needful in the SDK would be: "appendTags"
if userTag "user_privileges" already contains "group1" and I do appendTags(["user_privileges" : "group2"]) then "user_privileges" would then show as "user_privileges, group1, group2"
If this were in the SDK it would totally solve a huge issue I'm facing in my code.
Thank you for all you do. Your wonderful service is deeply appreciated.
-Doug Joseph
On Jan 5, 2018, at 5:25 PM, Brad Hesse notifications@github.com wrote:
@DougJoseph https://github.com/dougjoseph
Here is a screenshot that should help explain what I am saying. When you go to the Project Settings (pictured), you will see the Bundle Identifier for both your app and the OneSignalNotificationServiceExtension.You need to make sure that your OneSignalNotificationServiceExtension's bundle ID is the same as your app's, but with .OneSignalNotificationServiceExtension added to the end.
https://camo.githubusercontent.com/abb42024160e4d39489aa0ea9cff2fa060cee638/687474703a2f2f7777772e68657373652e696f2f6578706c61696e312e706e67
https://camo.githubusercontent.com/c5cf34c7d872236a46d6cd77ebce025412ca4499/687474703a2f2f7777772e68657373652e696f2f6578706c61696e322e706e67
I hope that clears things up. If not, please go to this URL https://documentation.onesignal.com/v3.0/docs/troubleshooting and click the Chat button at the bottom right and our support would be happy to assist.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/OneSignal/OneSignal-iOS-SDK/issues/324#issuecomment-355682335, or mute the thread https://github.com/notifications/unsubscribe-auth/AIghNYAn-4dDkIGBmoL2IGBrc0M60c0bks5tHqFrgaJpZM4RULJa.
Hello again.
Similarly, the opposite of appendTags() would be a helpful function as well: deleteFromTags()
In case of this preexisting userTag: "user_privileges, group1, group2"
... then calling deleteFromTags(["user_privileges" : "group2"])
... would then have "user_privileges" showing as "user_privileges, group1"
On Jan 7, 2018, at 10:55 PM, Doug Joseph pastor@cac.us.com wrote:
Thank you again. That worked of course. Awesome stuff. I got the example to build and run, and I am using what I learned there, and some of the code, in my project.
One function that's really needful in the SDK would be: "appendTags()"
if userTag "user_privileges" already contains "group1" and I do appendTags(["user_privileges" : "group2"]) then "user_privileges" would then show as "user_privileges, group1, group2"
If this were in the SDK it would totally solve a huge issue I'm facing in my code.
Thank you for all you do. Your wonderful service is deeply appreciated.
-Doug Joseph
On Jan 5, 2018, at 5:25 PM, Brad Hesse <[email protected] notifications@github.com> wrote:
@DougJoseph https://github.com/dougjoseph
Here is a screenshot that should help explain what I am saying. When you go to the Project Settings (pictured), you will see the Bundle Identifier for both your app and the OneSignalNotificationServiceExtension.You need to make sure that your OneSignalNotificationServiceExtension's bundle ID is the same as your app's, but with .OneSignalNotificationServiceExtension added to the end.
https://camo.githubusercontent.com/abb42024160e4d39489aa0ea9cff2fa060cee638/687474703a2f2f7777772e68657373652e696f2f6578706c61696e312e706e67
https://camo.githubusercontent.com/c5cf34c7d872236a46d6cd77ebce025412ca4499/687474703a2f2f7777772e68657373652e696f2f6578706c61696e322e706e67
I hope that clears things up. If not, please go to this URL https://documentation.onesignal.com/v3.0/docs/troubleshooting and click the Chat button at the bottom right and our support would be happy to assist.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/OneSignal/OneSignal-iOS-SDK/issues/324#issuecomment-355682335, or mute the thread https://github.com/notifications/unsubscribe-auth/AIghNYAn-4dDkIGBmoL2IGBrc0M60c0bks5tHqFrgaJpZM4RULJa.
Hey @DougJoseph
The OneSignal Tags feature isn't meant to be used to send arrays, just key/value pairs.
You want "user_privileges" to be an array, which isn't possible with the current SDK.
The problem is that when you set "user_privileges" to be an array of group strings, when you call 'getTags' it will simply return you a string looking like "['group1', 'group2']"
What I would recommend instead is doing something like OneSignal.sendTags(["isInGroup1" : true])
You could also do bitwise operations to store it all in a single Integer but that's a bit advanced for a beginner programmer. Good luck and feel free to ask if you have any other problems.
Thanks. The workaround you suggested is how I was already doing it. That approach positions data in the key instead of the value but I think we will be ok on that. I have an array of user privileges that’s currently 10 items long and one person can be in as few as 0 and as many as all 10 (same person in all the groups) — and the list could grow in the future.
Sincerely,
Pastor Doug Joseph
Sent from my iPhone
On Jan 8, 2018, at 3:04 PM, Brad Hesse notifications@github.com wrote:
Hey @DougJoseph
The OneSignal Tags feature isn't meant to be used to send arrays, just key/value pairs.
You want "user_privileges" to be an array, which isn't possible with the current SDK.
The problem is that when you set "user_privileges" to be an array of group strings, when you call 'getTags' it will simply return you a string looking like "['group1', 'group2']"
What I would recommend instead is doing something like OneSignal.sendTags(["isInGroup1" : true])
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
hi
I have two errors in building the application in xcode9 - OneSignal notifications
1- error (used a similar IDD for both purposes but I have a error)
error: Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.Embedded Binary Bundle Identifier: com.iplus85firebase.store.OneSignalNotificationServiceExtensionParent App Bundle Identifier: com.iplus85onesignal.store
2-ERROR
No such module 'OneSignal' IN (AppDelegate.swift +NotificationService.swift)
@Nightsd01 How to handle the case with multiple targets with different bundle identifiers?
I have ten targets as of now but there will be more - how to handle that case?
@mortenholmgaard In case you or anyone else in the future is having issues with that, I ended up defining a user variable in both targets that change based on the configuration (debug, release, staging, etc) and I use that to generate the bundle identifier like:
com.app.${BUNDLE_SUFFIX}
com.app.${BUNDLE_SUFFIX}.OneSignalNotificationServiceExtension
Bundle_Suffix changes depending on each configuration and schemes.
Thanks - good idea. The only problem with this is that OneSignalNotificationServiceExtension should have the same version number as the Target and with targets with differnet version numbers you have to have a OneSignalNotificationServiceExtension target for each target.
this doesn't really work in my case.
Parent App Bundle Identifier is as such: Com.myApp.test1234
and my Embedded Binary Bundle Identifier: Com.myApp.test1234.OneSignalNotificationServiceExtension
still getting this error
error: Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.
@PhyllisWong that would be an Xcode issue. But I’ve never seen someone use an uppercase Com in their bundle identifier, maybe it’s related...? In any case that’s far outside the scope of the OneSignal SDK
@sfratini can you plz share a screenshot of your solution, TBH I am not able to implement this, but I got your point. Thanks
@sfratini what will be the value of the {BUNDLE_SUFFIX} in second target(aka extension target)?
@sfratini thats not a working solution, I have tried that.. coz BUNDLE_SUFFIX needs to be dynamic in com.app.${BUNDLE_SUFFIX}.OneSignalNotificationServiceExtension.. and according to your solution we will have to hardcode it..
@mortenholmgaard I just got this from Apple, and then I understood your point
WARNING ITMS-90473: "CFBundleShortVersionString Mismatch. The CFBundleShortVersionString value '1.0' of extension 'ABC.app/PlugIns/OneSignalNotificationServiceExtension.appex' does not match the CFBundleShortVersionString value '8' of its containing iOS application 'ABC.app'."
@SaadIEng This error is just that you need to have same version number in the main target and the extension target belonging to it.
${BUNDLE_SUFFIX}
I'm trying to do that, but xCode (12.4) keeps changing "${BUNDLE_SUFFIX}" by "--BUNDLE-SUFFIX--".
Have you had this issue before?
Thank you.
Most helpful comment
@DougJoseph
Here is a screenshot that should help explain what I am saying. When you go to the Project Settings (pictured), you will see the Bundle Identifier for both your app and the OneSignalNotificationServiceExtension.
You need to make sure that your OneSignalNotificationServiceExtension's bundle ID is the same as your app's, but with .OneSignalNotificationServiceExtension added to the end.
I hope that clears things up. If not, please go to this URL and click the Chat button at the bottom right and our support would be happy to assist.