Successfully reported this slideshow.

Advanced App Building - Tips, Tricks & Lessons Learned

0

Share

Loading in …3
×
1 of 83
1 of 83

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Related Audiobooks

Free with a 14 day trial from Scribd

See all

Advanced App Building - Tips, Tricks & Lessons Learned

  1. 1. Advanced App Building Tips, Tricks & Lessons Learned Wednesday, February 6, 13
  2. 2. Jay Graves CTO Wednesday, February 6, 13
  3. 3. Lots of Apps Wednesday, February 6, 13
  4. 4. Ship It Wednesday, February 6, 13
  5. 5. Ship It Wednesday, February 6, 13
  6. 6. Provisioning Profiles Wednesday, February 6, 13
  7. 7. Provisioning Profiles How do they work? Wednesday, February 6, 13
  8. 8. Provisioning Profiles What are they? SMIME / PKCS#7 Originally designed for email signing & encryption. Wednesday, February 6, 13
  9. 9. Read a Provisioning Profile vim Wednesday, February 6, 13
  10. 10. Read a Provisioning Profile openssl openssl smime -in ./your.mobileprovision -inform der -verify openssl smime -in /path/to/your.mobileprovision -inform der -verify -noverify https://skabber.snipt.net/provisioning-profile-tips-tricks/ Wednesday, February 6, 13
  11. 11. Important Values application-identifier <key>application-identifier</key> <string>ABCDEFGHIJK.com.your.bundleid</string> Wednesday, February 6, 13
  12. 12. Important Values Entitlements <key>Entitlements</key> <dict> ... <key>com.apple.developer.ubiquity-container- identifiers</key> ... <key>com.apple.developer.ubiquity-kvstore- identifier</key> ... <key>get-task-allow</key> ... </dict> Wednesday, February 6, 13
  13. 13. Important Values ProvisionedDevices <key>ProvisionedDevices</key> <array> <string>7af8ee3af8e4e13193bd834bab50e1d...</string> <string>a9f0d0477a6d3e8dad0ff984f7ba77e...</string> </array> Wednesday, February 6, 13
  14. 14. Important Values UUID <key>UUID</key> <string>E0EF8ACE-E83A-475C-9DA7-C67A147659FD</ string> Wednesday, February 6, 13
  15. 15. Important Values DeveloperCertificates <key>DeveloperCertificates</key> ! <array> ! ! <data> MIIFnDCCBISgAwIBAgIIEIdrqpJlb9MwDQYJKoZIhvcNAQEFBQAwgZYxCzAJ BgNVBAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBs ZSBXb3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBw bGUgV29ybGR3aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlv ... Wednesday, February 6, 13
  16. 16. Important Values DeveloperCertificates -----BEGIN CERTIFICATE----- MIIFnDCCBISgAwIBAgIIEIdrqpJlb9MwDQYJKoZIhvcNAQEFBQAwgZYxCzAJ BgNVBAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBs ZSBXb3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBw bGUgV29ybGR3aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlv ... -----END CERTIFICATE----- Wednesday, February 6, 13
  17. 17. Important Values DeveloperCertificates -----BEGIN CERTIFICATE----- MIIFnDCCBISgAwIBAgIIEIdrqpJlb9MwDQYJKoZIhvcNAQEFBQAwgZYxCzAJ BgNVBAYTAlVTMRMwEQYDVQQKDApBcHBsZSBJbmMuMSwwKgYDVQQLDCNBcHBs ZSBXb3JsZHdpZGUgRGV2ZWxvcGVyIFJlbGF0aW9uczFEMEIGA1UEAww7QXBw bGUgV29ybGR3aWRlIERldmVsb3BlciBSZWxhdGlvbnMgQ2VydGlmaWNhdGlv ... -----END CERTIFICATE----- openssl x509 -text -in cert.pem Wednesday, February 6, 13
  18. 18. Important Values DeveloperCertificates Certificate: Data: Version: 3 (0x2) Serial Number: 10:87:6b:aa:92:65:6f:d3 Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, O=Apple Inc., OU=Apple Worldwide Developer Relations, CN=Apple Worldwide Developer Relations Certification Authority Validity Not Before: Nov 3 21:38:10 2012 GMT Not After : Nov 3 21:38:10 2013 GMT Subject: UID=9K9F9LCV74, CN=iPhone Distribution: Massively Overrated, OU=9K9F9LCV74, O=Massively Overrated, C=US Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (2048 bit) Modulus (2048 bit): 00:c8:57:f9:cf:af:c2:4d:7a:8a:16:62:47:4b:c2: Wednesday, February 6, 13
  19. 19. Install a Provisioning Profile Wednesday, February 6, 13
  20. 20. Install a Provisioning Profile Don’t double click them. Not human readable. Wednesday, February 6, 13
  21. 21. Install a Provisioning Profile Drag them into the Finder ~/Library/MobileDevice/Provisioning Profiles Wednesday, February 6, 13
  22. 22. Install a Provisioning Profile Drag them into the Finder Wednesday, February 6, 13
  23. 23. Install a Provisioning Profile Drag them into the Finder Much better Wednesday, February 6, 13
  24. 24. Tools for using Provisioning Profiles Terminal.app Wednesday, February 6, 13
  25. 25. Tools for using Provisioning Profiles Terminal.app - bash alias alias prov='openssl smime -inform der -verify -in' Wednesday, February 6, 13
  26. 26. Tools for using Provisioning Profiles Quicklook Plugin http://www.macmation.com/blog/2011/10/quicklook-plugin-for-mobile-provision-files/ Wednesday, February 6, 13
  27. 27. Tools for using Provisioning Profiles Automator Service Wednesday, February 6, 13
  28. 28. Tools for using Provisioning Profiles Automator Service http://cl.ly/MTZb Wednesday, February 6, 13
  29. 29. Tools for using Provisioning Profiles Automator Service Wednesday, February 6, 13
  30. 30. Xcode Wednesday, February 6, 13
  31. 31. Xcode How does it see profiles? Wednesday, February 6, 13
  32. 32. Xcode How does it see profiles? CODE_SIGN_IDENTITY = "iPhone Developer"; Wednesday, February 6, 13
  33. 33. Xcode How does it see profiles? CODE_SIGN_IDENTITY = "iPhone Developer"; PROVISIONING_PROFILE = ""; Wednesday, February 6, 13
  34. 34. Xcode How does it see profiles? Wednesday, February 6, 13
  35. 35. Xcode How does it see profiles? CODE_SIGN_IDENTITY = "iPhone Developer: Jay Graves (E6L876QFM6)"; Wednesday, February 6, 13
  36. 36. Xcode How does it see profiles? CODE_SIGN_IDENTITY = "iPhone Developer: Jay Graves (E6L876QFM6)"; PROVISIONING_PROFILE = "0FEB5831-22D3-4B1D-A973-59ED243E8103"; Wednesday, February 6, 13
  37. 37. Xcode Build error Wednesday, February 6, 13
  38. 38. Xcode Build error Wednesday, February 6, 13
  39. 39. Xcode Update the profile. Wednesday, February 6, 13
  40. 40. Xcode Update the profile. Wednesday, February 6, 13
  41. 41. Xcode Project Diff Wednesday, February 6, 13
  42. 42. What does all this mean? Wednesday, February 6, 13
  43. 43. What does all this mean? •Automatic Profiles •Good if you don’t have multiple projects. •It can select the wrong profile. •Rules on automatic selection are not defined. Wednesday, February 6, 13
  44. 44. What does all this mean? •Automatic Profiles •Good if you don’t have multiple projects. •It can select the wrong profile. •Rules on automatic selection are not defined. •Specific Profiles •Much more control over which profile is selected. •Can be a pain to update the project file every time a profile is updated. Wednesday, February 6, 13
  45. 45. Wednesday, February 6, 13
  46. 46. Wednesday, February 6, 13
  47. 47. Scenario Wednesday, February 6, 13
  48. 48. Scenario 1 Project 2 Builds Wednesday, February 6, 13
  49. 49. Multiple Build Scenario Possible Solutions Wednesday, February 6, 13
  50. 50. Multiple Build Scenario Possible Solutions •Add a Duplicate Target Wednesday, February 6, 13
  51. 51. Multiple Build Scenario Possible Solutions •Add a Duplicate Target •Large project file change Wednesday, February 6, 13
  52. 52. Multiple Build Scenario Possible Solutions •Add a Duplicate Target •Large project file change •Duplicated all of the Configurations Wednesday, February 6, 13
  53. 53. Multiple Build Scenario Possible Solutions •Add a Duplicate Target •Large project file change •Duplicated all of the Configurations •A 2nd info.plist has been created. Wednesday, February 6, 13
  54. 54. Multiple Build Scenario Possible Solutions •Add a Duplicate Target •Large project file change •Duplicated all of the Configurations •A 2nd info.plist has been created. Wednesday, February 6, 13
  55. 55. Multiple Build Scenario Possible Solutions •Add a Duplicate Target •Large project file change •Duplicated all of the Configurations •A 2nd info.plist has been created. • Add a new Configuration Wednesday, February 6, 13
  56. 56. Multiple Build Scenario Possible Solutions •Add a Duplicate Target •Large project file change •Duplicated all of the Configurations •A 2nd info.plist has been created. • Add a new Configuration •Still a large project file change Wednesday, February 6, 13
  57. 57. Multiple Build Scenario Possible Solutions •Add a Duplicate Target •Large project file change •Duplicated all of the Configurations •A 2nd info.plist has been created. • Add a new Configuration •Still a large project file change •Still duplicated all the build options Wednesday, February 6, 13
  58. 58. Multiple Build Scenario Possible Solutions •Add a Duplicate Target •Large project file change •Duplicated all of the Configurations •A 2nd info.plist has been created. • Add a new Configuration •Still a large project file change •Still duplicated all the build options •Easy to forget new build options Wednesday, February 6, 13
  59. 59. Multiple Build Scenario A better solution Wednesday, February 6, 13
  60. 60. Multiple Build Scenario A better solution .xcconfig file Wednesday, February 6, 13
  61. 61. Multiple Build Scenario Create a .xcconfig file Wednesday, February 6, 13
  62. 62. Multiple Build Scenario Create a .xcconfig file CODE_SIGN_IDENTITY = iPhone Distribution: Double Encore PROVISIONING_PROFILE = 1203C18-8F08-45D8-A5AC-76AD9319CDDC Wednesday, February 6, 13
  63. 63. Multiple Build Scenario Build with a .xcconfig file xcodebuild -xcconfig second_build.xcconfig Wednesday, February 6, 13
  64. 64. Surprise? Wednesday, February 6, 13
  65. 65. Surprise? Wednesday, February 6, 13
  66. 66. Surprise? Wednesday, February 6, 13
  67. 67. Surprise? Wednesday, February 6, 13
  68. 68. Surprise? Wednesday, February 6, 13
  69. 69. OK, OK, Enough with the Provisioning Profiles already. Wednesday, February 6, 13
  70. 70. Keychain Access Wednesday, February 6, 13
  71. 71. Multiple Keychains Wednesday, February 6, 13
  72. 72. Switch Keychains unlock keychain security default-keychain -d user -s /FULLPATH/My.keychain security unlock-keychain -p ******* /FULLPATH/My.keychain Wednesday, February 6, 13
  73. 73. Switch Keychains unlock keychain Error: User interaction is not allowed. Wednesday, February 6, 13
  74. 74. Switch Keychains unlock keychain Wednesday, February 6, 13
  75. 75. Wednesday, February 6, 13
  76. 76. OTA Install Wednesday, February 6, 13
  77. 77. md5 checksum Wednesday, February 6, 13
  78. 78. md5 checksum doesn’t work Wednesday, February 6, 13
  79. 79. md5 checksum doesn’t work Wednesday, February 6, 13
  80. 80. Install multiple apps at the same time Wednesday, February 6, 13
  81. 81. Install multiple apps at the same time Wednesday, February 6, 13
  82. 82. Install multiple apps at the same time Wednesday, February 6, 13
  83. 83. Thank You jay@doubleencore.com @skabber Wednesday, February 6, 13

×