Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode9 iOS export archive fails on correct format

I have an iOS app that is building on both xcode8 (Sierra) and on xcode9 (High Sierra).

When I'm doing exportArchive it passes on xcode8 but fails on xcode9.

I have the provisioningProfiles section in my plist, and the failure in on correct format.

<?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>method</key>
    <string>enterprise</string>
    <key>teamID</key>
    <string><Our teamID></string>
    <key>signingStyle</key>
    <string>manual</string>
    <key>signingCertificate</key>
    <string><Our signingCertificate></string>
    <key>provisioningProfiles</key>
    <dict>
        <key><Our bundleID></key>
        <string><App Name></string>
    </dict>
</dict>
</plist>

I have another app that I'm building and everything is fine. Both xcode8 and xcode9. All the IDs are correct.

This the error that I'm getting:

2018-04-11 02:16:07.014 xcodebuild[25609:10463244] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7fe89376c690>: Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value., NSFilePath=/var/folders/y0/5_70v74n4830lyzmjs08pm4w0000gn/T/ipatool-json-filepath-KoS1w8}
[09:16:07][iOS: Build release version] ** EXPORT FAILED **
[09:16:07][iOS: Build release version] error: exportArchive: The data couldn’t be read because it isn’t in the correct format.
[09:16:07][iOS: Build release version] 
[09:16:07][iOS: Build release version] 
[09:16:07][iOS: Build release version] Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={NSDebugDescription=No value., NSFilePath=/var/folders/y0/5_70v74n4830lyzmjs08pm4w0000gn/T/ipatool-json-filepath-KoS1w8}

Thanks.

like image 998
yershalom Avatar asked Apr 11 '18 11:04

yershalom


People also ask

How do I archive my iOS project?

Start your archiveNavigate to your project's settings. Under iOS (or the target you want to build your app for) > Identity, you'll want to increment the Build number. For example, if the Build number was 1, you'll want to set it to 2. Then, in the top menu, under Product, click on Archive.

How do I distribute an archive in Xcode?

In the Archives organizer, select the archive, then click Distribute App. In the next sheet, select a distribution method based on your app's platform. To distribute to a limited number of users on registered devices only—for example, distribute within your organization—choose Ad Hoc or Development.

What is iOS archive?

An . ipa file is an iOS and iPadOS application archive file which stores an iOS/iPadOS app. Each . ipa file includes a binary and can only be installed on an iOS, iPadOS, or ARM-based macOS device.

How do I archive in Xcode 13?

Archive your App In Xcode with your project open, select the simulator (button near the top of the window next to your project name, typically named as a specific type of iPhone) – change it to Generic iOS Device. Open the Product menu and choose Archive. You will see the archive information. Click Validate App.


2 Answers

In my case was an issue with rvm I fixed it following the instructions on this blog entry:

https://egeek.me/2018/04/14/ipa-export-error-in-xcode-and-ruby/

like image 109
Irvin Chan Avatar answered Oct 13 '22 00:10

Irvin Chan


I was facing the similar error, You can try to append following key-pair. This had fixed my error.

<key>compileBitcode</key>
<false/>
like image 27
Pratik Patel Avatar answered Oct 13 '22 01:10

Pratik Patel