{"id":24063943,"url":"https://github.com/afrazcodes/storefrontkit","last_synced_at":"2025-06-16T15:11:48.482Z","repository":{"id":62456094,"uuid":"321171390","full_name":"AfrazCodes/StoreFrontKit","owner":"AfrazCodes","description":"Modular \u0026 flexible store fronts for In App Purchases on iOS","archived":false,"fork":false,"pushed_at":"2020-12-14T02:20:30.000Z","size":1155,"stargazers_count":22,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-23T21:39:51.543Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AfrazCodes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-13T22:16:53.000Z","updated_at":"2025-02-28T05:43:08.000Z","dependencies_parsed_at":"2022-11-01T22:46:35.437Z","dependency_job_id":null,"html_url":"https://github.com/AfrazCodes/StoreFrontKit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/AfrazCodes/StoreFrontKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfrazCodes%2FStoreFrontKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfrazCodes%2FStoreFrontKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfrazCodes%2FStoreFrontKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfrazCodes%2FStoreFrontKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AfrazCodes","download_url":"https://codeload.github.com/AfrazCodes/StoreFrontKit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AfrazCodes%2FStoreFrontKit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260183300,"owners_count":22971200,"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":[],"created_at":"2025-01-09T10:05:23.285Z","updated_at":"2025-06-16T15:11:48.422Z","avatar_url":"https://github.com/AfrazCodes.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StoreFrontKit\n\n[![Version](https://img.shields.io/cocoapods/v/StoreFrontKit.svg?style=flat)](https://cocoapods.org/pods/StoreFrontKit)\n[![License](https://img.shields.io/cocoapods/l/StoreFrontKit.svg?style=flat)](https://cocoapods.org/pods/StoreFrontKit)\n[![Platform](https://img.shields.io/cocoapods/p/StoreFrontKit.svg?style=flat)](https://cocoapods.org/pods/StoreFrontKit)\n\n![StoreFrontKit Logo](https://raw.githubusercontent.com/AfrazCodes/StoreFrontKit/master/store_front_kit.png)\n\n![StoreFrontKit Examples](https://raw.githubusercontent.com/AfrazCodes/StoreFrontKit/master/header.png)\n\n## Introduction\n\nApple's StoreKit framework provides concise and clean APIs to interface with the App Store for in app purchases. However, a notable omission is a UI component to present in app purchases to users. The reasoning behind this is most likely that every app looks and feels different.\n\nHowever, often times, we find ourselves writing a \"Store Front\" type component over  and over again. This UI encompasses information about the product, subscription, or service we are selling. Moreover, it gives the user a call to action to purchase, restore, or subscribe.\n\nStoreFrontKit is a fully managed and lightweight framework to solve this. The framework accomplishes the following:\n- Fully managed app store product fetching and caching\n- Transaction management and purchase restorations\n- Single item Store Front\n- Multi item store Front\n- Free trial subscription store front up sells\n- Subscription group store front\n\n## Installation\n\n### CocoaPods\n\nInclude the following line in your `Podfile`\n\n`pod 'StoreFrontKit'`\n\n### Manual\n\nYou may download or clone this repo and use the source directly.\n\n## Usage\n\nThere are 2 steps to use `StoreFrontKit`\n\n### Configure at App Launch\n\nFirst, you need to configure StoreFrontKit with the in app purchase product identifiers who want to manage in your app. The requirement is that this is done prior to using the storefront UIs. It is recommended you do this in your App Delegate as follows.\n\n```swift\n@main\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -\u003e Bool {\n        // Set Up Store Front\n        SFKManager.shared.configure(\n            with: StoreFrontKitConfiguration(\n                products: [\n                    .nonConsumable(\n                        productID: \"com.example.item\", viewModel: nil\n                    ),\n                    .subscription(\n                        productID: \"com.example.subscription\", viewModel: nil\n                    ),\n                ]\n            )\n        )\n        return true\n    }\n}\n```\n\n### Show Store Front\n\nCreating a Store Front is as simple as creating and pushing a view controller.\n\n```swift\nlet vc = SFKNonConsumableViewController(\n    with: .nonConsumable(\n        productID: Products.removeAds.rawValue,\n        viewModel: StoreFrontProductViewModel(\n            icon: UIImage(systemName: \"x.square\"),\n            iconTintColor: .systemPink\n        )\n    )\n) { result in\n    switch result {\n    case .success: break\n    case .failure: break\n    }\n}\nvc.title = \"Remove Ads\"\nvc.navigationItem.largeTitleDisplayMode = .always\nself?.navigationController?.pushViewController(vc, animated: true)\n```\n\nIn the above example, we create a single item (non-consumable) store front VC and push it. You'll also note that it takes a callback completion block. This block relays successful in app purchase transactions.\n\n### More information\n\nCheck out the example app target included in this repo.\n\n## Contributing\n\nContribution to this framework is not just welcomed, it is encouraged! Feel free to open Pull Requests or issues for feature requests and bug fixes. The ask is to follow a few rules:\n- Build generic components that are not just specific to you\n- Follow clean architecture principles\n- Write testable code and related tests\n\n## License\n\nDistributed under MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafrazcodes%2Fstorefrontkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafrazcodes%2Fstorefrontkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafrazcodes%2Fstorefrontkit/lists"}