Creating iOS App Package¶
Regardless of whether testing with XCTest or XCUITest, the application under test needs to be built and imported to Bitbar Testing cloud. The below steps present how to create the appropriate Ad Hoc Distribution IPA build.
Create Test IPA¶
This guide has been tested with Xcode8. First the application needs to be built for testing. In Xcode Product menu select Build for and then Testing.
The application still needs to be packaged into an IPA zip. For this the location of the app is needed. In Xcode select the built .app, right click and select Show it in Finder.
In Finder right click the .app file and copy its location for later use. This location does not change from build to build so this step needs to be done only once.
The IPA package needed for XCTests in Bitbar Testing is a zip package and its creation can be automated and made part of a CI integration. Open a terminal and create the IPA.
$ mkdir /tmp/Payload $ cd /tmp/Payload $ cp -r /Users/username/Desktop/Build/Products/Debug-iphoneos/LocalizationDemo.app . # app path can be pasted $ cd .. $ zip --symlinks -qr "LocalizationDemo.ipa" Payload $ ls -lrt LocalizationDemo.ipa -rw-r--r-- 1 username staff 0 Dec 16 12:42 LocalizationDemo.ipa
The easiest way to validate your build is using Bitbar AppCrawler run.
- Create an IOS UI Automation project
- Upload ipa
- Select appcrawler test
- Pick the device(s)
Symbolication is the process of translating iOS application crash logs to a human readable file using the dSYM file. dSYM or “debug symbols file” is a file generated during build of the application when the Strip Debug Symbols setting in Xcode is set to true. Without the dSYM file, any crash logs generated by a failing application will be unreadable by end users. If the dSYM file is part of the uploaded application package, then Bitbar automatically processes the crash logs for the following frameworks: iOS XCUITEST, iOS Appium Client Side, iOS Appium Server Side.
The crash report is collected from the iOS device, it is symbolicated and sent to Bitbar cloud - where it is made available via UI or API as file named symbolicated.crash.
Good to Know¶
If building for iPhone 5 or iPhone 5C (having Armv7 32 bit processor)
devices then an additional step is needed before creating the build.
Starting from Xcode7 onwards armv7s is no more part of the
$(ARCHS_STANDARD) and so should be added as target build
By default Xcode8 builds apps against the latest available iOS (10.2 at the time of writing). For testing against devices running previous iOS versions the app and the tests need to be built for these separately.
First the project level Deployment Target needs to be set to 9.3.
Then the same needs to be done for the app target (Calculator in these example screenshots)
and still for the tests (CalculatorUITests).