This command generate a 80 mb .IPA file :
tns build ios --for-device --release --bundle webpack --provision [Development Profile]
or this one generate a 37 mb .IPA file :
tns build ios --for-device --release --bundle webpack --provision [Distribution Profile]
Why this unexpected behavior ?
Related
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'Flipper' from project 'Pods')
** BUILD FAILED **
The following build commands failed:
Ld /Users/ramprasadsarkar/Library/Developer/Xcode/DerivedData/AwesomeProject-edxfscsdfjwsmicnfanfokvrokke/Build/Intermediates.noindex/AwesomeProject.build/Release-iphonesimulator/AwesomeProject.build/Objects-normal/arm64/Binary/AwesomeProject normal arm64
Please try the following.
If you are using terminal then set directory to your app folder.
or if you are using Vscode just open the terminal.
I hope you have already installed node.(did basic setup).
In terminal add follwing commands one by one, means use next commands only after completing 1 st command run.
npm install
cd ios
pod install
cd ..
npm run ios or npx react-native run-ios
Just check it works.
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.
i run this command on Nativescript CLI
tns build ios --release
but not build .ipa file.
how to build .ipa file?
After building with tns build ios --release --forDevice
the IPA file will be located in the following folder
<project>/platforms/ios/build/device
I'm trying to work with the Titanium CLI (appc). This is what I'm running:
appc run --platform ios --liveview --target simulator --ios-version 9.3 --sim-type iphone --sim-version 9.3 --skip-js-minify
How can I set the specific device to run on (iPhone 4s, 5, 6, 6s, 6s plus ...)? like I choose from Appcelerator Studio?
Also, I'm using Genymotion for Android emulators - I can I use CLI to run on specific emulator?
EDIT
I'm running the following command to run on Android Genymotion emulator:
/usr/local/bin/node /Users/ophir/.appcelerator/install/5.3.0/package/node_modules/titanium/lib/titanium.js build run --platform android --log-level trace --sdk 5.3.0.GA --project-dir /Users/ophir/Documents/Appcelerator_Studio_Workspace/MyApp/App --target emulator --android-sdk /Users/ophir/Library/Android/sdk-titanium --device-id Samsung Galaxy S6 - 6.0.0 - API 23 - 1440x2560 --skip-js-minify --liveview --deploy-type development --no-colors --no-progress-bars --no-prompt --prompt-type socket-bundle --prompt-port 55633 --config-file /var/folders/4x/8mnrwxd51rb3zmn36p6x30w40000gn/T/build-1466517191446.json --no-banner --project-dir /Users/ophir/Documents/Appcelerator_Studio_Workspace/MyApp/App
And I'm getting the following error:
[ERROR] Invalid "--device-id" value "Samsung"
If you want to replicate a studio build, check the console in Studio for the build commmand line that has been generated.
So for iOS the key params are :
build run --platform ios --target simulator --ios-version 9.3 --device-family iphone --sim-type iphone --sim-version 9.3 --device-id XXXXXXXXXXX
you can either cut + paste the UDID of the simulator you are interested in from your studio build, or in Terminal run :
xcrun simctl list
and pick the UDID of the simulator you want.
For Android
build run --platform android --target emulator --device-id 'Google Nexus 5X - 6.0.0 - API 23 - 1080x1920'
Get the emulator name by :
/Applications/Genymotion\ Shell.app/Contents/MacOS/genyshell -c "devices list"
Genymotion shell docs
The only way I can get Titanium to allow me to choose a simulator is by using the following, with two -
ti build -p ios --C
My Titanium version is 5.0.14
try this code
ti build -p ios -C ?
I'm running on macosx with nativscript 2.0 (typescript+angular2 tutorial).
I just ran the tns run ios --emulator command and then ctrl-c.
Then running this command: tns livesync ios --emulator --watch
results in:
.
.
.
Transferring project files...
Successfully transferred all project files.
Applying changes...
**Error Command failed: killall sampleGroceries2.app
No matching processes belonging to you were found
while executing killall sampleGroceries2.app.**
I have tested the {N} + Angular2 tutorial and afer following the instruction I had no problems with the livesync option.
Have you updated to NativeScript 2.0.0 - I have noticed that this error was logged in the previous version 1.7.1.
If you need to update your NativeScript version globally you can run
npm install -g nativescript
After that step you can remove/add the platform folder from your project with the following commands
tns platform remove ios
tns platform add ios
Also delete the node_modules folder and the re-run
tns run ios --emulator
To check your current NativeScript version you can execute
tns --version
The latest official release of {N} has some livesync fixes so now your command should run as espected - let us know if that solution was appliable for your case.