How do I go about uninstalling an iOS app via command line? I tried looking around the site and the forum, but I can't seem to find an obvious place for it.
This is what I want to do:
1. Create an IPA (via command line on a Mac)
2. Instrument the IPA file (via Ranorex.Instrumentation.exe)
3. For each mobile device:
3a. Uninstall current app
3b. Install new instrumented IPA file (via "Deploy iOS App action in a recording")
I figured out everything except step 3a. I know you can instrument an IPA, uninstall and deploy your app using Ranorex.Instrumentation.exe all in one step. But, I want to save some time and instrument the IPA once. Then use that single file to install on multiple devices.
Thanks in advance.
How do I uninstall iOS App via command line?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How do I uninstall iOS App via command line?
Hi tvu,
In order to uninstall the application from your device you have to use the Instrumentation Wizard in combination with the appid (ai): flag.
The application Id (bundle identifier of the app) is required so that an application can be uninstalled prior to installing the new archive. It can be set to '[auto]' to resolve it automatically during instrumentation.
Since iOS is a very restricted system, it is unfortunately not possible to uninstall the application directly from the command line.Therefore, the following workaround should solve your problem
Use the Ranorex.Instrumentation Wizard with the following command
"C:\Program Files (x86)\Ranorex 5.4\Bin\Ranorex.Instrumentation.exe" /pagename:ios /devicename:"YOURDEVICE" /deploymode:Usb /inputpath:"PATH_TO_INSTRUMENTED_IPA" /keypath:"PATH_TO_P12_FILE" /password:"PASSWORD_FOR_P12_FILE" /provisionpath:"PATH_TO_mobileprovision" /appid:"APP_ID" /skipinstrumentation:true
This will uninstall the old version of your application and install the new (already instrumented) version. There is no need to instrument the application in every iteration if you set the /skipinstrumentation to true.
Hope this helps.
Regards,
Markus (S)
In order to uninstall the application from your device you have to use the Instrumentation Wizard in combination with the appid (ai): flag.
The application Id (bundle identifier of the app) is required so that an application can be uninstalled prior to installing the new archive. It can be set to '[auto]' to resolve it automatically during instrumentation.
Since iOS is a very restricted system, it is unfortunately not possible to uninstall the application directly from the command line.Therefore, the following workaround should solve your problem
Use the Ranorex.Instrumentation Wizard with the following command
"C:\Program Files (x86)\Ranorex 5.4\Bin\Ranorex.Instrumentation.exe" /pagename:ios /devicename:"YOURDEVICE" /deploymode:Usb /inputpath:"PATH_TO_INSTRUMENTED_IPA" /keypath:"PATH_TO_P12_FILE" /password:"PASSWORD_FOR_P12_FILE" /provisionpath:"PATH_TO_mobileprovision" /appid:"APP_ID" /skipinstrumentation:true
This will uninstall the old version of your application and install the new (already instrumented) version. There is no need to instrument the application in every iteration if you set the /skipinstrumentation to true.
Hope this helps.
Regards,
Markus (S)
Re: How do I uninstall iOS App via command line?
Thanks Markus!
Re: How do I uninstall iOS App via command line?
There seems to be some type of bug with the Instrumentation Wizard. I can not reliably install an instrumented IPA with this method. I've notice that it will delete the app and then says it install the new one when it actually has not.
I found this same issue when I tried to do it in Ranorex Studio. I would instrument and install a new app. During this process, an instrumented IPA file will be created and saved in "\Documents\Ranorex\InstrumentedIpa" directory. I would then delete my app and try to install the instrumented ipa (with the Instrument the App under test option unchecked). The Wizard would tell me it was installed, but it hasn't.
I have however observed that I can reliably instrument and install an IPA if I do it in one step instead of breaking it down into two.
I found this same issue when I tried to do it in Ranorex Studio. I would instrument and install a new app. During this process, an instrumented IPA file will be created and saved in "\Documents\Ranorex\InstrumentedIpa" directory. I would then delete my app and try to install the instrumented ipa (with the Instrument the App under test option unchecked). The Wizard would tell me it was installed, but it hasn't.
I have however observed that I can reliably instrument and install an IPA if I do it in one step instead of breaking it down into two.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How do I uninstall iOS App via command line?
Hi tvu,
Thanks for the feedback, but unfortunately I was not able to reproduce the mentioned behavior.
I've tried this command with several applications on my device and it was removed and installed as expected.
May I ask you which version of Ranorex you are currently using?
Regards,
Markus (S)
Thanks for the feedback, but unfortunately I was not able to reproduce the mentioned behavior.
I've tried this command with several applications on my device and it was removed and installed as expected.
May I ask you which version of Ranorex you are currently using?
Regards,
Markus (S)
Re: How do I uninstall iOS App via command line?
I am using Ranorex 5.4.2.25689.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: How do I uninstall iOS App via command line?
Hi tvu,
Thank you for the information. Since I'm also using 5.4.2 and the command works as expected on my machine, I'd like to ask you to get in touch with us by email to discuss additional steps.
Thank you.
Regards,
Markus (S)
Thank you for the information. Since I'm also using 5.4.2 and the command works as expected on my machine, I'd like to ask you to get in touch with us by email to discuss additional steps.
Thank you.
Regards,
Markus (S)
Re: How do I uninstall iOS App via command line?
The issue I am facing in the link before is stopping me from reproducing the issue. Once that is fix, I will retest this and contact you via email.
http://www.ranorex.com/forum/instrument ... t8610.html
http://www.ranorex.com/forum/instrument ... t8610.html
Re: How do I uninstall iOS App via command line?
I can no longer reproduce this issue. It appears this was related to my other issue I posted here: http://www.ranorex.com/forum/instrument ... t8610.html
Thank you very much for all the help!
Thank you very much for all the help!