Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS Professional Practices

iOS Professional Practices

On MOW2011 I gave a general introduction to iOS app development, on MOW2012 we are going for the up-to-11 hard-core professional development tips, tricks and so far never heard of secrets:
- data synchronisation between a number of different server backends and the local storage in the iOS app.
- unit testing iOS apps
- automated build and deployment
- developing apps that support both old and new iOS versions
- defining and verifying battery management strategies
- catching and recording app crashes in beta and in the field
- defining and verifying minimal memory consuption strategies
- Limbo-ing under the 20Mb app size limit

Uffe Overgaard Koch

April 20, 2012
Tweet

More Decks by Uffe Overgaard Koch

Other Decks in Programming

Transcript

  1. ASSERT MACROS • STFail • STAssertTrue • STAssertEquals • STAssertEqualsWithAccuracy

    • STAssertNotNil • STAssertEqualObjects • STAssertNoThrow
  2. Test Suite '/Users/uffe/Library/Developer/Xcode/DerivedData/damco-fbpbbvmjpsvwumgxshqoqkdcigui/Build/Products/Debug-iphonesimulator/ damcoTests.octest(Tests)' started at 2012-04-19 09:12:33 +0000 Test

    Suite 'DCSearchManagerTests' started at 2012-04-19 09:12:33 +0000 Test Case '-[DCSearchManagerTests testCBLbyCBLReference]' started. Test Case '-[DCSearchManagerTests testCBLbyCBLReference]' passed (0.003 seconds). Test Case '-[DCSearchManagerTests testContainerByEquipmentNumberArray]' started. Test Case '-[DCSearchManagerTests testContainerByEquipmentNumberArray]' passed (0.003 seconds). Test Case '-[DCSearchManagerTests testContainerFields]' started. Test Case '-[DCSearchManagerTests testContainerFields]' passed (0.002 seconds). Test Case '-[DCSearchManagerTests testsearch_bkk0231421]' started. Test Case '-[DCSearchManagerTests testsearch_bkk0231421]' passed (0.001 seconds). Test Suite 'DCSearchManagerTests' finished at 2012-04-19 09:12:33 +0000. Executed 13 tests, with 0 failures (0 unexpected) in 0.034 (0.040) seconds Test Suite 'containerByEquipmentNumberTests' started at 2012-04-19 09:12:33 +0000 Test Case '-[containerByEquipmentNumberTests testBuildDictionary]' started. Test Case '-[containerByEquipmentNumberTests testBuildDictionary]' passed (0.001 seconds). Test Case '-[containerByEquipmentNumberTests testParsingForTableHeads]' started. Test Case '-[containerByEquipmentNumberTests testParsingForTableHeads]' passed (0.000 seconds). Test Case '-[containerByEquipmentNumberTests testParsingForTableRows]' started. Test Case '-[containerByEquipmentNumberTests testParsingForTableRows]' passed (0.001 seconds). Test Case '-[containerByEquipmentNumberTests testParsingForTableRowsXpath]' started. Test Case '-[containerByEquipmentNumberTests testParsingForTableRowsXpath]' passed (0.001 seconds). Test Case '-[containerByEquipmentNumberTests testParsingForTitle]' started. Test Case '-[containerByEquipmentNumberTests testParsingForTitle]' passed (0.000 seconds). Test Suite 'containerByEquipmentNumberTests' finished at 2012-04-19 09:12:33 +0000. Executed 5 tests, with 0 failures (0 unexpected) in 0.004 (0.005) seconds Test Suite 'containerDetailsTests' started at 2012-04-19 09:12:33 +0000 Test Case '-[containerDetailsTests testContainerDetailFields]' started. Test Case '-[containerDetailsTests testContainerDetailFields]' passed (0.001 seconds). Test Case '-[containerDetailsTests testFindTitle]' started. Test Case '-[containerDetailsTests testFindTitle]' passed (0.000 seconds). Test Suite 'containerDetailsTests' finished at 2012-04-19 09:12:33 +0000. Executed 2 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds Test Suite 'damco_parserTests' started at 2012-04-19 09:12:33 +0000 Test Case '-[damco_parserTests testInvalidXml]' started. Entity: line 2: parser error : Extra content at the end of the document "text/xsl" href="spot.xsl"?><application><rootpage>spot</rootpage></application> ^ Test Case '-[damco_parserTests testInvalidXml]' passed (0.000 seconds). Test Case '-[damco_parserTests testValidXml]' started. Test Case '-[damco_parserTests testValidXml]' passed (0.000 seconds). Test Suite 'damco_parserTests' finished at 2012-04-19 09:12:33 +0000. Executed 2 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds Test Suite 'searchOverviewTests' started at 2012-04-19 09:12:33 +0000 Test Case '-[searchOverviewTests testCBLbyCBLReference]' started. Test Case '-[searchOverviewTests testCBLbyCBLReference]' passed (0.001 seconds). Test Case '-[searchOverviewTests testContainerbyCSNumber]' started. Test Case '-[searchOverviewTests testContainerbyCSNumber]' passed (0.000 seconds). Test Case '-[searchOverviewTests testHBLbyHBLNumber]' started. Test Case '-[searchOverviewTests testHBLbyHBLNumber]' passed (0.000 seconds). Test Case '-[searchOverviewTests testParsingForSecTitle]' started. Test Case '-[searchOverviewTests testParsingForSecTitle]' passed (0.000 seconds). Test Suite 'searchOverviewTests' finished at 2012-04-19 09:12:33 +0000. Executed 4 tests, with 0 failures (0 unexpected) in 0.002 (0.002) seconds Test Suite '/Users/uffe/Library/Developer/Xcode/DerivedData/damco-fbpbbvmjpsvwumgxshqoqkdcigui/Build/Products/Debug-iphonesimulator/ damcoTests.octest(Tests)' finished at 2012-04-19 09:12:33 +0000. Executed 26 tests, with 0 failures (0 unexpected) in 0.042 (0.052) seconds
  3. Identifier: com.vestas.vpm Date/Time: 2012-04-18 06:16:33 +0000 OS Version: iPhone OS

    4.3.5 Exception Type: SIGTRAP Exception Codes: #0 at 0x33bb300c Application Specific Information: *** Terminating app due to uncaught exception \\\'NSInternalInconsistencyException\\\', reason: \\\'Invalid update: invalid number of rows in section 2. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (1), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted).\\\' Thread 0 Crashed: 0 libsystem_kernel.dylib 0x33bb300c 0x33ba2000 + 69644 1 libsystem_c.dylib 0x35197f95 0x35185000 + 77717 2 VestasVPM 0x000ca649 uncaught_exception_handler (PLCrashReporter.m:137) 3 CoreFoundation 0x33b547d3 0x33ab6000 + 649171 4 libobjc.A.dylib 0x3604906b 0x36043000 + 24683 5 libstdc++.6.dylib 0x3334fe3d 0x3330d000 + 273981 6 libstdc++.6.dylib 0x3334fe91 0x3330d000 + 274065 7 libstdc++.6.dylib 0x3334ff05 0x3330d000 + 274181 8 libobjc.A.dylib 0x36048fe1 0x36043000 + 24545 9 CoreData 0x35341135 0x3530a000 + 225589 10 CoreData 0x3530c58b 0x3530a000 + 9611 11 VestasVPM 0x000032b3 -[VPMAppDelegate loginSucces:] (VPMAppDelegate.m:65) 12 VestasVPM 0x00004e0b -[LoginViewController onGetUserTypeReceived:result:] (LoginViewController.m:115) 13 VestasVPM 0x0001d249 -[PerformanceManagerAsync onGetUserTypeReceived:] (VPM.m:3087) 14 CoreFoundation 0x33ac1f03 0x33ab6000 + 48899 15 VestasVPM 0x00007195 -[SoapWebService
  4. DATA SYNCHRONISATION BETWEEN SERVER BACKENDS AND IOS APPS REST SOAP

    ... JSON XML CSV YAML OGDL ... MKNetworkKit ASIHTTP AFNetworking RESTKit NSURLRequest ... Core Data SQLite files NSUserDefaults KeyValue- Archiving ...
  5. DATA SYNCHRONISATION BETWEEN SERVER BACKENDS AND IOS APPS REST SOAP

    ... JSON XML CSV YAML OGDL ... MKNetworkKit ASIHTTP AFNetworking RESTKit NSURLRequest ... Core Data SQLite files NSUserDefaults KeyValue- Archiving ...