Sto lavorando con l'ultima Cordova (4.3) su OS X e ho 2 iPhone collegati al mio Macbook Pro. Ogni volta che voglio mettere alla prova la mia app, ho eseguito il seguente comando nel terminale:Come distribuire l'app Cordova tramite CLI su un dispositivo iPhone specificato?
cordova run ios --device
Lo script produce il seguente output nel terminale:
** BUILD SUCCEEDED **
[....] Waiting up to 5 seconds for iOS device to be connected
[....] Found iPhone 4S 'iPhone 4S' (0b2799xxxxx) connected through USB.
[....] Found iPhone 4 (GSM) 'QA iPhone 4' (40daa94b6dc607595a570c0893ba54b185a85124) connected through USB.
[....] Waiting for iOS device to be connected
[....] Using iPhone 4S 'iPhone 4S' (0b27990xxxxxx) (0b2799xxxx).
------ Install phase ------
[ 0%] Found iPhone 4S 'iPhone 4S' (0b279904xxxxxxx) connected through USB, beginning install
E poi si procede per installare l'applicazione su UNO dei l'iPhone e apre il prompt lldb. Il secondo iPhone rimane morto e silenzioso.
Quando esco dal lldb (via 'uscita', 'y'), gli script mostra un errore:
Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] y
Error code 253 for command: ios-deploy with args: -d,-b,/Users/path_to_app/appname.app
ERROR running one or more of the platforms: Error: /Users/path_to_app/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project
Ho guardato tutto la documentazione Cordova CLI e Google, ma non riesco a vedere come posso schierare un'app per un dispositivo fisico iPhone specifico (non emulatore!). Su Android, posso usare "cordova run android --target = 06af27413440e95f", dove il numero lungo è l'id del dispositivo in adb. Come faccio a farlo per gli iPhone?
Ho provato quanto segue senza alcun risultato:
cordova run ios --target='QA iPhone 4'
cordova run ios --device='QA iPhone 4'
cordova run ios --device --target='QA iPhone 4'
avete provato questo 'Cordova gestito ios --target = 0b27990xxxxxx' – AtanuCSE
sì, l'ho fatto, risponde con "0b27990xxxxxx non è un obiettivo valido per emulatore"(la parte xxxx è naturalmente lì per nascondere la mia vero UDID) –
Grazie @AtanuCSE la tua anima ha funzionato per me – yatg