Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova build iOS error: archive not found at path 'path/to/myApp.xcarchive" with Xcode 10 #404

Closed
Thkasis opened this issue Sep 11, 2018 · 6 comments
Labels
Milestone

Comments

@Thkasis
Copy link

Thkasis commented Sep 11, 2018

Cordova -v : 8.0.0
After running cordova platform add ios I see
Using cordova-fetch for cordova-ios~4.5.4
But later sais iOS project created with cordova-ios@4.5.5
On macOS High Sierra (10.13.6) and Xcode 10.

I have tried removing and adding platforms. Also, reinstalling stuff as well. I follow the commands below but see error below at build:

cordova create myApp org.apache.cordova.myApp myApp cd myApp
cordova platform add ios
cordova build ios

I get the error below:

Building project: /Users/ben/Desktop/myTest/platforms/ios/myTest.xcworkspace Configuration: Debug Platform: device User defaults from command line: IDEArchivePathOverride = /Users/ben/Desktop/myTest/platforms/ios/myTest.xcarchive

Build settings from command line: CONFIGURATION_BUILD_DIR = /Users/ben/Desktop/myTest/platforms/ios/build/device SHARED_PRECOMPS_DIR = /Users/ben/Desktop/myTest/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/ben/Desktop/myTest/platforms/ios/cordova/build-debug.xcconfig': CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist CODE_SIGN_IDENTITY = iPhone Developer ENABLE_BITCODE = NO GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)" OTHER_LDFLAGS = -ObjC SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

error: archive not found at path '/Users/ben/Desktop/myTest/platforms/ios/myTest.xcarchive' ** EXPORT FAILED **

(node:4984) UnhandledPromiseRejectionWarning: Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,myTest.xcarchive,-exportOptionsPlist,/Users/ben/Desktop/myTest/platforms/ios/exportOptions.plist,-exportPath,/Users/ben/Desktop/myTest/platforms/ios/build/device (node:4984) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:4984) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@Thkasis Thkasis changed the title PUBLIC Stack Overflow Tags Users Jobs Teams Q&A for work Learn More Cordova build iOS error: archive not found at path 'path/to/myApp.xcarchive" Cordova build iOS error: archive not found at path 'path/to/myApp.xcarchive" Sep 11, 2018
@janpio janpio added the support label Sep 11, 2018
@cvenzin
Copy link

cvenzin commented Sep 14, 2018

same issue after upgrading to xcode 10:

  • cordova platform add ios

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Using cordova-fetch for cordova-ios@~4.5.4
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: hexagon.si.ch.mrkapozh
Name: MRKapoZH
iOS project created with cordova-ios@4.5.5
Discovered plugin "cordova-plugin-geolocation" in config.xml. Adding it to the project
Installing "cordova-plugin-geolocation" for ios
Adding cordova-plugin-geolocation to package.json
Saved plugin info for "cordova-plugin-geolocation" to config.xml
Discovered plugin "cordova-plugin-network-information" in config.xml. Adding it to the project
Installing "cordova-plugin-network-information" for ios
Adding cordova-plugin-network-information to package.json
Saved plugin info for "cordova-plugin-network-information" to config.xml
Discovered plugin "cordova-plugin-app-event" in config.xml. Adding it to the project
Installing "cordova-plugin-app-event" for ios
Adding cordova-plugin-app-event to package.json
Saved plugin info for "cordova-plugin-app-event" to config.xml
Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the project
Installing "cordova-plugin-device" for ios
Adding cordova-plugin-device to package.json
Saved plugin info for "cordova-plugin-device" to config.xml
Discovered plugin "cordova-plugin-statusbar" in config.xml. Adding it to the project
Installing "cordova-plugin-statusbar" for ios
Adding cordova-plugin-statusbar to package.json
Saved plugin info for "cordova-plugin-statusbar" to config.xml
Discovered plugin "cordova-plugin-vibration" in config.xml. Adding it to the project
Installing "cordova-plugin-vibration" for ios
Adding cordova-plugin-vibration to package.json
Saved plugin info for "cordova-plugin-vibration" to config.xml
Discovered plugin "cordova-plugin-file" in config.xml. Adding it to the project
Installing "cordova-plugin-file" for ios
Installing "cordova-plugin-compat" for ios
Adding cordova-plugin-file to package.json
Saved plugin info for "cordova-plugin-file" to config.xml
Discovered plugin "cordova-custom-config" in config.xml. Adding it to the project
Installing "cordova-custom-config" for ios
Adding cordova-custom-config to package.json
Saved plugin info for "cordova-custom-config" to config.xml
Discovered plugin "cordova-plugin-local-notification" in config.xml. Adding it to the project
Installing "cordova-plugin-local-notification" for ios
Plugin dependency "cordova-plugin-device@1.1.7" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on ios.
Installing "cordova-plugin-badge" for ios
Adding cordova-plugin-local-notification to package.json
Saved plugin info for "cordova-plugin-local-notification" to config.xml
Discovered plugin "cordova-plugin-background-fetch" in config.xml. Adding it to the project
Installing "cordova-plugin-background-fetch" for ios
Adding cordova-plugin-background-fetch to package.json
Saved plugin info for "cordova-plugin-background-fetch" to config.xml
Discovered plugin "cordova-plugin-media" in config.xml. Adding it to the project
Installing "cordova-plugin-media" for ios
Plugin dependency "cordova-plugin-file@4.3.3" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on ios.
Plugin dependency "cordova-plugin-compat@1.2.0" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on ios.
Adding cordova-plugin-media to package.json
Saved plugin info for "cordova-plugin-media" to config.xml
Discovered plugin "cordova-plugin-background-mode" in config.xml. Adding it to the project
Installing "cordova-plugin-background-mode" for ios
Plugin dependency "cordova-plugin-device@1.1.7" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on ios.
Adding cordova-plugin-background-mode to package.json
Saved plugin info for "cordova-plugin-background-mode" to config.xml
Discovered plugin "cordova-plugin-app-version" in config.xml. Adding it to the project
Installing "cordova-plugin-app-version" for ios
Adding cordova-plugin-app-version to package.json
Saved plugin info for "cordova-plugin-app-version" to config.xml
Discovered plugin "cordova-plugin-app-preferences" in config.xml. Adding it to the project
Installing "cordova-plugin-app-preferences" for ios
app-settings.json not found: creating a sample file
Adding cordova-plugin-app-preferences to package.json
Saved plugin info for "cordova-plugin-app-preferences" to config.xml
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for ios
Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
Discovered plugin "cordova-android-support-gradle-release" in config.xml. Adding it to the project
Installing "cordova-android-support-gradle-release" for ios
Adding cordova-android-support-gradle-release to package.json
Saved plugin info for "cordova-android-support-gradle-release" to config.xml
cordova-custom-config: Applied custom config from config.xml to /Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/MRKapoZH/MRKapoZH-Info.plist
ios settings bundle was successfully generated
--save flag or autosave detected
Saving ios@~4.5.5 into config.xml file ...

  • cordova-set-version -v=1.0.4 -b=4
  • cordova build ios --release --device

You have been opted out of telemetry. To change this, run: cordova telemetry on.
cordova-custom-config: Skipping auto-restore of config file backup(s)
cordova-custom-config: Applied custom config from config.xml to /Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/MRKapoZH/MRKapoZH-Info.plist
ios settings bundle was successfully generated
Reading build config file:
Building project: /Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/MRKapoZH.xcworkspace
Configuration: Release
Platform: device
User defaults from command line:
IDEArchivePathOverride = /Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/MRKapoZH.xcarchive

Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/build/device
SHARED_PRECOMPS_DIR = /Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/cordova/build-release.xcconfig':
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist
CODE_SIGN_IDENTITY = iPhone Distribution
DEVELOPMENT_TEAM = 8X37PBU852
ENABLE_BITCODE = NO
HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
OTHER_LDFLAGS = -ObjC
PROVISIONING_PROFILE = 705ac762-70fe-488a-9573-8236e7424717
SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

error: archive not found at path '/Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/MRKapoZH.xcarchive'
** EXPORT FAILED **

(node:7560) UnhandledPromiseRejectionWarning: Error code 65 for command: xcodebuild with args: -exportArchive,-archivePath,MRKapoZH.xcarchive,-exportOptionsPlist,/Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/exportOptions.plist,-exportPath,/Users/jenkins/Home/workspace/MR_KapoZH_9.2_iOS_Test/src/platforms/ios/build/device
(node:7560) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7560) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@janpio janpio changed the title Cordova build iOS error: archive not found at path 'path/to/myApp.xcarchive" Cordova build iOS error: archive not found at path 'path/to/myApp.xcarchive" with Xcode 10 Sep 14, 2018
@dpogue
Copy link
Member

dpogue commented Sep 14, 2018

Thanks for raising this issue and providing logs.

Currently cordova-ios isn't compatible with Xcode 10's new build system, but there are some workarounds documented here.
I'll keep this issue open for us to investigate what we need to change to be compatible with Xcode 10, but wanted to provide that link to workarounds for anyone who has upgraded and is running into this.

@Josh2406
Copy link

Thanks for raising this issue and providing logs.

Currently cordova-ios isn't compatible with Xcode 10's new build system, but there are some workarounds documented here.
I'll keep this issue open for us to investigate what we need to change to be compatible with Xcode 10, but wanted to provide that link to workarounds for anyone who has upgraded and is running into this.

Hi dpogue,

I followed the workaround instructions by changing the build system to Legacy. The issue isn't resolved yet. My code was running fine and was even published to App Store before I upgraded to Xcode 10.1.

Is there anything else I need to do?

Thanks in anticipation of your response.

@ashishkumar2804
Copy link

Hi, i am trying to build cordova ios project with Xcode 10 on command line. I am getting below error

Running command: /Users/zs/Development/svn/ICFieldView/trunk/root/ICFieldView.Mobile/mJSCS/platforms/ios/cordova/build
Cordova can only run in Xcode version 4.6 or greater.
Error: /Users/zs/Development/svn/ICFieldView/trunk/root/ICFieldView.Mobile/mJSCS/platforms/ios/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

It fails, even when i use, --buildFlag='-UseModernBuildSystem=0'

we are using Cordova version 3.5.0-0.2.7
and cordova ios version 3.5.

Please let me know how to fix the issue. On Xcode 9.4, the build is working successfully.

@janpio
Copy link
Member

janpio commented Feb 14, 2019

Open a new issue @ashishkumar2804 please - here this will get overlooked and ignored.

@smakinson
Copy link

Incase it helps anyone I was able to fix this with the Legacy Build setting and in src-cordova/platforms/ios/cordova/build-release.xcconfig change it to:

CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer

Just don't forget to do it again after a remove & re-add of platform ios. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants