{"id":24335447,"url":"https://github.com/russell-archer/storehelper","last_synced_at":"2025-05-15T21:04:28.430Z","repository":{"id":40408493,"uuid":"378207047","full_name":"russell-archer/StoreHelper","owner":"russell-archer","description":"Implementing In-App Purchases with StoreKit2 in Xcode 13 - 15 using SwiftUI, Swift 5.7 - 5.9, iOS 15 - 17 and macOS 12 - 14. Also supports tvOS and visionOS.","archived":false,"fork":false,"pushed_at":"2025-05-06T17:37:58.000Z","size":206074,"stargazers_count":445,"open_issues_count":0,"forks_count":58,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-05-06T18:42:06.460Z","etag":null,"topics":["in-app-purchases","ios","ios15","ios16","ios17","macos","macos12","macos13","macos14","storekit","swift","swift5","swiftui","tvos","visionos","xcode"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/russell-archer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-06-18T16:23:54.000Z","updated_at":"2025-05-06T17:36:13.000Z","dependencies_parsed_at":"2024-01-23T14:26:57.886Z","dependency_job_id":"7da01b89-24e2-4afa-9ed6-046823ee9632","html_url":"https://github.com/russell-archer/StoreHelper","commit_stats":{"total_commits":217,"total_committers":5,"mean_commits":43.4,"dds":"0.027649769585253448","last_synced_commit":"78fa423dae61873f59e18d88273485ce0803797c"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russell-archer%2FStoreHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russell-archer%2FStoreHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russell-archer%2FStoreHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/russell-archer%2FStoreHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/russell-archer","download_url":"https://codeload.github.com/russell-archer/StoreHelper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422755,"owners_count":22068678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["in-app-purchases","ios","ios15","ios16","ios17","macos","macos12","macos13","macos14","storekit","swift","swift5","swiftui","tvos","visionos","xcode"],"created_at":"2025-01-18T05:17:46.608Z","updated_at":"2025-05-15T21:04:23.412Z","avatar_url":"https://github.com/russell-archer.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frussell-archer%2FStoreHelper%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/russell-archer/StoreHelper)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Frussell-archer%2FStoreHelper%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/russell-archer/StoreHelper)\n[![](https://img.shields.io/github/license/russell-archer/StoreHelper)](https://img.shields.io/github/license/russell-archer/StoreHelper)\n\n---\n\n# StoreHelper\n\n![](./Sources/StoreHelper/Documentation.docc/Resources/images/StoreHelperDemo0.png)\n\n- [StoreHelper Documentation Landing Page](https://russell-archer.github.io/StoreHelper/documentation/storehelper/) - `StoreHelper` documentation landing page\n- [StoreHelper Quick Start](https://russell-archer.github.io/StoreHelper/documentation/storehelper/quickstart) - `StoreHelper` quick-start guide \n- [StoreHelper In-Depth Guide](https://russell-archer.github.io/StoreHelper/documentation/storehelper/guide) - `StoreHelper` and `StoreKit2` in-depth guide\n- [StoreHelper Demo Project](https://github.com/russell-archer/StoreHelperDemo) - Example Xcode `StoreHelper` project\n- [StoreHelper Demo with UIKit](https://github.com/russell-archer/StoreHelperDemoUIKit) - experimental demo showing `StoreHelper` in a UIKit project\n\n---\n\n# New `SKHelper` package now available for Xcode 16\n\n![](https://russell-archer.github.io/SKHelper/images/SKHelper/skhelper-logo.png)\n\n`SKHelper` is a new (September, 2024), lightweight Swift package that enables developers to easily add in-app purchase and subscription functionaility to their SwiftUI-based apps. \n\nDesigned to be an easier-to-use refactoring of **StoreHelper**, it makes use of Apple's **StoreKit Views** to provide a standard and easily customizable UI.\n\nCheck out the `SKHelper` [Repo](https://github.com/russell-archer/SKHelper/) and [Quick Start Tutorial](https://russell-archer.github.io/SKHelper/tutorials/quickstart) to get a fast overview of how things work.\n\n---\n\n# Recent Major Changes\n- 5 May, 2024\n    - Simplification of subscription display price logic to use Apple's subscriptionPeriodFormatStyle, which also supports localization. Added by Hengyu (thank you!)\n- 2 April, 2024\n    - Basic support for tvOS added by Hengyu (thank you!)\n- 15 March, 2024\n    - Reorganization of documentation to support DocC\n- 8 March, 2024\n    - Added Privacy Policy Manifest\n- 24 January, 2024\n    - Basic support for visionOS added by Hengyu (thank you!)\n- 23 June, 2023\n    - Improved handling of subscription renewals and expirations that happen when the app's not running\n    - See `AppStoreHelper.paymentQueue(_:updatedTransactions:)` and `StoreHelper.handleStoreKit1Transactions(productId:date:status:transaction:)`\n- 12 February, 2023\n    - Made the configuration of subscription products more flexible\n    - You can now either rely on a naming convention (as before) or use a \"Subscriptions\" section in \"Products.plist\"\n    - See the Samples/Configuration/SampleProducts.plist file for details\n    - Added unit tests to StoreHelperDemo project\n- 27 January, 2023\n    - Fixed a bug related to isPurchased for consumable products. Caused a crash on macOS and iOS (thank you Abdullah Kardaş!)    \n- 18 January, 2023\n    - Additional logging of various activities added\n- 17 January, 2023\n    - Improved support for handling extended wait times for StoreKit and App Store responses\n    - Improved caching of purchasing status\n    - Updates to many shared views to handle unknown purchases status\n- 10 January, 2023\n    - Added support for caching of product purchase status in `isPurchased(productId:)` using the `purchasedProductsFallback` collection\n    - Using `purchasedProductsFallback` as a cache can be turned on/off using `StoreHelper.doUsePurchasedProductsFallbackCache`\n    - The `purchasedProductsFallback` property is now `public private(set)` rather than `public`\n    - Added \"Refresh Products\" button and support for pull-to-refresh to the products list\n    - UI improvements to various views and improved sharing of views between iOS and macOS \n    - Minor documentation updates (StoreHelper Guide)\n- 13 December, 2022\n    - Added proof-of-concept demo showing `StoreHelper` in a UIKit project\n- 27 November, 2022\n\t- Major update to the way **subscriptions** are handled\n\t- Subscription prices now show **prices and renewal periods**\n\t- **Promotional and Introductory offers** on subscriptions are now supported\n\t- The most appropriate **promotional** or **introductory** offers or standard price and renewal period are automatically displayed\n\t- Additions to `StoreHelper.SubscriptionHelper`: `hasLowerValueCurrentSubscription(than:)`, `isLapsedSubscriber(to:)`, `allSubscriptionTransactions()`\n\t- Added in-app redemption of **offer codes**\n\t- Added new sections to the **Guide** on \"Subscription Introductory and Promotional Offers\" and \"Supporting In-App Offer Code Redemption\"\n\t- **Quick Start** and **Guide** documentation reviewed and updated for iOS16/macOS13/Xcode14 and new subscription features\n- 7 Nov, 2022\n    - Minor changes re upgrade to iOS 16 and macOS 13\n- 19 October, 2022\n\t- Added new section to the Guide on \"Restoring Previous Purchases\"\n- 15 March, 2022\n\t- Changed the initialization flow because of a new warning in Xcode 13.3 related to having `@MainActor init()`\n\t- Removed the need for StoreHelper's init method to run on the main thread by moving some initialization code to a new `start()` method\n\t- You should now call `StoreHelper.start()` as soon as possible after initializing `StoreHelper`\n\t- The `start()` method starts listening for transactions and get localized product info from the App Store\n\t- Updated all documentation because of this change\n- 25 January, 2022\n\t- Refactored `StoreHelper` as a SPM Package\n\t- Moved example app to separate repo ([StoreHelperDemo](https://github.com/russell-archer/StoreHelperDemo))\n\t- Updated documentation re change to SPM package\n- 19 January, 2022\n\t- Major updates to documentation\n\t- Added Mac target\n- 21 December, 2021\n\t- Updated documentation to reflect refactoring changes\n- 20 December, 2021\n\t- Refactored throughout so that this non-private version of `StoreHelper` is in-sync with private `StoreHelper` code used in an app released to the App Store\n    \n---\n\n## Overview of StoreHelper\n\n`StoreHelper` is a Swift Package Manager (SPM) package that enables developers using **Xcode 13 - 15** to easily add in-app purchase \nsupport to **iOS 15 - 17** and **macOS 12 - 14** SwiftUI apps. The package also provides basic support for visionOS and tvOS.\n\n`StoreHelper` is used to provide in-app purchase support in **Writerly** (iOS/macOS), which is available on the [App Store](https://apps.apple.com/app/writerly/id1143101981?ls=1).\n\n`StoreHelper` provides the following features:\n\n- Multi-platform (iOS, macOS) SwiftUI support for purchasing **Consumable**, **Non-consumable** and **Subscription** products\n- Detailed **documentation** and an example project\n- Supports **transaction validation**, **pending (\"ask to buy\") transactions**, **cancelled** and **failed** transactions\n- Supports customer **refunds** and management of **subscriptions**\n- Supports **introdctory offers**, in-app redeeming of **offer codes** and experimental support for **promotional offers**\n- Provides detailed **transaction information and history** for non-consumables and subscriptions\n- Support for direct App Store purchases of **promoted in-app purchases**\n\n## License\n\nMIT license, copyright (c) 2022, 2023, 2024 Russell Archer. This software is provided \"as-is\" \nwithout warranty and may be freely used, copied, modified and redistributed, including \nas part of commercial software. \n\nSee [License](https://russell-archer.github.io/StoreHelper/documentation/storehelper/license) for details.\n\n## Requirements\n\n`StoreHelper` uses Apple's `StoreKit2`, which requires **iOS 15 - 17**, **macOS 12 - 14** and **Xcode 13 - 15**.\n\n## Getting Started\n\nJump to the [StoreHelper Quick Start](https://russell-archer.github.io/StoreHelper/documentation/storehelper/quickstart) guide.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussell-archer%2Fstorehelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frussell-archer%2Fstorehelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frussell-archer%2Fstorehelper/lists"}