One of our Mobile App customers had mentioned what a challenge it is to distribute iOS apps for Beta testing and as an going commitment to supporting iOS app testing we have come up with a simple solution to this problem. To understand this challenge you have to understand that today if an iOS app developer wants to have his app used before publishing to the Apple store he has only 2 known options:
1) Distribute the app using Apple’s Ad-Hoc mechanism: Though the registration process is straight-forward, it still involves a compile and distribution for the initial set of devices and this whole process is repeated for every new device that is used in the testing process. So if you want to test on the new iPad 3, guess what… Yes you have to register, recompile, redistribute to get that app on your new iPad. Also, using the Ad-Hoc distribution means that someone in the Dev/QA department has to pony up the funds to buy each tester an iPad which is great for the tester but might trigger some budgetary alarms. Hey, don’t forget that you need to test your app on devices running different versions of the iOS. See the problem!
2) Share the source code for a recompile: This limits the flexibility of the developer. I don’t believe beta testers should be compiling code because it is error prone and could involve directory path issues and finally you may not want to share your source code.
Here’s where emulator based testing becomes very useful (assuming the testers have access to Macs with Xcode). Developers can compile their application and share it with their test team for testing without requiring any additional registration or encountering a cap on the number of devices that are registered. Best of all the testers can choose the device and the iOS SDK emulate for testing. Here is the 10 minute process for doing this:
Step 1: Get your app ready to distribute
1) Create the APP file
- Open the Xcode project
- Under build settings/deployment change the Skip Install to “no” for both release and debug
2) Under the Product Menu, build the target app for Running
3) View the scheme for this target
4) Look at the scheme entries
Remember what build configuration exists in the “Run” entry in the tab on the left. This helps determine the location of the APP file.
5) Find the build dir for the project
The base directory for the build file location is set in the project settings for the project. Open the settings and look at the derived data location. Your app file will exist in that dir.
• If the build setting is set to Release the APP file will exist in [base dir]/[Release-iphonesimulator]
• If the build setting is set to Debug the APP file will exist in [base dir]/[Debug-iphonesimulator]
• NOTE: New app builds in Xcode have an additional build directory so the directory would be [base dir]/[GUID]/build/[Release-iphonesimulator] or [base dir]/[GUID]/build/[Debug-iphonesimulator]
http://stackoverflow.com/questions/5331270/why-doesnt-xcode-4-create-any-products
6) Distribute the APP files
Step 2: Running Your App On Another Computer/Emulator
1) Copy the app to a location on your Mac
1 2 |
# example cp ~/Downloads/iWebDriver.* ~/[app dir] |
2) Install Sim_Launcher via Terminal
1 2 |
# Code example $ gem install sim_launcher |
3) Launch sim_launcher via Terminal
1 |
$ sim_launcher |
4) Open your app by inputting this URL into browser
http://[HOST]:[PORT]/[launch_[DEVICE]_app?[SDK]&app_path=[APP_PATH]
HOST= localhost if running on single computer
PORT= 8881
DEVICE = ’ipad’ or ‘iphone’
SDK = iOS SDK to run under
APP_PATH = Full path to app
Example: http://localhost:8881/launch_iphone_app?sdk=5.0&app_path=/Users/irschick/app/TheElements.app
Example: http://localhost:8881/launch_ipad_app?sdk=5.0&app_path=/Users/irschick/app/TheElements.app
Example: http://localhost:8881/launch_ipad_app?sdk=5.1&app_path=/Users/irschick/app/AngryBirds.app
Requirements to run your distributed app
- Xcode 4.3.x
- Rubygems
- Ruby >=1.8.7
- Have an SDK equal to source Xcode
Links:
https://github.com/landonf/simlaunch/
https://rubygems.org/gems/sim_launcher