©2019 Wantedly, Inc.σόΠεཧΛ App Store Connect API ͰͬͯΈΑ͏potatotips #62June 18, 2019 - @kashihararara
View Slide
©2019 Wantedly, Inc.IntroductionShota KashiharaWantedly People / iOS
©2019 Wantedly, Inc.App Store Connect API ͱIntroduction
©2019 Wantedly, Inc.IntroductionApp Store Connect API ͱΫϥογϡͷൃੜॴɺൃੜܦ࿏Λهͨ͠ϩάhttps://developer.apple.com/jp/app-store-connect/api/
©2019 Wantedly, Inc.ϓϩϏδϣχϯά͕͑ΔΑ͏ʹͳͬͯͨIntroduction(͍ͭͷ·ʹ͔)
©2019 Wantedly, Inc.ͬͦͬͯ͘͞ΈΑ͏Introduction
©2019 Wantedly, Inc.IntroductionϓϩϏδϣχϯά API Ͱ͑ΔϦιʔε- Bundle ID, Bundle ID Capabilities- Certificates- Devices- Profileshttps://developer.apple.com/jp/app-store-connect/api/
©2019 Wantedly, Inc.$ swift package init --type executableIntroduction͔ͤͬ͘ͳͷͰ Swift CLI Ͱ࡞Δ$ mkdir && cd ./
©2019 Wantedly, Inc.IntroductionApp Store Connect API Λ͏ 2εςοϓ- JWT (JSON Web Token) ͷൃߦ- ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘
©2019 Wantedly, Inc.IntroductionApp Store Connect API Λ͏ 2εςοϓ- JWT (JSON Web Token) ͷൃߦ- ϦΫΤετϔομʹ Token Λ͚ͭͯ API Λୟ͘- GET σόΠεҰཡ- POST σόΠεՃ
©2019 Wantedly, Inc.IntroductionJWT (JSON Web Token) ͷൃߦ- Issuer ID- Key ID- Private Key(.p8)IUUQTBQQTUPSFDPOOFDUBQQMFDPNBDDFTTBQJhttps://appstoreconnect.apple.com/access/api
©2019 Wantedly, Inc.IntroductionJWT (JSON Web Token) ͷൃߦ- Issuer ID- Key ID- Private Key(.p8)
©2019 Wantedly, Inc.IntroductionIBM-Swift/SwiftJWT
©2019 Wantedly, Inc.Introduction- Issuer ID- Key ID- Private Key(.p8)IBM-Swift/SwiftJWT
©2019 Wantedly, Inc.IntroductionGET σόΠεҰཡhttps://developer.apple.com/documentation/appstoreconnectapi/list_devices
©2019 Wantedly, Inc.IntroductionResponse Spechttps://developer.apple.com/documentation/appstoreconnectapi/devicesresponse
©2019 Wantedly, Inc.Introduction- Codable·ͣ Response Λఆٛ
©2019 Wantedly, Inc.IntroductionGET σόΠεҰཡ
©2019 Wantedly, Inc.IntroductionPOST σόΠεՃhttps://developer.apple.com/documentation/appstoreconnectapi/register_a_new_device
©2019 Wantedly, Inc.Introductionhttps://developer.apple.com/documentation/appstoreconnectapi/devicecreaterequRequest Spec
©2019 Wantedly, Inc.Introduction- CodableRequest body Λఆٛ
©2019 Wantedly, Inc.IntroductionPOST σόΠεՃ
©2019 Wantedly, Inc.Introduction·ͱΊ- App Store Connect API Swift Ͱ ؆୯ʹ͑ΔΑ- ࣍ Github ͱ Bitrise Ͱ͍͍ײ͡ʹ͍ͨ͠- ͍ͭͰʹ Swift Ͱ CLI πʔϧ Λ֮͑Δ͖͔͚ͬʹͳΔΑ