Lancio la mia app iOS sul dispositivo (non sul simulatore) con il seguente comando (l'app è già installata).L'avvio dell'app con strumenti iOS non è affidabile
instruments \
-w c717fa22472d7b691ae5763af90e1e44244ad85a \
-t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \
-D "/Users/mj/Desktop/apps/trace" \
LPSimpleExample-cal \
-e UIARESULTSPATH /Users/mj/Desktop/apps \
-e UIASCRIPT /Users/mj/Desktop/apps/_run_loop.js
6 su 10 volte funziona. In caso di errore ottengo il seguente messaggio:
2013-10-07 16:45:51.553 instruments[9891:1207] unable to locate CFBundleIdentifier for path: LPSimpleExample-cal
2013-10-07 16:45:51.555 instruments[9891:1207] Recording cancelled : At least one target failed to launch; aborting run
Instruments Trace Error : Error Domain=com.apple.instruments Code=1 "Error Starting Recording" UserInfo=0x7faccbef8fa0 {NSLocalizedDescription=Error Starting Recording, NSLocalizedRecoverySuggestion=At least one target failed to launch; aborting run}
Instruments Trace Error : Failed to start trace.
Per me sembra che gli strumenti ha un bug qui. Ho provato a lanciare l'app più di 100 volte, in diversi scenari e non riesco ad analizzare un modello di errore. Il dispositivo crashlog dice:
Process: DTMobileIS [34956]
Path: /Developer/Library/Daemons/DTMobileIS
Identifier: DTMobileIS
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: lockbot [34938]
Date/Time: 2013-10-07 15:29:05.474 -0700
OS Version: iOS 6.1.3 (10B329)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000
Tipo di eccezione EXC_BAD_ACCESS (SIGSEGV)
indica che un oggetto che sta ottenendo accede è stato già rilasciato. Un SIGSEGV
è un errore di segmentazione, il che significa che sta tentando di accedere a un indirizzo di memoria non valido. Riferimento: Exception Types in iOS crash logs
Invece di usare il bundleIdentifier ho anche provato a specificare il percorso applicazione completo o l'intero bundleIdentifier: dettagli
# with full app path
instruments \
-w c717fa22472d7b691ae5763af90e1e44244ad85a \
-t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \
-D "/Users/mj/Desktop/apps/trace" \
/Users/mj/Desktop/apps/LPSimpleExample-cal.app \
-e UIARESULTSPATH /Users/mj/Desktop/apps \
-e UIASCRIPT /Users/mj/Desktop/apps/_run_loop.js
# with full bundleIdentifier
instruments \
-w c717fa22472d7b691ae5763af90e1e44244ad85a \
-t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate \
-D "/Users/mj/Desktop/apps/trace" \
/Users/mj/Desktop/apps/LPSimpleExample-cal.app \
-e UIARESULTSPATH /Users/mj/Desktop/apps \
-e UIASCRIPT /Users/mj/Desktop/apps/_run_loop.js
configurazione
- Instruments versione: 5.0 (51166)
- XCodice versione: 5.0 (5A1413)
- Tipi di dispositivo: iPhon e 5 - 6.1.3, iPhone 5C - 7.02, iPhone 5S - 7.0.2
Qualcuno ha maggiori informazioni in quali casi gli strumenti non possono lanciare un app sul dispositivo o quando si riceve il messaggio di errore unable to locate CFBundleIdentifier for path: LPSimpleExample-cal
?
Ho un problema simile, fatemi sapere se vi trovate ovunque http://stackoverflow.com/questions/19234031/launching-xcode-4-instruments-not-the-xcode-5-version-for-uiautomation – Jules
Ti tengo aggiornato. Il tuo post StackOverflow non è più pubblico. –