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

Introducing Relax

Introducing Relax

0e726052fdb28ba1c004aa90eccbe261?s=128

Shin Yamamoto

January 25, 2018
Tweet

Transcript

  1. Introducing Relax - A release tool for Xcode - SCENEE

    2018.1.24 @potatotips #47 1
  2. Overview πЀψϤϕ ΀ͲRelaxΨ֢͹͵΄͡Ҙ​ Relaxͽ֜͢ͽͣΡ΄͡Ҙ Demo Advanced usage 2

  3. iOS App΄Build, Release, SupportΨΘ͹;䮭΁Ѻ Relax's πЀψϤϕ 3

  4. ͩΩ΀ͩ;΅͘ΠΔͱΩ͡Ҙ xcodebuildͽ̵Automatic Signing / Manual Signing΁΅Δ͹͵ xcodebuildͽ΅̵΀Ͳ͡code sign error (Xcodeͽ΅OK)

    IPA΁̵మਧ;吖΀ΡProvisioning Profile͢ف͹ͼ͚Ρ̶΀Ωͽ❓ μ϶αίЀϕ͡Ο̵̿ίϤϷ͢αЀφϕЄϸͽͣ΀͚̀;μϹЄϭ͢ ෛ͚ͭίϤϷϤϺυδμϕͪ;΁̵䶅ࢧݶͮΞ͜΀φμϷϤϕ䨗͚ͼ͚Ρ ϠϸϖϫτЀͽ̵㳨΄Ո͢αЀφϕЄϸͭ͵CertificateͽϠϸϖ͢䃪΢Ρ 4
  5. ίϤϷΨϠϸϖɾᯈ૲ͭ͵͚ Ͷͧ΀΄΁.... 5

  6. ͳͩͽ̵Relax! 6

  7. Relaxͽ֜͢ͽͣΡҘ CodeSignε϶Є΁䘁Δͫ΢Ρͩ;΀̵ͥIPAϢήαϸΨ֢౮ 愢櫏΀ϠϸϖφμϷϤϕӧᥝ YAMLͽ̵ᥝկΨਯ᥺ͯΡͶͧ IPA΄ٖ਻Ψ䭥戣ͽͣΡ My Keychain΁ڔΠ๊͞ͼ̵厏ह΁ׁਂͱͰ΁ϠϸϖͽͣΡ 7

  8. fastlane;΄晅͚΅Ҙ Easy: ϠϸϖϫτЀ΄厏हᓕቘ͢䮭 Go/Bashͽ䨗͡΢͠Π̵brewͽαЀφϕЄϸͶͧѺ Ruby΄厏ह戔ਧͽ̵ႰԤͯΡͩ;͢΀͚ Small: πЀϞμϕ xcodebuild΀Ϳ΄command line developer

    tools΄϶ϐϞЄϑЄϸ RelfileΨز΁xcodebuildͽ΄PureϠϸϖ΁䜟Ρͩ;ɾͳ΄ᭋΘ墋㶨 Apple Developer Portal;΄ള姆΀ͭ Xcode Configuration/ xcconfig΄䃀ྠΨᴠͨΡ Readable: Υ͡ΠΚ͚ͯ YAMLਯ᥺Ϣήαϸͽก෈۸ͫ΢Ρ͵Η̵抑ͽΘቘᥴͽͣΡ 8
  9. fastlane;΄晅͚΅Ҙ ;΅̵͚͞অΕ΄㺔氂 Ҋͺ΄晝䝑ᙏ;ͭͼ̵ͲΈ͠手ͥͶ͚ͫ❗ 9

  10. Relax΄䱛ᚆ Relfile;͚͜YAML୵ୗ΄Ϡϸϖ戔ਧϢήαϸ CodeSign戔ਧ == Team ID;Provisioning Profile Build Settings΄θφόϫαχ=> Configuration͢䃀͞΀͚

    Info.plist΄θφόϫαχ => PlistBuddyӧᥝ Export Option plistᛔ㵕ኞ౮ Relfileٖͽ̵Bash΄厏ह䄜හΨڥአݢᚆ Manual Signing΁ᛔ㵕ͽڔ๊ ValidateπϫЀϖͽ̵IPAΨ墋㶨䭥戣 (CodeSign, Bundle ID΀Ϳ΄ෆݳ௔) ϮЀϓϗЀφ͢਻ฃ 10
  11. Relfile version: '2' workspace: SampleApp distributions: adhoc: scheme: SampleApp configuration:

    Debug # codesign team_id: ABCDEFGHIJ provisioning_profile: "Relax Adhoc" bundle_version: $BUILD_NUMBER bundle_identifier: com.scenee.SampleApp.adhoc info_plist: CFBundleName: "SmapleApp(Debug)" build_settings: OTHER_SWIFT_FLAGS: - "-DMOCK" # Export Option plist export_options: method: ad-hoc compileBitcode: false 11
  12. Installation $ cd /path/to/your/project $ # Generate your Relfile template

    $ relax init $ brew tap SCENEE/homebrew-formulae $ brew install relax 12
  13. Getting Started $ # Generate xcarchive $ relax archive adhoc

    $ # Export an ipa file $ relax export adhoc̴</path/to/xcarchive> $ # Print a IPA file path $ relax show adhoc ipa /path/to/ipa $ # Validate the ipa file $ relax validate /path/to/ipa ... Validation Successful 13
  14. Demo 14

  15. Advanced Universal FrameworkΘӞ咲ͽਠԧ => ͠Δͮ΀͚΄φμϷϤϕӧᥝ IPA/xcarchive΄ٚᗟݷ 䌑አKeychain΄֢౮ɾ戣ก䨗΄᭄ےɾڔ๊ Provisioning Profile΄᭄ےɾڷᴻɾ䭥ᔱ 15

  16. Advanced $ # Generate an universal framework $ relax build

    <distribution> $ # Print a list of provisioning profiles $ relax profile ls $ # Search a provisioning profile $ relax profile find "Greate App AdHoc" $ # Create a my keychain $ relax keychain create my.keychain -p <pass> $ # Add code sign identities $ relax keychain add <p12> ... $ # Use my.keychain $ relax keychain use my.keychain -p <pass> $ # Go back to login.keychain $ relax keychain reset 16
  17. Thank you! Welcome to your Pull Request and Bug report!

    Githubͽ⭐Ψ͚͵ͶͧΡ;̵ۜΕ΁΀ΠΔͯѺ 17