Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Signing multiple targets in xcodebuild command line
Started by afedulov Aug 13 2019 10:02 AM

1 reply to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 1 posts
  • Corona SDK

Hi. I've integrated onesignal into our unity application for ios. Unity version is 2019.1.9f1. Onesignal version is 2.8.0

We are trying to automate our build pipeline, so we are trying to build and export .ipa file with help of command line.

Xcode project, which created by unity, contains two build targets: our application target and Onesignal extension target. Each must be signed with its own provisioning profile. How to sing it in command line?

There is no way to pass to xcodebuild command two or more provisioning profiles per each build target, the same it's impossible to set multiple profiles in .xcconfig file, and it's impossible to set multiple .xcconfig files.


I tried next:

xcodebuild -project Unity-iPhone.xcodeproj -target OneSignalNotificationServiceExtension -xcconfig OnesignalConfig.xcconfig
xcodebuild -project Unity-iPhone.xcodeproj -target UnityiPhone -xcconfig UnityiPhoneConfig.xcconfig

OnesignalConfig - contains bundle id, sign identity and provisioning profile for one signal, and UnityiPhoneConfig config contains for our application. 

One signal build is completed successfully, and UnityiPhone build fails by error:

Provisioning profile "net.custom.custom AdHoc Distribution" has app ID "net.custom.custom", which does not match the bundle ID "net.custom.custom.OneSignalNotificationService". (in target 'OneSignalNotificationServiceExtension')

If I set automatic signing in xcode ui, or set all provisioning profiles in xcode ui - everything works great, but thing is that our build machine generate new xcode project with every build, and this is not an options to manually open xcode and set some preferences.

[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,697 posts
  • Enterprise

Hello @afedulov and welcome to the Corona Labs community forums. Our forums are exclusively to help people using Corona to build mobile apps and games. Unity is a competitor and this is not an appropriate place to ask Unity questions. Please use the Unity forums or ask OneSignal support.