デバイス管理を App Store Connect API でやってみよう

デバイス管理を App Store Connect API でやってみよう

2f8b61ad31dd9c6ada4a90af746290fd?s=128

Shota Kashihara

June 18, 2019
Tweet

Transcript

  1. ©2019 Wantedly, Inc. σόΠε؅ཧΛ App Store Connect API Ͱ ΍ͬͯΈΑ͏

    potatotips #62 June 18, 2019 - @kashihararara
  2. ©2019 Wantedly, Inc. Introduction Shota Kashihara Wantedly People / iOS

  3. ©2019 Wantedly, Inc. App Store Connect API ͱ͸ Introduction

  4. ©2019 Wantedly, Inc. Introduction App Store Connect API ͱ͸ Ϋϥογϡͷൃੜ৔ॴ΍ɺൃੜܦ࿏Λه࿥ͨ͠ϩά

    https://developer.apple.com/jp/app-store-connect/api/
  5. ©2019 Wantedly, Inc. Introduction App Store Connect API ͱ͸ Ϋϥογϡͷൃੜ৔ॴ΍ɺൃੜܦ࿏Λه࿥ͨ͠ϩά

    https://developer.apple.com/jp/app-store-connect/api/
  6. ©2019 Wantedly, Inc. ϓϩϏδϣχϯά͕࢖͑ΔΑ͏ʹͳͬͯͨ Introduction (͍ͭͷ·ʹ͔)

  7. ©2019 Wantedly, Inc. ͬͦ͘͞࢖ͬͯΈΑ͏ Introduction

  8. ©2019 Wantedly, Inc. Introduction ϓϩϏδϣχϯά API Ͱ࢖͑ΔϦιʔε - Bundle ID,

    Bundle ID Capabilities - Certificates - Devices - Profiles https://developer.apple.com/jp/app-store-connect/api/
  9. ©2019 Wantedly, Inc. $ swift package init --type executable Introduction

    ͔ͤͬ͘ͳͷͰ Swift CLI Ͱ࡞Δ $ mkdir <PROJECT> && cd ./<PROJECT>
  10. ©2019 Wantedly, Inc. Introduction App Store Connect API Λ࢖͏ 2εςοϓ

    - JWT (JSON Web Token) ͷൃߦ - ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘
  11. ©2019 Wantedly, Inc. Introduction App Store Connect API Λ࢖͏ 2εςοϓ

    - JWT (JSON Web Token) ͷൃߦ - ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘ - GET σόΠεҰཡ - POST σόΠε௥Ճ
  12. ©2019 Wantedly, Inc. Introduction App Store Connect API Λ࢖͏ 2εςοϓ

    - JWT (JSON Web Token) ͷൃߦ - ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘ - GET σόΠεҰཡ - POST σόΠε௥Ճ
  13. ©2019 Wantedly, Inc. Introduction JWT (JSON Web Token) ͷൃߦ -

    Issuer ID - Key ID - Private Key(.p8) IUUQTBQQTUPSFDPOOFDUBQQMFDPNBDDFTTBQJ https://appstoreconnect.apple.com/access/api
  14. ©2019 Wantedly, Inc. Introduction JWT (JSON Web Token) ͷൃߦ -

    Issuer ID - Key ID - Private Key(.p8)
  15. ©2019 Wantedly, Inc. Introduction IBM-Swift/SwiftJWT

  16. ©2019 Wantedly, Inc. Introduction - Issuer ID - Key ID

    - Private Key(.p8) IBM-Swift/SwiftJWT
  17. ©2019 Wantedly, Inc. Introduction - Issuer ID - Key ID

    - Private Key(.p8) IBM-Swift/SwiftJWT
  18. ©2019 Wantedly, Inc. Introduction IBM-Swift/SwiftJWT

  19. ©2019 Wantedly, Inc. Introduction App Store Connect API Λ࢖͏ 2εςοϓ

    - JWT (JSON Web Token) ͷൃߦ - ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘ - GET σόΠεҰཡ - POST σόΠε௥Ճ
  20. ©2019 Wantedly, Inc. Introduction App Store Connect API Λ࢖͏ 2εςοϓ

    - JWT (JSON Web Token) ͷൃߦ - ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘ - GET σόΠεҰཡ - POST σόΠε௥Ճ
  21. ©2019 Wantedly, Inc. Introduction GET σόΠεҰཡ https://developer.apple.com/documentation/appstoreconnectapi/list_devices

  22. ©2019 Wantedly, Inc. Introduction GET σόΠεҰཡ https://developer.apple.com/documentation/appstoreconnectapi/list_devices

  23. ©2019 Wantedly, Inc. Introduction Response Spec https://developer.apple.com/documentation/appstoreconnectapi/devicesresponse

  24. ©2019 Wantedly, Inc. Introduction - Codable ·ͣ͸ Response Λఆٛ

  25. ©2019 Wantedly, Inc. Introduction GET σόΠεҰཡ

  26. ©2019 Wantedly, Inc. Introduction GET σόΠεҰཡ

  27. ©2019 Wantedly, Inc. Introduction GET σόΠεҰཡ

  28. ©2019 Wantedly, Inc. Introduction App Store Connect API Λ࢖͏ 2εςοϓ

    - JWT (JSON Web Token) ͷൃߦ - ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘ - GET σόΠεҰཡ - POST σόΠε௥Ճ
  29. ©2019 Wantedly, Inc. Introduction App Store Connect API Λ࢖͏ 2εςοϓ

    - JWT (JSON Web Token) ͷൃߦ - ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘ - GET σόΠεҰཡ - POST σόΠε௥Ճ
  30. ©2019 Wantedly, Inc. Introduction POST σόΠε௥Ճ https://developer.apple.com/documentation/appstoreconnectapi/register_a_new_device

  31. ©2019 Wantedly, Inc. Introduction POST σόΠε௥Ճ https://developer.apple.com/documentation/appstoreconnectapi/register_a_new_device

  32. ©2019 Wantedly, Inc. Introduction https://developer.apple.com/documentation/appstoreconnectapi/devicecreaterequ Request Spec

  33. ©2019 Wantedly, Inc. Introduction - Codable Request body Λఆٛ

  34. ©2019 Wantedly, Inc. Introduction POST σόΠε௥Ճ

  35. ©2019 Wantedly, Inc. Introduction POST σόΠε௥Ճ

  36. ©2019 Wantedly, Inc. Introduction POST σόΠε௥Ճ

  37. ©2019 Wantedly, Inc. Introduction ·ͱΊ - App Store Connect API

    ͸ Swift Ͱ ؆୯ʹ࢖͑ΔΑ - ࣍͸ Github ͱ Bitrise Ͱ͍͍ײ͡ʹ͍ͨ͠ - ͍ͭͰʹ Swift Ͱ CLI πʔϧ Λ֮͑Δ͖͔͚ͬʹ΋ͳΔΑ