Preparing Your iOS Application
Before you can upload and start testing your iOS application you need to create the app's package. The process of building and signing an app is quite complex but is not required in our case. To upload, install and test application with seetest.io, all you need to do is build the app with debug configuration, no code signing required (therefore no provisioning profile required).
Building The App
The best way to build the app is through the command line.
Make sure you have XCode Build tools installed before you start.
Getting Info About The App
To get more info about the app and parameters you need to pass to the build command, open the Mac terminal and navigate to the project folder. Run the command:
xcodebuild -list -project <your_project_name>.xcodeproj
The output will usually look like like:
Information about project "<PROJECT_NAME>":
Targets:
<TARGET_NAME>
Build Configuration:
Debug
Release
If no build configuration is specified and -scheme is not passed, then "Release" is used
Schemes:
<SCHEME_NAME>
Example when running command on UICatalog app:
Information about project "UICatalog":
Targets:
UICatalog
Build Configuration:
Debug
Release
If no build configuration is specified and -scheme is not passed, then "Release" is used
Schemes:
UICatalog
Building The App
When you are ready to build the app, go ahead and run the command below:
xcodebuild -target <TARGET_NAME> -configuration Debug -destination 'platform=iOS, OS=9.1' CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
Parameter Breakdown:
-
target - the target app as listed in the information we got from the xcodebuild -list -project command.
-
configuration - Debug as we intend to test and debug the app, not release it.
-
destination - the destined platform for the app. Apple has several platforms such as iOS, MacOS, tvOS etc.
- platform - in our case, iOS
- OS - the minimum OS version that can handle the app
-
CODE_SIGN_IDENTITY - should be an empty string as we are not signing the app
-
CODE_SIGNING_REQUIRED - should be NO as we are not signing the app
Packaging The App
Once the build is complete, navigate in the terminal to the build folder to locate the app.
cd build/Debug-iphoneos
Once inside the Debug-iphoneos folder, locate the file that ends with .app. Then create a script.sh file with the following script:
#!/bin/bash
if [ -d "Payload" ]; then
rm -fr Payload/*
else
mkdir Payload
fi # if you'd rather copy the .app file, then replace the next line with:
# cp -r $1 Payload
mv $1 Payload
zip -r $2.ipa Payload
rm -fr Payload
Save the file and in the terminal run the command:
script.sh your_app.app the_app_name
#(there is no need to add .ipa to the second parameter)
You will then have an file with the extension .ipa. Upload this file to the cloud.