This document discusses various topics related to iOS development including managing shared projects with Xcode, building projects without the Xcode GUI, creating universal binary libraries, deploying projects and libraries for QA testing, unit testing with GHUnit and Hudson, and best practices for project organization and build scripts. It provides instructions on building without Xcode, creating installable .ipa files, combining device and simulator binaries into a universal library, running and collecting unit test results with GHUnit, and defining a common project structure.
1 of 27
More Related Content
Alexander Dodatko «Continuous integration for iOS applications»
2. What's Covered
Managing shared projects with xCode
Building a project without xCode GUI
Creating “universal binary” libraries
Deploying project and libraries for QA
3. More Fun for Developers
Unit testing with GHUnit
Using Hudson build server
( it has a Chuck Norris plug-in )
Running applications on simulator
without xCode
4. A Build server should
Checkout project sources
Run build script
Deploy product archives
Publish test reports
5. A Build Script Should
Build main products
Create *.ipa packages for main products
Build unit tests
Run unit tests with iphonesim
Package *.ipa and *.app entries to *.zip archive
Prepare unit test reports for deployment
12. Creating Universal Binaries
1. Build a library version for the device.
2. Build a library version for the simulator.
3. Combine them to a single binary
4. Deploy universal library to the “frameworks”
directory.
20. How About Unit Testing?
Picking a framework
Running a test
Collecting results
21. Test Frameworks Chart
SenTest Google GHUnit
Xcode integration
+ + ---
UIKit Support
--- --- +
Bundles support
--- --- +
Xml reports
--- --- +
(lack of support
for hudson CI)
Runs on device
+- +- +
( Runtime tests only ) ( Runtime tests only )
Runs on simulator
+- +- +
( logic tests only ) ( logic tests only )
Debugging (out of
box)
--- --- +
UI snapshots
comparing
--- + ---
22. GHUnit Configuration
Add GHUnit.framework
Replace Main.h with the one from GHUnit
Remove “MainNibFile” entry from the info.plits
GHUNIT_AUTORUN
WRITE_JUNIT_XML
GHUNIT_AUTOEXIT
// Not supported in the official GHUNIT
23. Running a Test
iphonesim launch
"$DEPLOYMENT_DIR/CITest.app"
4.2
ipad
NOTE : Use only FULL PATH to the app
as shown above
25. Terminating the Simulator
killall -s -KILL -c "iphonesim"
killall -KILL -c "iphonesim"
killall -s -KILL -c "iPhone Simulator"
killall -KILL -c "iPhone Simulator"
Do it before you run a test app
26. Defining the Project Structure
app
lib
frameworks
scripts
tools
test
certificates
deployment