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

Introducing Relax

Introducing Relax

Shin Yamamoto

January 25, 2018
Tweet

More Decks by Shin Yamamoto

Other Decks in Programming

Transcript

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

    IPA΁̵మਧ;吖΀ΡProvisioning Profile͢ف͹ͼ͚Ρ̶΀Ωͽ❓ μ϶αίЀϕ͡Ο̵̿ίϤϷ͢αЀφϕЄϸͽͣ΀͚̀;μϹЄϭ͢ ෛ͚ͭίϤϷϤϺυδμϕͪ;΁̵䶅ࢧݶͮΞ͜΀φμϷϤϕ䨗͚ͼ͚Ρ ϠϸϖϫτЀͽ̵㳨΄Ո͢αЀφϕЄϸͭ͵CertificateͽϠϸϖ͢䃪΢Ρ 4
  2. fastlane;΄晅͚΅Ҙ Easy: ϠϸϖϫτЀ΄厏हᓕቘ͢䮭 Go/Bashͽ䨗͡΢͠Π̵brewͽαЀφϕЄϸͶͧѺ Ruby΄厏ह戔ਧͽ̵ႰԤͯΡͩ;͢΀͚ Small: πЀϞμϕ xcodebuild΀Ϳ΄command line developer

    tools΄϶ϐϞЄϑЄϸ RelfileΨز΁xcodebuildͽ΄PureϠϸϖ΁䜟Ρͩ;ɾͳ΄ᭋΘ墋㶨 Apple Developer Portal;΄ള姆΀ͭ Xcode Configuration/ xcconfig΄䃀ྠΨᴠͨΡ Readable: Υ͡ΠΚ͚ͯ YAMLਯ᥺Ϣήαϸͽก෈۸ͫ΢Ρ͵Η̵抑ͽΘቘᥴͽͣΡ 8
  3. 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
  4. 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
  5. Installation $ cd /path/to/your/project $ # Generate your Relfile template

    $ relax init $ brew tap SCENEE/homebrew-formulae $ brew install relax 12
  6. 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
  7. 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
  8. Thank you! Welcome to your Pull Request and Bug report!

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