Reputation: 13733
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"
Upvotes: 3
Views: 1068
Reputation: 7142
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
Upvotes: 1
Reputation: 405
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"
Upvotes: 3