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

CI for projects sharing code

CI for projects sharing code

In my previous company, number of clients we were managing grew from couple to more than ten, all included in one project as separate targets. As a result, setting up a CI system and coming up with a convention to handle Apple developer accounts and app submissions for those clients became a priority. This talk is about the lessons we learned and the best practices we came up with during this process and how we managed code signing and certifications and made peace with "Automatic code signing".

Mani Ramezan

May 21, 2018
Tweet

More Decks by Mani Ramezan

Other Decks in Programming

Transcript

  1. Agenda • About me • Project structure • Challenges with

    code-signing • Some solutions and lessons learnt • What will try different next time
  2. About me • Started Programming with .NET 2.0, ASP.NET, and

    MS SQL • Started iOS development 5 years ago at Pearson
 • Join Venuenext, where I learnt Android and CI for the first time • Senior Mobile Engineer at Zocdoc
  3. Venuenext • Similar to ReactNative approach • All native and

    in Objective-C • CI setup using CircleCI, CI script to make the build Config file
  4. Project structure • One workspace, several subproject, 20+ targets •

    Different Apple accounts • Support both Enterprise and App Store builds • All Objective-C using Swift libraries
  5. Challenges • Manage code-signing for multiple accounts • Build script

    was built to handle only one client • Versioning applications • Manual code signing
  6. Follow best practices • Use one shared account • Automate

    as much as possible • Color coding and logging step in CI script • Always support both local and CI • Always archive and then extract the ipa
  7. Versioning • Use one tag to version all applications, e.i.

    v4.14 • Support overriding default versioning • Automate tagging and creating release branch
  8. Strip Frameworks • Strip submodule projects’ frameworks • Code signing

    each frameworks • Many ways to solve this issue, here’s ours
 https://github.com/maniramezan/usefullScripts/blob/ master/ios_strip_frameworks.sh
  9. Disable Apple Pay • Enterprise build doesn’t support  Pay

    • Need to update entitlement based on build type
  10. Fun with Xcode • What's New in Xcode App Signing

    (WWDC 2016, session 401) • Fun with Code Signing in Xcode 8
 https://medium.com/@maniramezan/manual-code- signing-59dbdbc0543c
  11. Validate ipa file • Validate the build before uploading to

    Apple • Everybody is notified when new build is rejected • atool https://stackoverflow.com/a/34089618/1450348
  12. Xcode 9 • Add support for automatic code signing •

    -allowProvisioningUpdates
 -allowProvisioningDeviceRegistration • https://developer.apple.com/videos/play/wwdc2017/403/
  13. Lessons Learnt • Be able to run locally • Python

    or Ruby would be better choices (?) • It’s ok to say NO • Automate everything • Separate repositories for each client