{"id":8684,"date":"2023-10-25T14:18:14","date_gmt":"2023-10-25T06:18:14","guid":{"rendered":"https:\/\/1989lifejourney.com\/?p=8684"},"modified":"2023-10-25T14:55:45","modified_gmt":"2023-10-25T06:55:45","slug":"ios-in-app-subscription-tutorial-with-storekit-2-and-swift","status":"publish","type":"post","link":"https:\/\/1989lifejourney.com\/?p=8684","title":{"rendered":"iOS in-app subscription tutorial with StoreKit 2 and Swift"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>iOS in-app subscription tutorial with StoreKit 2 and Swift<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/www.revenuecat.com\/blog\/engineering\/ios-in-app-subscription-tutorial-with-storekit-2-and-swift\/\">https:\/\/www.revenuecat.com\/blog\/engineering\/ios-in-app-subscription-tutorial-with-storekit-2-and-swift\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Apple\u6709\u4e0b\u9762\u56db\u7a2eIn-app purchases (IAPs) :<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Consumables<\/li>\n\n\n\n<li>Non-Consumables<\/li>\n\n\n\n<li>Auto-renewable subscriptions<\/li>\n\n\n\n<li>Non-renewing subscriptions<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u56db\u7a2eIAP\u8aaa\u660e:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1.<strong>Consumables<\/strong> are products that can be purchased once, more than once, and in quantity. Examples of consumables could be \u201clives\u201d or gems in games, boosts in a dating app to increase visibility, or tips for developers or creators.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2.<strong>Non-consumables<\/strong> are products that can only be purchased once and don\u2019t expire. Examples of non-consumables could be unlocking premium features in an app, getting extra brushes in a painting app, or obtaining cosmetic items in a game.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3.<strong>Auto-renewable<\/strong> subscriptions are products that can provide ongoing access to content, services, or premium features in an app. Customers are charged on a recurring basis until they cancel or billing issues occur. Examples of auto-renewable subscriptions could include access to a software service or content (like lessons in an education app).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4.<strong>Non-renewing<\/strong> subscriptions are products that provide access to content, services, and premium features in an app for a limited time without automatic renewal. This type of subscription requires the user to manually resubscribe to regain access to the service or content. An example of a non-renewing subscription could be a season pass to in-game content.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f8b\u5b50:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Consumables: \u55ae\u6b21\u6d88\u8017\u6027\u9053\u5177(ex: \u751f\u547d\u6c34\u3001\u88dc\u9b54\u6cd5\u85e5\u6c34)<\/li>\n\n\n\n<li>Non-Consumables: \u6c38\u4e45\u6d88\u8cbb\u578b\u88dd\u5099(ex: \u76d4\u7532\u3001\u8932\u5b50)<\/li>\n\n\n\n<li>Auto-renewable subscriptions: \u6708\u8a02\u95b1(ex: \u5728\u8a02\u95b1\u671f\u9593\uff0c\u6253\u602a\u7d93\u9a57+30%)<\/li>\n\n\n\n<li>Non-renewing subscriptions: \u975e\u81ea\u52d5\u7e8c\u8a02\u7684\u8a02\u95b1(ex: \u6bcf\u4e00\u5b63\u7684\u7279\u6b8a\u95dc\u5361\u9032\u5165\u6b0a\u9650)<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>iOS in-app subscription tutorial with StoreKit 2 and Sw [&hellip;]<\/p>\n","protected":false},"author":139426785,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_postgate_lock_override":"inherit","_postgate_lock_mode":"inherit","_postgate_preview_mode":"inherit","_postgate_preview_limit":0,"_postgate_product_ids":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","jetpack_seo_llms_txt_always_include":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"{title}\n\n{excerpt}\n\n{url}","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[37324612,55138170,1],"tags":[],"post_folder":[],"class_list":["post-8684","post","type-post","status-publish","format-standard","hentry","category-ios-development","category-technology-sharing","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paR5vw-2g4","jetpack-related-posts":[{"id":7606,"url":"https:\/\/1989lifejourney.com\/?p=7606","url_meta":{"origin":8684,"position":0},"title":"ChatGPT\u6e2c\u8a66_11\uff08\u8a62\u554fsendmail third party libraries for Swift)","author":"Kevin","date":"31 3 \u6708, 2023","format":false,"excerpt":"\u554fChatGPT: ios swift recommend third-party librarie\u2026","rel":"","context":"\u5728\u300cChatGPT\u300d\u4e2d","block_context":{"text":"ChatGPT","link":"https:\/\/1989lifejourney.com\/?cat=760577830"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/03\/e688aae59c96-2023-03-31-e4b88ae58d8810.21.33.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/03\/e688aae59c96-2023-03-31-e4b88ae58d8810.21.33.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/03\/e688aae59c96-2023-03-31-e4b88ae58d8810.21.33.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/03\/e688aae59c96-2023-03-31-e4b88ae58d8810.21.33.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/03\/e688aae59c96-2023-03-31-e4b88ae58d8810.21.33.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/1989lifejourney.com\/wp-content\/uploads\/2023\/03\/e688aae59c96-2023-03-31-e4b88ae58d8810.21.33.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":5857,"url":"https:\/\/1989lifejourney.com\/?p=5857","url_meta":{"origin":8684,"position":1},"title":"SwiftUI\u5b78\u7fd2","author":"Kevin","date":"2 9 \u6708, 2022","format":false,"excerpt":"https:\/\/developer.apple.com\/tutorials\/swiftui\/hand\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4009,"url":"https:\/\/1989lifejourney.com\/?p=4009","url_meta":{"origin":8684,"position":2},"title":"Static vs Dynamic Dispatch in Swift","author":"Kevin","date":"6 1 \u6708, 2022","format":false,"excerpt":"\u4ee5\u4e0b\u5167\u5bb9\u53c3\u8003\u81ea[Ref]\uff0c\u9019\u88e1\u50c5\u4f5c\u500b\u4eba\u6458\u8981\u6574\u7406: Method Dispatch\u5b9a\u7fa9: Method\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4270,"url":"https:\/\/1989lifejourney.com\/?p=4270","url_meta":{"origin":8684,"position":3},"title":"About Type safety","author":"Kevin","date":"6 2 \u6708, 2022","format":false,"excerpt":"\u5b9a\u7fa9: \u578b\u5225\u5b89\u5168(type safety)\u53ef\u4ee5\u975c\u614b\u65b9\u5f0f\u5be6\u65bd\uff0c\u53ca\u65e9\u5728\u7de8\u8b6f\u6642\u671f\u5c31\u6355\u6349\u5230\u6f5b\u85cf\u7684\u932f\u8aa4\uff1b\u6216\u8005\u4ee5\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4774,"url":"https:\/\/1989lifejourney.com\/?p=4774","url_meta":{"origin":8684,"position":4},"title":"IOS DispatchGroup","author":"Kevin","date":"11 3 \u6708, 2022","format":false,"excerpt":"DispatchGroup A group of tasks that you monitor as\u2026","rel":"","context":"\u5728\u300cIOS Development\u300d\u4e2d","block_context":{"text":"IOS Development","link":"https:\/\/1989lifejourney.com\/?cat=37324612"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7176,"url":"https:\/\/1989lifejourney.com\/?p=7176","url_meta":{"origin":8684,"position":5},"title":"ChatGPT\u6e2c\u8a66 &#8211; how to become an iOS system architect","author":"Kevin","date":"7 3 \u6708, 2023","format":false,"excerpt":"\u4ee5\u4e0b\u70baChatGPT \u7684\u56de\u7b54\uff1a To become an iOS system architect,\u2026","rel":"","context":"\u5728\u300cTechnology sharing\u300d\u4e2d","block_context":{"text":"Technology sharing","link":"https:\/\/1989lifejourney.com\/?cat=55138170"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/8684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/users\/139426785"}],"replies":[{"embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8684"}],"version-history":[{"count":4,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/8684\/revisions"}],"predecessor-version":[{"id":8688,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=\/wp\/v2\/posts\/8684\/revisions\/8688"}],"wp:attachment":[{"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8684"},{"taxonomy":"post_folder","embeddable":true,"href":"https:\/\/1989lifejourney.com\/index.php?rest_route=%2Fwp%2Fv2%2Fpost_folder&post=8684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}