Appium and .ipa files?

4,300 views
Skip to first unread message

Vic Wong

unread,
May 2, 2013, 3:27:50 PM5/2/13
to appium-...@googlegroups.com
We (and I imagine many developers) distribute our builds using testflight and jenkins, which builds the app into ipa files. Has anyone successfully used appium with an ipa file?

I've been experimenting with this, you can unarchive an ipa file into a directory labeled "Payload" that contains the .app archive. However, when I point my app to it, it fails with the error below.

It works when I build the app myself in xcode, but I'm hoping to avoid that since we've already got a build system in place.

PS See you all at the hackathon this afternoon!

=======

error: Instruments socket client never checked in; timing out
info: Instruments exited with code 1 and trace dir undefined
error: Instruments socket client never checked in; timing out
info: Instruments exited with code 1 and trace dir undefined
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"Mac","app":"/Users/vic/Downloads/Payload-1/testapp.app","browserName":"iOS","version":"6.0"}}
info: Using local app from desiredCaps: /Users/vic/Downloads/Payload-1/testapp.app
info: Creating new appium session 6767149a-5d6a-4ae3-9d5e-a4a9c39432ff
info: Cleaned up instruments socket /tmp/instruments_sock
info: Forcing use of iphone
info: Parsed app Info.plist
info: Wrote new app Info.plist with device type
info: instruments is: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Users/vic/appium/app/uiauto/Automation.tracetemplate /Users/vic/Downloads/Payload-1/testapp.app -e UIASCRIPT /Users/vic/appium/app/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/7fa656c5-0e71-4f99-86b5-45f04ac8551d
info: And extra without-delay env: {}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /Users/vic/Downloads/Payload-1/testapp.app/testapp).

info: [INST STDERR] 2013-05-02 12:21:00.226 instruments[14101:1603] Recording cancelled : At least one target failed to launch; aborting run
Instruments Trace Error : Failed to start trace.

info: [INSTSERVER] Instruments exited with code 253
error: Instruments did not launch successfully, failing session
error: Failed to start an Appium session, err was: Instruments did not launch successfully--please check your app paths or bundle IDs and try again
info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started","origValue":"Instruments did not launch successfully--please check your app paths or bundle IDs and try again"},"sessionId":"6767149a-5d6a-4ae3-9d5e-a4a9c39432ff"}
POST /wd/hub/session 500 341ms - 270
info: Clearing out appium devices

bootstrap online

unread,
May 2, 2013, 3:34:07 PM5/2/13
to Vic Wong, appium-...@googlegroups.com

On Thu, May 2, 2013 at 3:27 PM, Vic Wong <vic...@gmail.com> wrote:
We (and I imagine many developers) distribute our builds using testflight and jenkins, which builds the app into ipa files. Has anyone successfully used appium with an ipa file?

I tried and the ipa file won't work on the simulator. My solution was to setup a new target in Jenkins that created the appropriate build.

Ritika Mishra

unread,
Jun 5, 2013, 4:03:46 AM6/5/13
to appium-...@googlegroups.com
Hi,

Did anyone find a solution to this problem? I too have a .ipa and need to automate it.

Thanks,
Ritika

Sergio Neves Barros

unread,
Jun 5, 2013, 5:09:12 AM6/5/13
to appium-...@googlegroups.com
Try changing the extension from .ipa to .zip and then extracting it.

It will generate a the payload folder with an .app file in there, but you should be able to install that one.

Sergio

Jonathan Lipps

unread,
Jun 5, 2013, 12:35:31 PM6/5/13
to Ritika Mishra, appium-...@googlegroups.com
There's an --ipa flag you can use to start the server with instead of --app

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

HungNguyen

unread,
Jun 10, 2013, 12:22:26 AM6/10/13
to appium-...@googlegroups.com, Ritika Mishra
Hi  Jonathan Lipps,
Could you please tell me how I spawn instrument command with specific result path when running Appium?
Notes: I used MAC machine.

Thanks.

Jonathan Lipps

unread,
Jun 10, 2013, 10:27:46 PM6/10/13
to HungNguyen, appium-...@googlegroups.com, Ritika Mishra
Sorry Hung, I'm not sure what you mean by "spawn instrument command with specific result path". Can you clarify?

HungNguyen

unread,
Jun 10, 2013, 11:56:51 PM6/10/13
to appium-...@googlegroups.com, HungNguyen, Ritika Mishra
Hi Jonathan,

I'm using Xamarin Studio, C#, Selenium WebDriver RC, Appium to do automation for IOS native app on MAC machine.
The bellows are my steps to do automation:
1. Start appium server from Terminal
2. Back to Xamarin Studio to run automation script
3. When the scrip is running, I see in Terminal has generated information as follows: 

info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /usr/local/lib/node_modules/appium/app/uiauto/Automation.tracetemplate 
-w fc8ee197cba7ee8f6ae64077406e9d719efb70ea com.spiraledge.swim 
-e UIASCRIPT /usr/local/lib/node_modules/appium/app/uiauto/bootstrap.js 
-e UIARESULTSPATH /tmp/c373f6f6-cbc9-42b7-987a-932d7162c491

I realized that Appium generate command line to call UI Automation Instrument of XCode. 
Then, the result file is in /tmp folder.
The problem here is that the result is not genated pass or fail result as UI automation of XCode does, It does not generate snapshot when failing. Additionally, we can not control where the result file is generated.
Does appium does not support or I miss any step to do this? 
Could you please support me this, Jonathan?
Thanks.

Jonathan Lipps

unread,
Jun 13, 2013, 12:51:41 PM6/13/13
to HungNguyen, appium-...@googlegroups.com, Ritika Mishra
Pass/fail is to be determined by your selenium script, just like other selenium tests. 

The instruments tracedir is dumped into appium's directory so you can look at it after a test run if you pass the --keep-artifacts flag to the appium server.

Ling-Yi Kung

unread,
Jul 18, 2013, 2:43:51 AM7/18/13
to appium-...@googlegroups.com, Ritika Mishra
Do you have to use the --ipa flag to start the server? I tried running the server with no arguments, then running a test with 'ipa' => /path/to/ipa/file and it gave me the error that no app was set.

My problem is that my Jenkins build creates an .ipa file. Even when I rename it to .zip, unzip it, then pass in the .app, it gives me the same error that Vic was having:

debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"browserName":"iOS","platform":"Mac","version":"6.1","app":"/Users/lkung/workspace/appium-ios-test/./Foo.app"}}
info: Using local app from desiredCaps: /Users/lkung/workspace/appium-ios-test/./Foo.app
info: Creating new appium session a76623f3-6d26-4b69-82eb-635d64d56417
info: Cleaned up instruments socket /tmp/instruments_sock
info: Forcing use of iphone
info: Parsed app Info.plist
info: Wrote new app Info.plist with device type
debug: No device id or app, not installing to real device.
debug: Creating instruments
info: instruments is: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments
info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock
info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /usr/local/share/npm/lib/node_modules/appium/app/uiauto/Automation.tracetemplate /Users/lkung/workspace/appium-ios-test/./Foo.app -e UIASCRIPT /usr/local/share/npm/lib/node_modules/appium/app/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/12efe519-b4f5-4afe-8f4b-ff03a6287eae
info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/share/npm/lib/node_modules/appium/build/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/share/npm/lib/node_modules/appium/build/iwd"}
info: [INST STDERR] posix spawn failure; aborting launch (binary == /Users/lkung/workspace/appium-ios-test/Foo.app/Foo).

info: [INST STDERR] 2013-07-17 23:38:46.653 instruments[40516:707] Recording cancelled : At least one target failed to launch; aborting run
Instruments Trace Error : Failed to start trace.

info: [INSTSERVER] Instruments exited with code 253
error: Instruments did not launch successfully, failing session
error: Failed to start an Appium session, err was: Instruments did not launch successfully--please check your app paths or bundle IDs and try again
info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started","origValue":"Instruments did not launch succ\
essfully--please check your app paths or bundle IDs and try again"},"sessionId":"a76623f3-6d26-4b69-82eb-635d64d56417"}
POST /wd/hub/session 500 1201ms - 270
info: Clearing out appium devices

The .ipa file I get is the release version of the app. Should it instead be the debug version? I'm confused because Instruments cannot detect the unzipped .app, either.

Jonathan Lipps

unread,
Jul 18, 2013, 4:03:10 PM7/18/13
to Ling-Yi Kung, appium-...@googlegroups.com, Ritika Mishra
If you're trying to run on the simulator it needs to be a version built for the simulator, which is often the debug version?

Ling-Yi Kung

unread,
Jul 18, 2013, 6:57:58 PM7/18/13
to appium-...@googlegroups.com, Ling-Yi Kung, Ritika Mishra
Ah, yes, I believe this is the issue. I've tried running both the ad hoc and appstore versions of the .app in the Simulator and they won't work. The ad hoc version has a device UDID whitelist. I'm not sure why the appstore version doesn't work, but it could be because it's compiled for devices. An .app has to be compiled for the Simulator separately.

Thanks!

Aleksei Mordas

unread,
Aug 15, 2013, 2:43:17 AM8/15/13
to appium-...@googlegroups.com
Guys, so do you find a solution to run ipa files on real devices?

Regards, Aleksei

четверг, 2 мая 2013 г., 21:27:50 UTC+2 пользователь Vic Wong написал:

Nitika Gupta

unread,
Jun 23, 2014, 4:38:10 AM6/23/14
to appium-...@googlegroups.com
Hi All,

Can anyone please confirm if there is any solution to run .ipa files on real device.

Aniket Gadre

unread,
Jun 23, 2014, 5:38:31 AM6/23/14
to Nitika Gupta, appium-...@googlegroups.com
ipa signed with distribution cert doesn't work, you need to use a developer certificate 

Best Regards,
Aniket Gadre
 
Programming can be fun, so can cryptography; however they should not be combined.


--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages