CI for projects
sharing code
Mani Ramezan
@maniramezan
Slide 2
Slide 2 text
No content
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
Agenda
• About me
• Project structure
• Challenges with code-signing
• Some solutions and lessons learnt
• What will try different next time
Slide 5
Slide 5 text
About me
Written Mani, pronounced Maani
Slide 6
Slide 6 text
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
Slide 7
Slide 7 text
#embracethenotch
Slide 8
Slide 8 text
Venuenext
• Similar to ReactNative approach
• All native and in Objective-C
• CI setup using CircleCI, CI script to make the build
Config file
Project structure
• One workspace, several subproject, 20+ targets
• Different Apple accounts
• Support both Enterprise and App Store builds
• All Objective-C using Swift libraries
Slide 11
Slide 11 text
Challenges
• Manage code-signing for multiple accounts
• Build script was built to handle only one client
• Versioning applications
• Manual code signing
Slide 12
Slide 12 text
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
Slide 13
Slide 13 text
Versioning
• Use one tag to version all applications, e.i. v4.14
• Support overriding default versioning
• Automate tagging and creating release branch
Slide 14
Slide 14 text
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
Slide 15
Slide 15 text
Disable Apple Pay
• Enterprise build doesn’t support Pay
• Need to update entitlement based on build type
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
Slide 18
Slide 18 text
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
Slide 19
Slide 19 text
Xcode 9
• Add support for automatic code signing
• -allowProvisioningUpdates
-allowProvisioningDeviceRegistration
• https://developer.apple.com/videos/play/wwdc2017/403/
Slide 20
Slide 20 text
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