Reputation: 1532
I am working on an iOS app which integrates push notifications using OneSignal. I've followed the iOS SDK setup guide and everything did work out fine but since I did the latest xcode update and macos updates I can't build the app for release or just on a physical device.
I get the following error about code signing the OneSignal extension:
FYI: The main target's bundle identifier is com.example.ios.app
CodeSign /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex
cd /Users/pathToProject
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: Me (##########)"
Provisioning Profile: "iOS Team Provisioning Profile: com.example.ios.app.OneSignalNotificationServiceExtension"
(######-####-####-####-######)
/usr/bin/codesign --force --sign E7160941E1D4E45D870F30CB31F3EC30BFB0ABBA --entitlements /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/myApp.build/Release-iphoneos/OneSignalNotificationServiceExtension.build/OneSignalNotificationServiceExtension.appex.xcent --timestamp=none /Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex
/Users/myUser/Library/Developer/Xcode/DerivedData/myApp-detsaukwwypeutcadzxgviircfje/Build/Intermediates.noindex/ArchiveIntermediates/myApp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/OneSignalNotificationServiceExtension.appex: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1
I've done some research but haven't found anything that was of any help.
Upvotes: 2
Views: 7749
Reputation: 668
You need to change the OneSignalNotificationServiceExtension
Bundle Identifier to be {your app's bundle ID}.OneSignalNotificationServiceExtension.
Unless your actual app's Bundle ID is com.example.ios.app
, the bundle ID com.example.ios.app.OneSignalNotificationServiceExtension
will not work.
Once you change the Bundle ID, you can enable Automatic provisioning and it should work.
Upvotes: 5