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

Auto-Renewable Subscriptionsを5年間運用した歴史から学ぶ注意点

yuutetu
September 01, 2018

Auto-Renewable Subscriptionsを5年間運用した歴史から学ぶ注意点

iOSDC2018で発表した内容です

yuutetu

September 01, 2018
Tweet

Other Decks in Technology

Transcript

  1.  

  2. • In App Purchaseͱ͸ʁ(3෼) • Auto-renewable subscriptionsͱ͸ʁ(2෼) • pixivͰͷAuto-renewable subscriptionsͷ࣮૷ࣄྫ(10෼)

    • ૺ۰֤ͨ͠छ໰୊(15෼)   ΞδΣϯμ ※ όοΫΤϯυͷ࿩ʹ͸Ұ੾৮Ε·ͤΜ ฉ͖͍ͨํ͸ੋඇฐࣾ΁༡ͼʹདྷ͍ͯͩ͘͞ -> https://www.wantedly.com/projects/163009
  3.   In App Purchase 4UPSF,JU App Store pixiv API

    Server ߪೖϑϩʔΑΖ͘͠ ߪೖ׬ྃͨ͠Α
  4.   • ফඅܕ( Consumable ) • ඇফඅܕ( Non-consumable )

    • ࣗಈߋ৽ߪಡܕ( Auto-renewable subscriptions ) • ඇߋ৽ߪಡܕ( Non-renewable subscriptions )
  5.   pixivϓϨϛΞϜ • ਓؾͷ࡞඼ΛΑΓ଎͘ɺΑΓ ؆୯ʹ୳ͤΔαϒεΫϦϓγϣ ϯαʔϏε • ֹ݄ ¥600

    • (Web൛΍Android൛ͱҟͳΔ) • όοΫΤϯυ͕ϓϨϛΞϜػೳΛ؅ ཧ͠ɺWeb൛΍Android൛ؔ܎ͳ͘Ϋ ϩεϓϥοτϑΥʔϜͰར༻Մೳ
  6.   App • ϓϨϛΞϜొ࿥ • ϓϨϛΞϜ෮ݩ • ϦτϥΠ Server

    • Ϩγʔτݕূ • ϓϨϛΞϜঢ়ଶɾϨγʔτظ ݶ؅ཧ Ϣʔβͷૢ࡞ʹجͮ͘ॲཧ+ิॿ ҆શʹϓϨϛΞϜঢ়ଶΛ؅ཧ͢Δ
  7.   ϓϨϛΞϜొ࿥ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ/ొ࿥Մೳ ͳΞΧ΢ϯτ͔֬ೝ 2.

    ՝ۚΞΠςϜ࠶औಘɾ֬ೝ 3. ܾࡁ 4. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 5. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ ͢ͰʹϓϨϛΞϜΞΧ΢ϯτͰ͸ͳ͍͔ʁ ͜ͷ··՝ۚΛ૸Β͍͍͔ͤͯʁ ϓϨϛΞϜΞΧ΢ϯτͳͷʹɺܾࡁॲཧΛ૸Β ͤͯ͠·͏ͱʮ2ॏొ࿥ʯʹͳͬͯ͠·͏ɻ ՝͕ۚ૸ΔલʹࢭΊ͓ͯ͘ɻ
  8.   ϓϨϛΞϜొ࿥ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ/ొ࿥Մೳ ͳΞΧ΢ϯτ͔֬ೝ 2.

    ՝ۚΞΠςϜ࠶औಘɾ֬ೝ 3. ܾࡁ 4. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 5. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ ఏڙதͷ՝ۚΞΠςϜ͔ʁ
  9.   ϓϨϛΞϜొ࿥ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ/ొ࿥Մೳ ͳΞΧ΢ϯτ͔֬ೝ 2.

    ՝ۚΞΠςϜ࠶औಘɾ֬ೝ 3. ܾࡁ 4. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 5. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ ܾࡁϑϩʔ։࢝ AppStoreʹͯϩάΠϯ͍ͯ͠ ͳ͍৔߹ʹ͸ɺϩάΠϯΛଅ ͢͜ͱ΋΍ͬͯ͘ΕΔɻ
  10.   ϓϨϛΞϜొ࿥ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ/ొ࿥Մೳ ͳΞΧ΢ϯτ͔֬ೝ 2.

    ՝ۚΞΠςϜ࠶औಘɾ֬ೝ 3. ܾࡁ 4. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 5. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ SKPaymentTransactionObserverܦ༝ʹͯड͚औ ΕΔTransactionΛ΋ͱʹɺܾࡁϨγʔτΛૹΓ ϓϨϛΞϜొ࿥͢Δ
  11.   ϓϨϛΞϜొ࿥ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ/ొ࿥Մೳ ͳΞΧ΢ϯτ͔֬ೝ 2.

    ՝ۚΞΠςϜ࠶औಘɾ֬ೝ 3. ܾࡁ 4. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 5. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ ϓϨϛΞϜొ࿥׬ྃΛΞΧ΢ϯτঢ়ଶʹ൓ө͢Δ
  12.   ϓϨϛΞϜ෮ݩ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ 2. ෮ݩॲཧ

    3. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 4. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ ϓϨϛΞϜΞΧ΢ϯτ͔֬ೝ ϓϨϛΞϜΞΧ΢ϯτͳΒ͹෮ݩͯ͠΋ ҙຯ͕ͳ͍
  13.   ϓϨϛΞϜ෮ݩ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ 2. ෮ݩॲཧ

    3. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 4. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ ࠷৽ͷ՝ۚϨγʔτʹRefresh͞Εɺ SKPaymentTransactionObserverʹ Transaction͕ൃߦ͞ΕΔ
  14.   ϓϨϛΞϜ෮ݩ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ 2. ෮ݩॲཧ

    3. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 4. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ SKPaymentTransactionObserverܦ༝ʹͯड͚औ ΕΔTransactionΛ΋ͱʹɺܾࡁϨγʔτΛૹΓ ϓϨϛΞϜొ࿥͢Δ
  15.   ϓϨϛΞϜ෮ݩ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ 2. ෮ݩॲཧ

    3. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 5. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ ϓϨϛΞϜঢ়ଶΛΞϓϦʹ൓ө
  16.   ϦτϥΠॲཧ 4UPSF,JU App Store pixiv API Server ߪೖ׬ྃͨ͠Α

    • ՝ۚͰ͖͕ͨϓϨϛΞϜొ࿥͞Εͳ͍έʔε͕Ͳ͏ͯ͠΋ൃੜ͢Δ
  17.   ϓϨϛΞϜొ࿥ SKPaymentQueue.canMakePayments()Ͱ ʮ՝ۚՄೳͳ୺຤࢖༻ऀʯͰ͋Δ͜ͱΛ ֬ೝͭͭ͠ɺ 1. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ/ొ࿥Մೳ ͳΞΧ΢ϯτ͔֬ೝ 2.

    ՝ۚΞΠςϜ࠶औಘɾ֬ೝ 3. ܾࡁ 4. αʔόʹܾࡁϨγʔτΛૹΔ(ొ࿥ॲཧ) 5. pixivΞΧ΢ϯτͷ࠶ϩάΠϯ ͔ͬ͠ΓτϥϯβΫγϣϯͯ͋͛͠ Δඞཁ͕͋Δ
  18.   pixivϓϨϛΞϜ • ਓؾͷ࡞඼ΛΑΓ଎͘ɺΑΓ ؆୯ʹ୳ͤΔαϒεΫϦϓγϣ ϯαʔϏε • ֹ݄ ¥600

    • (Web൛΍Android൛ͱҟͳΔ) • όοΫΤϯυ͕ϓϨϛΞϜػೳΛ؅ ཧ͠ɺWeb൛΍Android൛ؔ܎ͳ͘Ϋ ϩεϓϥοτϑΥʔϜͰར༻Մೳ
  19. • ϓϨϛΞϜొ࿥ը໘(LP: Landing Page)ͷσβΠϯ͸ొ࿥ऀ਺ʹେ͖͘Өڹ • ࣗಈߋ৽ߪಡܕ՝ۚ͸ෳࡶͳͷͰஸೡͳઆ໌͕ඞཁ • ʮ1ϲ݄ܦաͨ͠Βࣗಈߋ৽͞ΕΔʯʮղ໿͸ߋ৽ͷ24࣌ؒલ·Ͱʯ • ͜͜͸ɺAppleͷϨϏϡΞʔ΋͔ͳΓؾʹ͢ΔϙΠϯτ

    • ՝ۚΞΠςϜ໊ɾՁ֨΋ࣾ಺֎ͷཁҼͰมΘΓ͏Δ • ʮॳ݄ແྉʯΛഇࢭͯ͠ɺ՝ۚΞΠςϜ໊͔Βʮॳ݄ແྉʯΛແ͍ͨ͘͠ • ՝ۚΞΠςϜͷՁ֨มߋ   มಈཁҼͷྫ
  20. • ՝ۚΞΠςϜΛ௥Ճ͢Δ • ಉҰͷSubscription GroupsͷಉϨϕϧʹ഑ஔ • ສ͕Ұʹ΋ɺ2ॏొ࿥͕ઈରʹى͜Βͳ͍Α͏ʹ͢Δ • (ແ͍ͩΖ͏͚Ͳɺ)ΫϩεάϨʔυͰ͖ΔΑ͏ʹ •

    ϓϨϛΞϜొ࿥࣌ʹ͸৽͍͠՝ۚΞΠςϜͰొ࿥͢Δ • ϓϨϛΞϜͷ෮ݩ(Restore)࣌ʹ͸ɺ৽ɾچ྆ํͷ՝ۚΞΠςϜΛର৅ͱ͢Δ • 1ϲ݄ແྉϓϥϯͷϢʔβ΋RestoreͰ͖ΔΑ͏ʹɻ   ৽͍͠՝ۚΞΠςϜʹҠߦ͢Δ
  21. • pixivϓϨϛΞϜಋೖ࣌: ϩάΠϯඞਢ • 2015೥: ඇϩάΠϯͰ΋࢖͑ΔΑ͏ʹͳΔ • ৽نϢʔβ͕োนͳ͘ΞϓϦΛ࢖͍࢝ΊΒΕΔ • 2016೥຤:

    ԾΞΧ΢ϯτొ࿥ಋೖɾϩάΠϯඞਢԽ • χοΫωʔϜͷઃఆ͕૿͑Δ͕ɺ͙͢ʹҰൠΞΧ΢ϯτͷػೳΛ࢖͑Δ   ৽نϢʔβͷϋʔυϧΛԼ͖͛ͯͨ
  22. • pixivϓϨϛΞϜಋೖ࣌: ϩάΠϯඞਢ • 2015೥: ඇϩάΠϯͰ΋࢖͑ΔΑ͏ʹͳΔ • ৽نϢʔβ͕োนͳ͘ΞϓϦΛ࢖͍࢝ΊΒΕΔ • 2016೥຤:

    ԾΞΧ΢ϯτొ࿥ಋೖɾϩάΠϯඞਢԽ • χοΫωʔϜͷઃఆ͕૿͑Δ͕ɺ͙͢ʹҰൠΞΧ΢ϯτͷػೳΛ࢖͑Δ   ৽نϢʔβͷϋʔυϧΛԼ͖͛ͯͨ
  23.   App • ϓϨϛΞϜొ࿥ • ϓϨϛΞϜ෮ݩ • ϦτϥΠ Server

    • Ϩγʔτݕূ • ϓϨϛΞϜঢ়ଶɾϨγʔτظ ݶ؅ཧ
  24.   App Server • Ϩγʔτݕূ • ϓϨϛΞϜঢ়ଶɾϨγʔτظ ݶ؅ཧ •

    ϓϨϛΞϜొ࿥ • ϓϨϛΞϜ෮ݩ • ϦτϥΠ • (ඇϩάΠϯ࣌)ϓϨϛΞϜঢ় ଶɾϨγʔτظݶ؅ཧ