Im using xcodebuild to archive and export the archive for a flutter application for ipa generation in azure devops.
Used the following code for archive
Created a plist for export options
Used the following code for export archive to ipa
I get the error of
The same app builds correctly with the above provisioning profile while building in Xcode.
Can anyone suggest where I went wrong?
Used the following code for archive
Code Block xcodebuild -workspace Runner.xcworkspace -scheme Runner -sdk iphoneos -configuration Release archive -archivePath $PWD/build/Runner.xcarchive CODE_SIGN_STYLE=Manual
Created a plist for export options
Code Block xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>uploadBitcode</key> <false/> <key>compileBitcode</key> <false/> <key>uploadSymbols</key> <false/> <key>provisioningProfiles</key> <dict> <key>com.companyn.appname</key> <string>ComapnyAdHocProfile</string> </dict> <key>signingCertificate</key> <string>iOS Distribution</string> <key>signingStyle</key> <string>manual</string> <key>method</key> <string>ad-hoc</string> </dict> </plist>
Used the following code for export archive to ipa
Code Block xcodebuild -exportArchive -archivePath $PWD/build/Runner.xcarchive -exportOptionsPlist export.plist -exportPath $PWD/build/Runner.ipa
I get the error of
Code Block Error Domain=IDEProvisioningErrorDomain Code=9 ""Runner.app" requires a provisioning profile." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="Runner.app" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}
The same app builds correctly with the above provisioning profile while building in Xcode.
Can anyone suggest where I went wrong?