Reputation: 706
I want to launch an already installed app on iPhone/iOS simulator without providing .app or .zip path. Since I do not have those files with me now. Is it possible? Can I launch by just providing bunddle Id. Thanks in advance
Upvotes: 4
Views: 6208
Reputation: 12247
So it sounds like you want to automate playing games on your iPhone to measure the battery usage while an arbitrary game is being played right?
There are many problems that could make this difficult, but one is that whatever tool you use to automatically play the game will consume additional power on the device, you could probably take some baseline measurements to correct for this, but that's additional work. Also like @sheeptest mentioned, most test frameworks require a USB connection to command the device and USB will charge the phone.
Another thing to consider is that batteries, being chemical devices, do wear out over time. Wha you really want to know is how many watts the phone is drawing while playing the game, and then from that you can calculate how long an ideal iPhone battery can power the phone while supplying that many watts. This will be difficult to calculate if you just measure how long the battery lasts due to battery wear.
Here's what I would consider if I had to measure the battery consumption while playing an arbitrary game on an iPhone:
Upvotes: 0
Reputation: 3146
YES! You can pass in the bundleId and it will find the application if it is already installed on the iPhone. You do not need to have the .app or .ipa file if the app is already installed on the device.
Sidenote, it seems you may not have access to another copy of the app....
If you are running on the simulator:
You can find the app in the ~/Library/Application Support/iPhone Simulator/7.1/Applications/
folder. By default, Appium will delete everything in that folder if the --no-reset
flag is not set when you start the Appium server. You should move the .app file to another folder like ~/projects/automation/app
if you do not have another copy of it!
Upvotes: 3
Reputation: 12085
Due to my knowledge only accepts paths to .app files. BUT:
When an *.app is installed on the simulator device it is stored at:
~/Library/Application Support/iPhone Simulator/User/Applications/
So, just pass a link to the .app there will launch the application too.
Upvotes: -1