Wrap an app with a share extension: A specified extension provisioning profile was not valid
Closed this issue · 9 comments
Describe the bug:
Hi team, I create an app with an extension. I face an issue when I wrapped my app using wrap tool (15. and 14.0.0):
"A specified extension provisioning profile was not valid.
Cause of the error to be provided for investigation:Error Domain=IntuneAppPackager Code=22 "A specified extension provisioning profile was not valid." UserInfo={NSLocalizedDescription=A specified extension provisioning profile was not valid.}"
If I exclude the Share Extension, the wrap worked well.
Here is my command line:
/Volumes/IntuneMAMAppPackager/IntuneMAMPackager/Contents/MacOS/IntuneMAMPackager -i ~/Documents/LAB/Intune/AppExtensionEnterprise.ipa -o ~/Documents/LAB/Intune/Output/AppExtensionEnterprise_wrapped.ipa -p /Documents/LAB/Intune/Distribution.mobileprovision -c "xxxxxxxx" -v true -e -h -x "<array><string>/Documents/LAB/Intune/ShareDistribution.mobileprovision</string></array>"
My environment:
Version of MACOSX is 12.0.1
Version of XCode installed is Xcode 13.0
Build version 13A233
Did anyone face the same issue?
Please help
Thanks,
Hi @minhadd. This error can occur if the bundle id in the share extension provisioning profile does not match the bundle id of the share extension. Can you check if these match? You can open the provisioning profile in a text editor and search for 'application-identifier'. Note, if the main provisioning profile specified by the -p argument is a wildcard provisioning profile, then specifying the extension profiles via the -x argument is not required. This is likely why packaging is succeeding.
I also noticed that some of the paths in your command line are missing a '~' before the '/Documents', but I think was just a typo in your message since the packager error should have been different if the path could not be found.
Thanks,
Neil
Hi @neiljac1
I tried to check my Bundle ID on Xcode and Provisioning Profile on my extension provisioning profile (many times). I confirm these matched.
Also, I tested my app in Simulator and Physical device. It worked with share extension well.
My app is a Enterprise version (In-House). I am using explicit IDs:
- Contain app: com.company.app
- Extension app: com.company.app.extension
Here is my provisioning profile for extension:
Could you have any idea on this case?
Thanks,
Hi @minhadd.
- Can you confirm your application only has a single share extension and no other extensions or Watch apps?
- Are you able to build in Xcode using the provisioning profiles used during wrapping and run on a device?
- If 'yes' to 2, can you try opening up the .app and extracting the 'embedded.mobileprovision' file from the root of the application directory as well as the 'embedded.mobileprovision' from the Plugins/YOUR_SHARE_EXTENSION.appex directory, and pass those provisioning profiles into the packager?
Thanks,
Neil
Hi @neiljac1 ,
- I confirm my app has a single share extension.
- Yes I can
- I got 2 provisioning profiles from app and extension. I passed these profiles to the packager. But I got the same result.
Also, I tried to test:
- Create a new app with a single extension => same issue
- Create 2 new provisioning profiles (App + Extension) => same issue
- I changed to a new MacBook: used a new Apple Developer account to create 2 new provisioning profiles (App + Ex). Then, I created a new app => same issue
Could you have any idea on this case?
Thanks,
Minh
Hi @minhadd. The Intune packager must be failing to parse your provisioning profiles. Would you be willing to share your provisioning profiles? You could either email them to me directly (neiljac@microsoft.com) or you could create a support ticket via Endpoint Manager (https://endpoint.microsoft.com) by going to "Troubleshooting + support" -> "Help and support" -> "Intune".
Thanks,
Neil
Hi @neiljac1 ,
I sent the provisioning profile to neiljac@microsoft.com. Please help to check.
Thanks,
Minh
Hi @minhadd. Thank you for sending the provisioning profiles and sample application. The issue turned out to be unrelated to the profiles. The packager is not handling tilde paths correctly within the -x argument array. As a work around, please change the tilde path from ~/Documents to an absolute path. We'll fix this in the packager in a future release. Thank you for bringing this issue to our attention.
-Neil
Hi @neiljac1,
It worked well. Thank you very much for your supporting.
Thanks,
Minh
Glad it work.
-Neil