to automate my app build process, I am trying to build my iOS app via command line
Build command
xcodebuild archive -project sample.xcodeproj -scheme "sample" -archivePath $PWD/archive/sample.xcarchive -destination generic/platform=iOS -UseModernBuildSystem=NO
Export Command
xcodebuild -exportArchive -archivePath $PWD/archive/sample.xcarchive -exportOptionsPlist ./ExportOptions.plist -exportPath $PWD/build -UseModernBuildSystem=NO
Following is the error
Error Domain=IDEProvisioningErrorDomain Code=9 ""sample.app" requires a provisioning profile." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="sample.app" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}
Please note that the archive from Xcode works fine.
And the Info.plist file from archive folder archive/sample.xcarchive/Info.plist
does not contain provisioning profiles dictionary.
As per other suggestions on google and StackOverflow, I have tried the following
- Changed build settings to Legacy build
- Removed Provisioning profiles folder from ~/Library/MobileDevice
- Upgraded Xcode to latest (currently 11.4)
- created a softling of ~/Library/MobileDevice in /Library/MobileDevice
- Recreated provisioning profile in developer account.
Could anyone help me get over this issue?