Cordova Phonegap: Build for iOS - ios

I'm trying to create an example app in PhoneGap and Cordova.
I have an example Hello World, and I want to build for iOS (For Android it works just fine).
I have added the platform, but when I run cordova build ios, I get:
** BUILD FAILED **
The following build commands failed:
CompileAssetCatalog build/emulator/ENM.app ENM/Images.xcassets
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/pablo/Documents/po/enm/ENM/platforms/ios/cordova/build-debug.xcconfig,-project,ENM.xcodeproj,-target,ENM,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,build,CONFIGURATION_BUILD_DIR=/Users/pablo/Documents/po/enm/ENM/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/pablo/Documents/po/enm/ENM/platforms/ios/build/sharedpch
I saw several questions like this, but none of the solutions seem to work for me.

Related

PhaseScriptExecution when trying to execute ionic cordova run ios

When I tried to build my application on IOS emulator, it shows the following error, I search online and I found it has something to do with Pod, but I didn't get any useful solutions for this.
The following build commands failed:
PhaseScriptExecution Copy\ www\ directory /Users/kai/Library/Developer/Xcode/DerivedData/RADAR_Questionnaire-ewiaqvtxwvvffzdyqzeazoxksrcm/Build/Intermediates.noindex/RADAR\ Questionnaire.build/Debug-iphonesimulator/RADAR\ Questionnaire.build/Script-304B58A110DAC018002A0835.sh (in target 'RADAR Questionnaire' from project 'RADAR Questionnaire')
(1 failure)
xcodebuild: Command failed with exit code 65
By the way, the app can build fine until I upgrade my mac from 11 (Big surf) -> 12 (Monetary ), I am not sure does it have something to do with the upgrade.

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 ios --release build fails results in Error code 65

ionic build iosworks fine but I went to do ionic build ios --release and the first time it didn't fail but it didn't build succeed either.
The second time I tried I got this error?
The following build commands failed:
Ld build/My\ App.build/Release-iphonesimulator/My\
App.build/Objects-normal/i386/My\ App normal i386
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -
xcconfig,/Users/me/desktop/app/platforms/ios/cordova/
build-release.xcconfig,-project,My App.xcodeproj,-target,My App,-
configuration,Release,-sdk,iphonesimulator,-destination,platform=iOS
Simulator,build,CONFIGURATION_BUILD_DIR=/Users/me/desktop/
app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/me/
desktop/app/platforms/ios/build/sharedpch
I've done ionic build ios and uploaded it to testflight and itunes connect through xcode in the past without issue in order to test.
Is that way still ok for the final production version to submit to the store or must it be the release command?
I was just about to get the app on the store so any help would be much appreciated!
You need to use --prod option when you are building Ionic 2 project for production.
ionic build ios --prod --release
Check discussion here

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.

Resources