Cordova Phonegap "Export Failed" error code 70 While building ios
Asked Answered
B

2

18

I am currently using Cordova Phonegap to build an application for iOS. It was working fine, but now I'm getting an error when I'm running cordova build ios in the terminal.

I'm getting the following error:

** EXPORT FAILED **

Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,RoastBot.xcarchive,-exportOptionsPlist,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/exportOptions.plist,-exportPath,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/build/device

Any help is appreciated!

Bollix answered 1/1, 2017 at 1:39 Comment(2)
Did you ever figure this out? I'm having the same issues...Sorrento
I am having the same issueEntomb
L
5

This is caused by Xcode 9 expecting certain values in exportOptions.plist located in the path that is displayed in the error message. In your case it is ,/Users/JarrodMorgan/Desktop/RoastBot/platforms/ios/exportOptions.plist.

Here is how exportOptions.plist looks for me:

<?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>development</string>
    <key>teamID</key>
    <string>TEAM_ID_GOES_HERE</string>
    <key>provisioningProfiles</key>
    <dict>
      <key>YOUR_BUNDLE_ID</key>
      <string>PROVISIONIG_PROFILE_UUID_WOULD_BE_HERE</string>
    </dict>
    <key>signingStyle</key>
    <string>manual</string>
    <key>signingCertificate</key>
    <string>iPhone Developer</string>
  </dict>
</plist>

Double check that you have provisioningProfiles and signingStyle values in your exportOptions.plist if you don't then you probably have cordova-ios version prior to 4.5.2. This was fixed and released in cordova-ios 4.5.2 please see this PR

In order for your to resolve this error update your cordova-ios to 4.5.2 or later, drop your plugins and platforms and re-add them.

However in my case after upgrading to cordova-ios 4.5.4 I started to see following error:

ld: 270 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It turns out that that was caused by the fact that cordova built cordova-plugin-console into its core and if you have that plugin in your project than you might get the above error. Simply remove cordova-plugin-console and this error will go away. Here is what it says on console plugin's github page:

This plugin is no longer being worked on as the functionality provided by this plugin is now included in cordova-ios 4.5.0 or greater, and support is already built in to cordova-windows > 5.0.0. You should remove this plugin from your applications.

Here is the link to the docs.

Ledge answered 23/3, 2018 at 19:30 Comment(3)
Doesn't this file get generated on the fly thus reverting all manual changes?Cristal
exportOptions.plist is automatically generated yes. The solution for me here was remove cordova-plugin-consoleLedge
Removing and re-adding the platform solved it for me.Cristal
K
2

You can solve this problem by returning to the old PhoneGap version. Add this to your config.xml file

<preference name="phonegap-version" value="cli-6.3.1" />
Keller answered 19/2, 2017 at 22:25 Comment(1)
For some people downgrading is not an option. Please see my explanation below how to fix this.Ledge

© 2022 - 2024 — McMap. All rights reserved.