Today I updated my Xcode to the version 9.3 (9E145). After that I created an archive and now I am trying to export it for development. However I see Xcode stuck on the following step:
Is it a bug of Xcode 9.3? How can I solve it?
Xcode seems to be recompiling the bitcode while showing this message and it can, therefore, take a very long time to "embed the provisioning profile". If you wait patiently for a very long time, depending on the size of your codebase (including dependencies from Carthage or Cocoapods), it will eventually continue.
@AllanWeir's answer explicitly disables the bitcode compilation by recommending to do so in the plist file, so the time improvement seems to have been an inadvertent side effect. "Fixing" this does NOT require using the command line to export.
I think previous Xcode versions gave more helpful statuses during bitcode re-compilation.
You can disable the bitcode compilation during Xcode export via the UI and it will no longer get "stuck".
Xcode Version 9.3.1 (9E501)
As for me, I needed to wait some time (around 3-5 minutes) to finally recompile bitcode. Looks like you have to wait some time to get it done.
This issue is happening for me on Xcode 9.3 too and it looks like using xcodebuild from the terminal works as expected.
You can export an archive by running (replacing the archive path)
xcodebuild -exportArchive -archivePath "YOUR_XCODE_ARCHIVE_FOLDER/YOUR_ARCHIVE.xcarchive" -exportPath "output/" -exportOptionsPlist "ExportOptions.plist"
You'll need to set up an ExportOptions.plist file with a minimum of:
More info on Export Options is available here EXPORT .XCARCHIVE TO .IPA USING XCODEBUILD...
My ExportOptions.plist looks like (replace the bundle ID, provisioning profile, team ID and possibly the signingCertificate value):
<?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>compileBitcode</key>
<false/>
<key>method</key>
<string>enterprise</string>
<key>provisioningProfiles</key>
<dict>
<key>COM.YOUR-BUNDLE-ID</key>
<string>YOUR PROVISIONING PROFILE NAME</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>teamID</key>
<string>YOUR TEAM ID</string>
</dict>
</plist>
I am on xcode 9.4
. My codebase is considerably big too.
Mine took about 20 minutes to export. But Just like @Allen Humphreys mentioned, if the "Rebuild from Bitcode" is unchecked in the options, it exports quickly(for me in just a minute or two).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With