Xcode XCBuild support error for ionic build - xcode

I have a ionic project that I am trying to build on iOS.
When running ionic build ios, it gives this error:
FIXME: Implement XCBuild support for macros in overriding parameters
with condition sets:
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
Error: Error code 1 for command: xcodebuild with args:
-xcconfig,/Users/Person/ProjectA/platforms/ios/cordova/build-debug.xcconfig,-project,ProjectA.xcodeproj,ARCHS=i386,-target,ProjectA,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/Person/ProjectA/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/Person/ProjectA/platforms/ios/build/sharedpch
I have tried:
Remove platform and add platform
Change CODE_SIGN_IDENTITY[sdk=iphoneos*] from iPhone Distributor to iPhone Developer in build-release.xcconfig
Re-did signing from xcode to try both automatic and manual signing
but all were not successful.
I am running:
Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.9.4
ios-sim version: 5.0.8
Node Version: v4.4.7
Xcode version: Xcode 11.1 Build version 11A1027
It is an old ionic version but able to run on my old macbook air (OS: High Sierra). I am now using a new macbook air (OS: Mojave) and trying to setup the environment.
Any suggestions?

I was getting this error after re-adding the iOS platform to my project with cordova#8.1.2/cordova-ios#4.5.4, even with a build.json file included in my project. I manually upgraded to cordova-ios#5.1.1 (by specifying the version in the cordova platforms add ios#5 command) and the error went away.

Related

Cordova needs xcodebuild version 9.0.0 or greater

I'm working on an Ionic 3 project and I'm trying to build the app on ios, my Xcode version is 7.3.1 and it's the lastest version supported by my mac ( MacBook Air 2015: OS X El Capitan )
When I try to build ios with my Ionic 3 App I get this Error :
Cordova needs xcodebuild version 9.0.0 or greater, you have version 7.3.1. Please install version 9.0.0 or greater from App Store
Is there any solution other than upgrading my Mac?
I had the same issue, my only solution was to download MacOS MOJAVE and install it.
After that i updated Xcode and Ionic and it was working.
https://support.apple.com/downloads/macos

Supported cordova version for xcode 7.2.1

I'm using XCode 7.2.1 to compile my ionic app. The problem is, if I'm using the latest cordova, it will display this error
GCDWebServerDataRequest.m - No visible #interface for 'NSDATA' declares the selector 'appendData:'
I googled and found the error is because I'm not using the latest XCode. However, I can't install the latest XCode because of insufficient storage space in my MacBook (can't upgrade my OSX). Furthermore, I believe I don't need to have the latest XCode, since I won't be distributing the compiled app in App Store later; I will only distribute it in my company's internal App Store.
So where can I get the info on which cordova is supported for XCode 7.2.1? Later I believe I can just install the supported cordova version by running sudo npm install -g cordova#[version] right?
Thanks

I cant get my ionic app to open in iOS emulator

My new ionic app won't run in the iOS emulator.
Its a fresh install of ionic and Xcode, these are my steps:
npm install -g ionic
ionic start myApp tabs
ionic cordova platform add ios
ionic cordova build ios
ionic cordova emulate ios
Then I get the following error:
No target specified for emulator. Deploying to undefined simulator
/localhost/myApp/platforms/ios/build/emulator/MyApp.app/Info.plist
file not found.
According to this thread (Fresh Ionic Fails to Emulate iOS 12 - Info.plist file not found) it should work with the following command:
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
But then I get the following error:
No target specified for emulator. Deploying to undefined simulator
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
And then according to this thread (Issues starting iOS simulator from CLI) it should work by updating ios-sim like this:
cd platforms/ios/cordova && npm install ios-sim#latest
But I still get the following error:
No target specified for emulator. Deploying to undefined simulator
Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
Ionic:
ionic (Ionic CLI) : 4.10.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.0.1
#angular-devkit/build-angular : 0.12.4
#angular-devkit/schematics : 7.2.4
#angular/cli : 7.2.4
#ionic/angular-toolkit : 1.4.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : ios 4.5.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 4 other plugins)
System:
ios-deploy : 1.9.4
ios-sim : 7.0.0
NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
The problem lie with ios-sim package which couldn't detect running simulators.
Updating to 8.0.1 with the following steps resolved the issue for me.
force update ios-sim to a working version
IMPORTANT needs to be done from inside the platforms/ios/cordova directory.
cd platforms/ios/cordova && npm install ios-sim#8.0.1
check if devices are now listed, takes a few seconds
ionic cordova emulate --list
installs appscript if not installed already
ionic cordova build ios
try to deploy to simulator
ionic cordova emulate --release --prod --livereload ios -- --buildFlag="-UseModernBuildSystem=0"
This will find any running simulator and deploy the app
Try just building the project and then running it from Xcode instead first.
ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
Then open the platforms/ios folder in Xcode and you'll be able to run it from there plus see any errors there may be with the project. When you eventually decide to push the app to the store you'll need to do this anyway.
EDIT
Then try targeting a specific emulator:
ionic cordova emulate ios --list get list of available targets to copy into the next command.
ionic cordova emulate --livereload ios -- --buildFlag="-UseModernBuildSystem=0" --target="iPhone-X, 12.1" example targeting iPhone XR.
The issue is related to a breaking changes on Xcode 10 not already reflected on ios-sim. You can check on ion-sim repo issue "List empty of devices simulator with Xcode 10".
The issue have already been fixed but is waiting for a new release submission.
You can continue running your App on emulator directly from Xcode.

Xcode-7, Could not build Module <IBMMobileFirstFoundation>

I am facing an issue, related to cordova ios build using Xcode-7.
when I create fresh project on mac machine, I am able to build and run that on simulator ios 6s. But When I try to import the project built on windows machine to mac, I am not able to build it succesfully.
***Error:*
could not build module "IBMMobileFirstPlatformFoundation".
**
*Configuration on windows:
cordova 6.5.0
ionic 3.3.0
node 6.10.3
ios platform version is 4.4.0
npm version is 3.10.10
*
*configuration on mac machine
cordova 6.5.0
ionic 3.3.0
node 6.11
ios platform version is 4.4.0
npm version is 3.10.10
*
Xcode is 7.
thank you for kind attention, kindly suggest me what I doing wrong.
:)
After one week R&D, I found the the answer to the problem, there was the problem of Xcode version, I just updated the OS version and also the Xcode version. Later On I came to know that problem was cordova and ionic version also. I update the cordova version to 7.2.0 and ionic version to 3.4.0.
I have build the app and its running fine, with some UI issues.
also use ionic cordova build to build the project.
thank you.

Xcode build fails for react-native AwesomeProject

I'm running Xcode 4.6.3 on OS X 10.7.5. I've set the iOS Deployment Target to 6.1 in Xcode and selected the iPhone 6.1 simulator. When I hit Run the React Packager appears and says it is ready.
Xcode then fails to build with four parse errors related to RCTImageDownloader.m and there are also nine Target Integrity warnings:
/Users/SM/AwesomeProject/node_modules/react-native/Libraries/AdSupport/RCTAdSupport.xcodeproj
iOS Deployment Target 7.0 is newer than SDK iOS 6.1 in target
RCTAdSupport
What are my options for resolving this problem?
The tools do not support building for a newer deployment target than the SDK supports. You need to lower the deployment target from 7.0 to 6.1 or use newer tools (which will require a newer version of OSX as well).

Resources