Apple has tricked me and even though I disabled autoupdates it now pulled the most recent XCode version (Version 10.0 (10A255)) and dependencies. The effect is that I can not build my app anymore, even after removing (ionic cordova platform remove ios) and re-adding the platform.
It now fails with the error below.
onic cordova run ios --debug --target="iPhone-8" --consolelogs
...
<path>/platforms/ios/build/emulator/MyApp.app/Info.plist file not found.
[ERROR] An error occurred while running cordova run ios --debug --target iPhone-8 (exit code 1).
ionic --version
3.20.0
---- EDIT
ran with verbose and received :No scripts found for hook "before_deploy". as additional info for the failure.
----- EDIT ------
Please look here for more detail. I was able to reproduce it from scratch / a blank app template
Blank app fails debug build - /Info.plist file not found
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
Try this command it should work,this is issue with cordova.
If you're building on the command-line, try this
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
or
Xcode 10
If you are opening the project in the Xcode IDE, you need to change the build system in Workspace Settings to "Legacy Build System"
Xcode example
Now, You can also run this on command-line $ionic cordova build ios
Best of luck
Related
After setting up a fresh Cordova for iOS project trough the CLI this error comes up.
Build commands failed: CompileAssetCatalog
/Users/a/example/example/platforms/ios/build/emulator/Example.app
/Users/a/example/example/platforms/ios/Example/Images.xcassets
(1 failure) xcodebuild: Command failed with exit code 65
Cordova Version: 9.0.0 (cordova-lib#9.0.1)
Xcode Version: 11.2.1
macOS Version: 10.15
CLI:
cordova create example com.example.app Example
(cd example)
cordova platform add ios
cordova emulate ios --target="iPhone-6-Plus, 9.3"
What I tried:
- Clean up build folder
- Update Node/NPM
- Update Xcode
P.S.: Does it make a difference if the .ipa gets build trough the Cordova CLI or from within Xcode?
Two things here:
If you are using cordova 9.0.0, I'm assuming you're also using cordova-ios 5+. In that case, the "-UseModernBuildSystem=0" in your build.json is no longer necessary. cordova-ios#5 supports the modern build system.
You should also remove the target: --target="iPhone-6-Plus, 9.3". XCode 11 no longer, by default, ships with iOS9 simulators. In fact, you should not specify a target at all, unless necessary.
If you're still facing problems after fixing these two issues, try opening and running your project via XCode, it is likely to provide an improved error log and possible hints to fixes.
there is meny approach that getting resolve exit code 67
1) method 1
cordova platform remove ios
cordova platform add ios
2) in xcode give your provision profile check
You need a development provisioning profile on your build machine.
Apps can run on the simulator without a profile, but they are required
to run on an actual device
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/
3) cordova platform update ios
further informations cordova run with ios error .. Error code 65 for command: xcodebuild with args:
I have solved this issue in Xcode, by creating new
"iOS App Icon". Name it whatever you want, but you must choose it from dropdown in project's settings ie target settings, parameter is "App icons source". Then copy all images via Finder into that folder, and in Xcode
connect(drag&drop) those uncategorised images into placeholders.
So i don't really like using multiple IDEs, i don't like Xcode, so i build ionic apps using PHPStorm and use command line tools.
Every time i run : ionic cordova emulate ios
via command line i always get this:
cordova emulate ios exited with exit code 1.
But when i load the xcode project after build in Xcode and run in emulator it all loads fine.
So what is it with the command line that fails?
Here is a more complete error:
/Volumes/Work Drive/Projects/myfolder/App/platforms/ios/build/emulator/AppName.app/Info.plist file not found.
[ERROR] An error occurred while running subprocess cordova.
cordova emulate ios --verbose exited with exit code 1.
It can't find Info.plist because it doesn't create the ios/build/emulator folder at all.
Try to do like this :
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
After upgrading to xcode 10.2 my ionic for ios project stopped building using below command
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
i tried to upgrade cordova-ios#5.0.0 and remove and readd ios platform but no luck.
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. Supported values are: 4.0, 4.2, 5.0. This setting can be set in the build settings editor.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 12.2'
** ARCHIVE FAILED **
The following build commands failed:
Check dependencies
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
cordova build ios --buildFlag=-UseModernBuildSystem=0 exited with exit code 65.
Re-running this command with the --verbose flag may provide more information.
I ran into the same error. I first tried to switch the Swift Language version in the Xcode build setting and quickly realized that some plugins written in Swift broke. Thankfully the plugin which broke for me was QR Scanner which is well maintained and has been updated for Swift 5.
So what I did to fix it was first run the following node commands to find and update the outdated node packages.
npm outdated
npm update
Then I identified the outdated/broken cordova plugins, removed them, then reinstalled the latest versions. Using
cordova plugin list
to make sure everything was updating correctly, cross referencing with the version numbers with the plugins repo. Then finally I added this to the config.xml
<preference name="UseSwiftLanguageVersion" value="5" />
and everything built successfully when running,
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
Unfortunately, if you're using a cordova plugin that is written in Swift and is not well maintained you're out of luck. You can try to update the plugin yourself if you're brave.
Hopefully this was helpful and doesn't require you to role back your Xcode, losing the ability to build for the latest version of iOs.
You should go with below steps-
Open your project in Xcode by click on workspace file in platforms >> ios >> PROJECT_NAME.xcworkspace
Go for Build Settings
Now search "Swift Language Version"
Change the version to 4 or 5(whichever required)
run below command
Ionic cordova build ios --buildFlag="-UseModernBuildSystem=0"
Just add this plugin
cordova plugin add cordova-plugin-add-swift-support --save
Or if you already added then just remove this plugin and add again.
When I run: ionic build ios the archive succeeds but the export fails.
Error Messages:
error: exportArchive: Found no compatible export methods for: DVTFilePath:0x7f9d3dc41d20:'/Users/**PATH**/platforms/ios/**PROJECTNAME**.xcarchive'
Error Domain=IDEFoundationErrorDomain Code=1 "Found no compatible export methods for: DVTFilePath:0x7f9d3dc41d20:'/Users/**PATH**/platforms/ios/**PROJECTNAME**.xcarchive'" UserInfo={NSLocalizedDescription=Found no compatible export methods for: DVTFilePath:0x7f9d3dc41d20:'/Users/**PATH**/platforms/ios/**PROJECTNAME**.xcarchive'}
Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,fasTask.xcarchive,-exportOptionsPlist,/Users/**PATH**/platforms/ios/exportOptions.plist,-exportPath,/Users/**PATH**/platforms/ios/build/device
I modified the exportOptions.plist 'method' key to 'export_method' but same error message.
I tried uninstalling Xcode and re-installing. The first build after re-installation gives me a successful build. Any builds after the first build give me the same error message as before.
Also if I npm uninstall -g ionic cordova and delete everything in the platform folder, then npm install -g ionic cordova then the first build succeeds but any build after it fails.
ionic serve works fine every-time.
Details:
Xcode 7.3.1
ionic 2.1.14
cordova 6.4.0
cordova-ios 4.3.1
ios-deploy 1.9.0
Thanks.
Hey I am having the same issue, it happened after updating ionic and cordova to the lastest version. I created a new project ionic start added platform ios and when trying ionic run ios --device i got the same output that you're having after building trying to export.
When running an older (pre-update) project i was not having any problem at all after i did a ionic platform rm ios and then ionic platform add ios the problem reproduced again. I think is has to be to the way that the updated cli is adding the platform or that it is expecting an updated SDK version (Xcode 8).
A workaround is first launch and installing the app to the device using Xcode, then in the terminal do ionic run ios --device -l this will create a livereload ionic server. At the end it will show the error but the livereload server will be still working and you can develop and the changes will be reflected on the app without any problem.
Xcode: 7.3.2
Ionic: 2.1.13
Cordova: 6.4
Try
ionic build ios --emulator
i have created a new hello world project using the following command,
cordova create hello com.example.hello HelloWorld
the project is created successfully, then i add the ios platform by
cordova platform add ios
and to verify i have it added correctly, i type
cordova platform list
the iOS platform is shown in the list. so at this point, according to the PhoneGap tutorial, i can use the command
cordova build ios
to build the iOS version of the project. however, i encounter the following error:
Generating config.xml from defaults for platform "ios"
Preparing ios project
Compiling app on platform "ios" via command "/Users/Aldour/PhoneGap/hello/platforms/ios/cordova/build"
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
^
Error: An error occurred while building the ios project.
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/cordova/src/compile.js:65:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
the results that i have googled are mostly concerning the android version, talking about the invalid environment path setting. i dont know if it is related since i can create and build a PhoneGap project targeting the android platform without problem.
here is my $PATH:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin/node:/usr/local/bin/npm:/Developer/SDKs/android-sdk-macosx/platform-tools:/Developer/SDKs/android-sdk-macosx/tools
EDIT:
problem solved by re-installing xcode from app store
I had the same problem in Android platform, and it was solved with the commands:
cordova platform rm android
cordova platform add android
cordova build android
in Node.Js console. try it in ios.
If you get an error with 'cordova platform add android', you may need to manually remove any android folders in your project folder hierarchy.
This resolved my issue:
cordova platform remove ios
cordova platform add ios
cordova build ios
If you run the build with --verbose, you will probably see some permission issues. By default, XCode creates a folder of the build in ~/Developer, if you haven't changed it. There probably is a permissions issue when creating that folder. Just execute the following command: sudo cordova bulid ios
That should fix your issue.