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

StoreKitTestを使ってアプリ内課金のテストや検証を効率化する方法

BOB
September 02, 2023

 StoreKitTestを使ってアプリ内課金のテストや検証を効率化する方法

BOB

September 02, 2023
Tweet

More Decks by BOB

Other Decks in Technology

Transcript

  1. Sandboxͱͷҧ͍ πʔϧ App Store Connectͷઃఆ͕ඞཁ App StoreʹΑͬͯ ॺ໊͞ΕͨAppϨγʔτΛ ఏڙ Ϣʔβʔ΁ͷ੥ٻ͕ൃੜ

    XcodeͷStoreKitςετ × ×(XcodeʹΑΔॺ໊) × Sandbox ◦ ◦ × TestFlightʢSandboxΛ ࢖༻ʣ ◦ ◦ × • StoreKitTest͸AppStoreConnectʹ࣮ࡍͷ঎඼Λ࡞੒͢Δඞཁ͕ͳ͍ • ੜ੒͞ΕΔϨγʔτٴͼɼTransaction͸μϛʔͰ͋Δ • ςετ΍࣮ࡍͷڍಈʹ͍ͭͯ͸ޙ΄Ͳ 7
  2. σϞΞϓϦ 10 View Presenter PurchaseService MeService - ࣗ෼ͷ৘ใΛऔಘ͢Δ - ߪೖ͢Δ

    - ෮ݩ͢Δ - ֤αʔϏεʹࢦࣔΛग़͢ - ݁ՌΛViewʹ൓өͤ͞Δ
  3. ConfigurationΛ࡞੒ ಋೖํ๏(1/8) 1. Xcode͔ΒFile > New > FileΛબ୒ͯ͠ɼStoreKitͱೖྗ 2. StoreKit

    Configuration FileΛબ୒͠ɼ໊લΛೖྗͯ͠อଘ 
 *ࠓճ͸Sync this file with an app in App Store ConnectͷνΣοΫ͸ೖΕͳ͍ 
 *νΣοΫΛೖΕͨ৔߹͸ɼAppStoreConnectͱಉظͤ͞Δ͜ͱ͕Ͱ͖·͢ 11
  4. ܾࡁࣦഊΛ࠶ݱ͢Δ • Ұ෦ͷέʔε͚ͩͰ͕͢ɼڧ੍తʹΤϥʔΛൃੜͤ͞Δ͜ͱ͕Ͱ͖·͢ • ͜ΕΒͷέʔε͕ͦͷ··StoreKitTestͰѻ͑ΔΤϥʔͰ͢ छྨ ֓ཁ SKErrorUnknown ෆ໌·ͨ͸༧ظ͠ͳ͍Τϥʔ͕ൃੜ͠ ͨ͜ͱΛࣔ͢

    SKErrorInvalidOfferIde ntifier ΦϑΝʔ ID ͕ແޮͰ͋Δ͜ͱΛࣔ͢ SKErrorInvalidOfferIde ntifier ࢧ෷ׂ͍Ҿͷॺ໊͕ແޮͰ͋Δ͜ͱΛ ࣔ͢ SKErrorMissingOfferPa rams ࢧ෷ׂ͍Ҿʹύϥϝʔλʔ͕ܽམ͍ͯ͠ Δ͜ͱΛࣔ͢ SKErrorInvalidOfferPric e App Store Connect Ͱࢦఆͨ͠Ձ͕֨ແޮ Ͱ͋Δ͜ͱΛࣔ͢ 29