EDITED 19 June 2017
The approach below doesn't work anymore. What worked now was to change step 5 below to:
- Create a separate app id and provisioning profile for the sticker extension. For the app id, use the wildcard version (e.g. com.domain.appName.*). Then use this app id for the new distribution profile. The certificate used must be the same for both profiles.
Ok it took me 10 attempts but I worked it out. The problem is that there are multiple settings in multiple spots. I couldn't get automatic signing to work so went the manual route. In the end this is the combination that worked for me:
- Show the Project Navigator and click on the top level which will be your app/sticker pack name.
- In the 2nd column of Xcode under PROJECT, click on your app name and then Build Settings (3rd column) and under Code Signing Identity make sure that they are all iOS Developer.
- In the 2nd column of Xcode under TARGETS, click on your app name and then under General (3rd column):
- Signing: uncheck Automatically manage signing.
- Signing (Debug): Select the distribution profile that you set up via your developer account. This will have a bundle identifier like com.domain.AppName.
- Signing (Release): Same as for Debug.
- Now click on Build Settings in the 3rd column and scroll down to Code Signing Identity. For Debug and Release select iOS Developer, for Any iOS SDK select iOS Distribution. Make sure you also select your Development Team here. I also stuck in the Provisioning Profile that I used in step 3.
- This is the trick! Click on StickerPackExtension in the 2nd column. Under General in the 3rd column, note that it has a different bundle identifier to the main "app". It will be something like com.domain.AppName.StickerPackExtension.
- Signing: uncheck Automatically manage signing.
- Signing (Debug): Select XC iOS:*
- Signing (Release): Same as for Debug.
- Click on Build Settings and scroll down to Code Signing Identity (again!). This time for Debug and Release select iPhone Distribution:YourTeamName and for Any iOS SDK select iPhone Distribution. For Provisioning Profile select XC iOS: *
I think the issue is due to the "app" and the StickerPackExtension having different Bundle Identifiers, this means they need different provisioning profiles.