Ionic Build iOS - Fail - ios

I've been workign on this project for months now with no major issues. Today I can't even get it to build out. I ran "$ionic resources" and now I can't get my build to work at all.
I'm getting this error:
** BUILD FAILED **
The following build commands failed:
CompileAssetCatalog build/emulator/Stopper.app Stopper/Images.xcassets
(1 failure)
ERROR building one of the platforms: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/colemanjeff/GitHub/StopperRC1/platforms/ios/cordova/build-debug.xcconfig,-project,Stopper.xcodeproj,ARCHS=i386,-target,Stopper,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/colemanjeff/GitHub/StopperRC1/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/colemanjeff/GitHub/StopperRC1/platforms/ios/build/sharedpch
You may not have the required environment or OS to build this project
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/colemanjeff/GitHub/StopperRC1/platforms/ios/cordova/build-debug.xcconfig,-project,Stopper.xcodeproj,ARCHS=i386,-target,Stopper,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/colemanjeff/GitHub/StopperRC1/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/colemanjeff/GitHub/StopperRC1/platforms/ios/build/sharedpch
I'm not sure what caused the problem or how to fix it. Anyone have any idea?

Turns out I actually did need to uninstall the platform, remove the plugin json file, and then reinstall everything.

Run (this will remove the old ionic ios platform)
sudo ionic platform rm ios
Then (this will install a new platform with privileges)
sudo ionic platform add ios
Then build your code ios/android
ionic build ios
ionic build android
This fixed it for me!
Might be that you should also run
sudo ionic resources
to generate new icon and splash screens.

Basically, re-installation of Platform and Plugins once again resolves the issue.

Related

Build commands failed: CompileAssetCatalog - Cordova for iOS

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.

Error code 65 for command: xcodebuild with args deploying ionic app to IOS

I can’t deploy my Ionic App to iOS devices even after performing all of the tasks mentioned in this forum. I followed all of the steps required for code signing so I’m no longer getting that error. Now I’m getting the following:
The following build commands failed:
Ld
/Users/laroca/Library/Developer/Xcode/DerivedData/-bfqgfiilftgpjvcfjxixwpxvluxh/Build/Intermediates.noindex/ArchiveIntermediates/apname/IntermediateBuildFilesPath/appname.build/Debug-iphoneos/appname.build/Objects-normal/arm64/appname
normal arm64 (1 failure) Error: Error code 65 for command: xcodebuild
with args:
-xcconfig,/Users/laroca/Documents/Mundo/platforms/ios/cordova/build-debug.xcconfig,-workspace,appname.xcworkspace,-scheme,Mundo,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,appname.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/laroca/Documents/appname/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/laroca/Documents/appname/platforms/ios/build/sharedpch
I tried the following to no avail:
ionic remove platform ios
ionic platforms rm ios
ionic platforms add ios
ionic run
The code signing issue appears to be resolved but I can’t get past this current issue. Please help. I’ve never been able to deploy to IOS.
For build or run iOS app you need to use below command :
ionic cordova build ios
or for release version
ionic cordova build ios --release
or for Prod build
ionic cordova build ios --prod -- release
and for code sign reference please check below answer link :
stack answer
Ionic Official Link
Hope this will helps!

Ionic Emulate iOS/Android command not working

Context: I am currently on Ionic version 3.15.2. The 'ionic serve' command works. The 'ionic cordova emulate ios' and 'ionic cordova emulate android' do not work. I have tried deleting/reinstalling certain packages and dependencies from Ionic but nothing has helped. I have a feeling I need to delete/reinstall Xcode all together but I figured I would ask for help here first. This is the error message I get on my terminal when I try to use the Ionic simulator/emulator:
Command /usr/bin/codesign failed with exit code 1
** BUILD FAILED **
The following build commands failed:
CodeSign build/emulator/****app.app
(1 failure)
Error: Error code 65 for command: xcodebuild with args:
-xcconfig,/Users/*****/Desktop/*****/platforms/ios/cordova/build-debug.xcconfig,-workspace,****app.xcworkspace,-scheme,****app,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS
Simulator,name=iPhone
5s,build,CONFIGURATION_BUILD_DIR=/Users/*****/Desktop/****/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/****/Desktop/****/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova emulate ios (exit code 1).
Note: I used the asterisks in place of the path for privacy reasons
It's weird that ionic serve works but the other two commands don't...
Even ionic info should fail with the latter error.
It's because of the module #ionic/cli-plugin-proxy. As soon as I uninstalled it I could successfully run ionic info. But it detected IONIC_HTTP_PROXY in my environment and asked me to install it again.
So I did manually later, but the error returned. So I installed the missing module using npm install -g #ionic/cli-framework. After that I could successfully run ionic info again.
Therefor I guess it's an unresolved dependency issue inside the #ionic/cli-plugin-proxy module.

Ionic build on iOS returns "BUILD FAILED"

I'm working on Ionic on a Mac machine. I have installed Google Analytics plugin and trying to build project but it is not working.
I am getting following error:
** **BUILD FAILED** **
The following build commands failed:
..../path normal i386
(1 failure)
>Error: Error code 65 for command: xcodebuild with args:
-xcconfig,/Volumes/Workspace/Dev/TestApp/platforms/ios/cordova/build-debug.xcconfig,
-project,TestApp.xcodeproj,
-target,TestApp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,build,CONFIGURATION_BUILD_DIR=/Volumes/Workspace/Dev/TestApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Volumes/Workspace/Dev/TestApp/platforms/ios/build/sharedpch
I have tried with platform removing and add adding but still not got fixed.
How can I solve this issue?
It was an issue due to xcode compatibility of plugin. uninstalling current xcode and installing xcode 7.3.1 solved issue.
Note: It is due to ionic build ios command internally uses xcode command to build project.

Ionic ios app Build failed MainController.xib

Sometimes when i try to build my ios project on xcode i get the following error
The following build commands failed:
CompileXIB ProjectName/Classes/MainViewController.xib
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/ritesh/Documents/Projects/test-app/platforms/ios/cordova/build-debug.xcconfig,-project,ProjectName.xcodeproj,ARCHS=i386,-target,ProjectName,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/ritesh/Documents/Projects/test-app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/ritesh/Documents/Projects/test-app/platforms/ios/build/sharedpch
ERROR building one of the platforms: Error: /Users/ritesh/Documents/Projects/test-app/platforms/ios/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/ritesh/Documents/Projects/test-app/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:139:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
I read this bolog post and while his suggestion makes sense but I dont have a duplicate of the file which he said i should see when i open my .pbxproj file.
https://medium.com/#_qzapaia/cordova-ionic-ios-build-error-697a7ec5b46#.snruarnmz
if i build my project for the second time, it builds properly so im not sure what is causing this occasionally. Any clues from anyone?
Cheers
Run (this will remove the old ionic ios platform)
sudo ionic platform rm ios
Then (this will install a new platform with privileges)
sudo ionic platform add ios
Then build your code ios/android
ionic build ios
ionic build android
This fixed it for me!
I was having this same problem for like three days, and I just solved it for myself. My issue was that I was using Xcode 7.1, and apparently there's something about that version that was causing the compiler issue.
Solution:
I uninstalled Xcode 7.1 by deleting the app from my Applications folder.
I went to this page and downloaded Xcode 6.4 instead.
After downgrading to Xcode 6.4, I was able to build for ios without an issue.

Resources