Continous Integration for iOS Projects

23
Continuos Delivery for iOS Projects

Transcript of Continous Integration for iOS Projects

Page 1: Continous Integration for iOS Projects

Continuos Delivery for

iOS Projects

Page 2: Continous Integration for iOS Projects
Page 3: Continous Integration for iOS Projects

With a commit.

How does continuos delivery begin?

Page 4: Continous Integration for iOS Projects

Continuos Delivery

How does that translate for your iOS project?

• “We cannot release now - our lead developer is on vacation.”

• “We’ll have to wait for marketing to update the screenshots”

• “Sorry, I forgot to add your device to the provisioning profile.”

• “We’ll release this fix with the next build… next year”

Page 5: Continous Integration for iOS Projects

Your usual release day

Unit testing

Automation testing

Build the app

Update provisioning profiles

Update push notification

certificates

Create new

screenshots Update release notes

Check if the certificates are valid

Signing issues!!!!!!!!Beta testing F&@#!!!!

Page 6: Continous Integration for iOS Projects

If it's complicated… simplify

• Your CI server usually had to contain a lot of tools:

• xctool

• PMD

• Slather

• oclint

• gcovr

• Hockey app, Crashlitycs, Testflight plugins

• Cocoapods or Carthage installed

• Keychain plugin

• Slack or HipChat plugin

Page 7: Continous Integration for iOS Projects

If it's complicated… simplify

• … and a lot of scripts:

xcodebuild clean archive -archivePath build/MyApp \

-scheme MyApp

xcodebuild -exportArchive \

-exportFormat ipa \

-archivePath "build/MyApp.xcarchive" \

-exportPath "build/MyApp.ipa" \

-exportProvisioningProfile

"ProvisioningProfileName"

Page 8: Continous Integration for iOS Projects

fastlane

• Automates your release process

• Connect all build tools together

• Define multiple lanes for different release needs

• Third party integrations

• Extendable

• 100% open-source

Page 9: Continous Integration for iOS Projects

Meet the fastlane family

Page 10: Continous Integration for iOS Projects

fastlane

• Configure a Gymfile

scheme "Example"

sdk "iphoneos9.0"

clean true

output_directory "./build"

output_name "MyApp"

• Build

gym

Page 11: Continous Integration for iOS Projects

fastlane

• Creates certificates for you

• You will still need to store your

private key

Page 12: Continous Integration for iOS Projects

fastlane

• Downloads and updates your

provisioning profiles

• You can specify which one

(development, ad hoc, app store)

Page 13: Continous Integration for iOS Projects

fastlane

• Updates your Push Notifications

certificates

• You can specify which one

• You can set a custom password for

them

Page 14: Continous Integration for iOS Projects

fastlane

• Runs your tests

• You can specify the output

• Generates reports for you

Page 15: Continous Integration for iOS Projects

fastlane

• Generates screenshots for you

• Based on UI Automation tests

• Multiple localizations

• Multiple devices

Page 16: Continous Integration for iOS Projects

fastlane

• Create beautiful marketing

images in no time!

• Adds the generated image from

snapshot into a labeled frame

Page 17: Continous Integration for iOS Projects

fastlane

• Creates the app in iTunes

Connect for you

Page 18: Continous Integration for iOS Projects

fastlane

• Create a Deliver file

• Takes care of the release for

you

Page 19: Continous Integration for iOS Projects

Third party integrations

Page 20: Continous Integration for iOS Projects

Your release day from now

onlane :appstore do

increment_build_number

cocoapods

xctool

snapshot

sigh

deliver

sh "./customScript.sh"

slack

end

Page 21: Continous Integration for iOS Projects

–Dee Dee, Dexter’s Laboratory

“What does this button do?”

Page 22: Continous Integration for iOS Projects

Any questions?

Page 23: Continous Integration for iOS Projects

Thank you!