Alexander Dodatko «Continuous integration for iOS applications»

3,452 views

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,452
On SlideShare
0
From Embeds
0
Number of Embeds
1,167
Actions
Shares
0
Downloads
17
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Alexander Dodatko «Continuous integration for iOS applications»

  1. 1. Whats CoveredManaging shared projects with xCodeBuilding a project without xCode GUICreating “universal binary” librariesDeploying project and libraries for QA
  2. 2. 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
  3. 3. A Build server shouldCheckout project sourcesRun build scriptDeploy product archivesPublish test reports
  4. 4. A Build Script ShouldBuild main productsCreate *.ipa packages for main productsBuild unit testsRun unit tests with iphonesimPackage *.ipa and *.app entries to *.zip archivePrepare unit test reports for deployment
  5. 5. “Commonly Used” Project Organization
  6. 6. Wrong !!!
  7. 7. ONE Product, ONE XCODE PROJECT
  8. 8. Library Project How-To
  9. 9. Library Project How-To
  10. 10. Setting up Dependencies
  11. 11. Creating Universal Binaries1. Build a library version for the device.2. Build a library version for the simulator.3. Combine them to a single binary4. Deploy universal library to the “frameworks”directory.
  12. 12. Combining Binarieslipo -create"${LIB_BUILD_DIR}/Release-iphoneos/libCITest_Model_Universal.a""${LIB_BUILD_DIR}/Release-iphonesimulator/libCITest_Model_Universal.a"-output "../frameworks/CITest-Model-Universal/Lib/libCITest_Model_Universal.a"
  13. 13. Deployment : Desktop vs. Mobile
  14. 14. Desktop Applications *.app +
  15. 15. iOS Applications QA? *.ipa ?
  16. 16. Mobile QA *.ipa
  17. 17. Building Without xCode GUIxcodebuild -project CITest.xcodeproj-sdk iphonesimulator4.3-configuration Release-target CITest-parallelizeTargetsclean build
  18. 18. Creating Installable *.ipa File /usr/bin/xcrun -sdk iphoneos PackageApplication -v "${BUILD_DIR}/Release-iphoneos/CITest.app" -o "${DEPLOYMENT_DIR}/CITest.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}"DEVELOPER_NAME="iPhone Developer: Oleksandr Dodatko (ABCDEFG123456)"
  19. 19. How About Unit Testing?Picking a frameworkRunning a testCollecting results
  20. 20. Test Frameworks Chart SenTest Google GHUnitXcode 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 ofbox) --- --- +UI snapshotscomparing --- + ---
  21. 21. GHUnit ConfigurationAdd GHUnit.frameworkReplace Main.h with the one from GHUnitRemove “MainNibFile” entry from the info.plitsGHUNIT_AUTORUNWRITE_JUNIT_XMLGHUNIT_AUTOEXIT// Not supported in the official GHUNIT
  22. 22. Running a Testiphonesim launch"$DEPLOYMENT_DIR/CITest.app"4.2ipadNOTE : Use only FULL PATH to the app as shown above
  23. 23. Collecting Test ResultsTEMP_DIR=$(/usr/bin/getconf DARWIN_USER_TEMP_DIR)All Test results are here :$TEMP_DIR/test-results
  24. 24. Terminating the Simulatorkillall -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
  25. 25. Defining the Project Structure app lib frameworks scripts tools test certificates deployment
  26. 26. ContactsEPAM systems (Dnipropetrovsk) http://www.epam.com/Github page : https://github.com/EmbeddedSourceshttps://github.com/EmbeddedSources/iOS-articleshttps://github.com/dodikk/iContiniousIntegrationOleksandr Dodatkomail/jabber : dodikk88.reg@gmail.comSkype : alexander.dodatko.work@skype.comGithub page : https://github.com/dodikk

×