Install multiple ipa/app in iOS device using command line

January 31, 2015

This post explains my quest to achieve a¬†solution for iOS devices, similar to batch install in android. Remember my requirement is to smell and taste the coffee rather than installing 18 apps ( multiply that for every dev release + each test device ) sitting in my desk ūüėČ

I used,

  • libimobiledevice¬†for command line deploy
  • And the below¬†script to uninstall and install the apps found in a folder.
#!/bin/bash
for package in `ideviceinstaller -l | grep -i <your-package> | awk '{print $1}'`
do
echo "Uninstalling $package"
ideviceinstaller -U $package >> log
done
for ipa in `ls *ipa`
do
echo "Installing $ipa"
ideviceinstaller -i $ipa >> log
done


Batch install multiple apks

January 26, 2015

There are often a situation where I need to install not few but 18 apps in android for testing. Innumerous devices supported by different versions of android and the bug fixes which translates into more dev and release builds adds more pain to the situation.

As an avid commandline freak, I used the following small script to batch install the apks found in a directory. To use the script, copy all your apks to a dir along with the script and execute it,

I assume adb and aapt in your path already.

#!/bin/bash
$dir=`pwd`
for i in `ls $dir`
do
aapt dump badging $i | perl -ne 'print $2 if /package: name=(.)(.+?)\1/' | xargs -I{} adb uninstall {}
adb install $i
done

You can replace the contents of the for loop with following if you dont worry about reinstalling apps with existing data.

adb install -r $i