When I tried to integrate continuous integration using Xcode server in my Xcode9. I can successfully create the BOT and I tried to integrate then I always got the error like “Assertion: exportArchive: "Test.app" requires a provisioning profile.”
How can solve this issue?
I was experiencing the same problem and got it fixed following below steps.
Though you get the error "exportArchive: requires a provisioning profile", successfully creates Archive but fails to create IPA.
Assuming the issue is faced creating Distribution IPA, Xcode 9 has introduced continuous integration for Distribution IPA's which is great.
As part of that, Xcode Bot CI requires ExportOptions.plist for generating Distribution IPA's.
Create ExportOptions.plist
One way to get ExportOptions.plist file (Refer the below link for direct Apple's steps), Try manually creating a Distribution IPA once, with valid Distribution certificates and Profiles which will create an IPA with "ExportOptions.plist" file along with IPA.
Configure changes in Bot
Go back to Bot integration and edit the configuration section of your created bot. Choose
Use Custom Export Options Plist
from Export Options dropdown (Refer attached screen shot) and refer to the created "ExportOptions.plist" file. Now Integrating will create both Archive and IPA with no error.
Refer Apple's Xcode 9 + Xcode Bot documentation for Xcode 9 + Xcode Bot changes
来源:https://stackoverflow.com/questions/46723773/assertion-exportarchive-test-app-requires-a-provisioning-profile