{"id":13849251,"url":"https://github.com/MKSG-MugunthKumar/MKStoreKit","last_synced_at":"2025-07-12T16:31:25.015Z","repository":{"id":1317321,"uuid":"1262196","full_name":"MKSG-MugunthKumar/MKStoreKit","owner":"MKSG-MugunthKumar","description":"The \"Goto\" In App Purchases Framework for iOS 8+","archived":true,"fork":false,"pushed_at":"2017-06-27T10:31:58.000Z","size":3775,"stargazers_count":2090,"open_issues_count":53,"forks_count":430,"subscribers_count":131,"default_branch":"master","last_synced_at":"2024-11-16T07:26:37.555Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MKSG-MugunthKumar.png","metadata":{"files":{"readme":"README.mdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-17T03:20:14.000Z","updated_at":"2024-10-22T13:45:28.000Z","dependencies_parsed_at":"2022-08-16T13:05:13.886Z","dependency_job_id":null,"html_url":"https://github.com/MKSG-MugunthKumar/MKStoreKit","commit_stats":null,"previous_names":["mksg-mugunthkumar/mkstorekit"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MKSG-MugunthKumar%2FMKStoreKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MKSG-MugunthKumar%2FMKStoreKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MKSG-MugunthKumar%2FMKStoreKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MKSG-MugunthKumar%2FMKStoreKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MKSG-MugunthKumar","download_url":"https://codeload.github.com/MKSG-MugunthKumar/MKStoreKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225829364,"owners_count":17530663,"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":"2024-08-04T19:01:12.016Z","updated_at":"2024-11-22T01:30:42.718Z","avatar_url":"https://github.com/MKSG-MugunthKumar.png","language":"Objective-C","funding_links":[],"categories":["Objective-C","etc"],"sub_categories":[],"readme":"#MKStoreKit\n\nThis is version 6.1 of MKStoreKit. iOS 8+ only. \nMKStoreKit 6 is a **complete revamp** is not API compatible with previous versions of MKStoreKit. Refactoring should however be fairly simple.\n\n*The code base is still in early beta. Use with caution*\n\nThe library contains just three files, MKStoreKit.h/m and MKStoreKitConfigs.plist\nThe MKStoreKit is a singleton class that takes care of *everything*. Just drag these four files into the project. You then have to initialize it by calling [[MKStoreKit sharedKit] startProductRequest] in your application:didFinishLaunchingWithOptions. From then on, it does the magic. The MKStoreKit purchases, remembers and even handles remote validation of auto-renewable subscriptions.\n\n## Features\n* Super simple in app purchasing\n* Built-in support for remembering your purchases\n* Built-in receipt validation (remote)\n* Built-in virtual currency manager\n* Built-in Hosted Content Download Manager\n\n## Sample Code \n\nThe Sample Code shows how to use MKStoreKit.\n\n###Config File Format\nMKStoreKit uses a config file, MKStoreKitConfigs.plist for managing your product identifiers.\nThe config file is a Plist dictionary containing three keys, \"Consumables\", \"Others\" and \"SharedSecret\"\n\nConsumables is the key where you provide a list of consumables in your app that should be managed as a virtual currency.\nOthers is the key where you provide a list of in app purchasable products\nSharedSecret is the key where you provide the shared secret generated on your iTunesConnect account.\n\n###Initialization\n\nInitialization is as simple as calling\nIn Objective-C\n\n``` objective-c\n[[MKStoreKit sharedKit] startProductRequest]\n```\n\nIn Swift\n\n``` swift\n    MKStoreKit.sharedKit().startProductRequest()\n```\nA sample initializiation code that you can add to your application:didFinishLaunchingWithOptions: is below\nIn Objective-C\n\n``` objective-c\n  [[MKStoreKit sharedKit] startProductRequest];\n  \n  [[NSNotificationCenter defaultCenter] addObserverForName:kMKStoreKitProductsAvailableNotification\n                                                    object:nil\n                                                     queue:[[NSOperationQueue alloc] init]\n                                                usingBlock:^(NSNotification *note) {\n    \n    NSLog(@\"Products available: %@\", [[MKStoreKit sharedKit] availableProducts]);\n  }];\n  \n  \n  [[NSNotificationCenter defaultCenter] addObserverForName:kMKStoreKitProductPurchasedNotification\n                                                    object:nil\n                                                     queue:[[NSOperationQueue alloc] init]\n                                                usingBlock:^(NSNotification *note) {\n                                                  \n                                                  NSLog(@\"Purchased/Subscribed to product with id: %@\", [note object]);\n                                                }];\n  \n  [[NSNotificationCenter defaultCenter] addObserverForName:kMKStoreKitRestoredPurchasesNotification\n                                                    object:nil\n                                                     queue:[[NSOperationQueue alloc] init]\n                                                usingBlock:^(NSNotification *note) {\n                                                  \n                                                  NSLog(@\"Restored Purchases\");\n                                                }];\n  \n  [[NSNotificationCenter defaultCenter] addObserverForName:kMKStoreKitRestoringPurchasesFailedNotification\n                                                    object:nil\n                                                     queue:[[NSOperationQueue alloc] init]\n                                                usingBlock:^(NSNotification *note) {\n                                                  \n                                                  NSLog(@\"Failed restoring purchases with error: %@\", [note object]);\n                                                }];\n```\n\nIn Swift\n\n``` swift\n    MKStoreKit.sharedKit().startProductRequest()\n    NSNotificationCenter.defaultCenter().addObserverForName(kMKStoreKitProductsAvailableNotification,\n      object: nil, queue: NSOperationQueue.mainQueue()) { (note) -\u003e Void in\n        print(MKStoreKit.sharedKit().availableProducts)\n    }\n\n    NSNotificationCenter.defaultCenter().addObserverForName(kMKStoreKitProductPurchasedNotification,\n      object: nil, queue: NSOperationQueue.mainQueue()) { (note) -\u003e Void in\n        print (\"Purchased product: \\(note.object)\")\n    }\n\n```\n\n###Checking Product Status\nYou can check if a product was previously purchased using -isProductPurchased as shown below.\n``` objective-c\nif([MKStoreManager isProductPurchased:productIdentifier]) {\n//unlock it\n}\n```\n\nYou can check for a product's expiry date using -expiryDateForProduct as shown below.\n``` objective-c\nif([MKStoreManager expiryDateForProduct:productIdentifier]) {\n//unlock it\n}\n```\n\nWarning: This method will return ```[NSNull null]``` for products that are not auto-renewing subscriptions.\n\n\n###Making a Purchase\nTo purchase a feature or to subscribe to a auto-renewing subscription, just call\n\n``` objective-c\n[[MKStoreKit sharedKit] initiatePaymentRequestForProductWithIdentifier:productIdentifier];\n```\n\nObserve kMKStoreKitProductPurchasedNotification to get notified when the purchase completes\n\n``` objective-c\n\n  [[NSNotificationCenter defaultCenter] addObserverForName:kMKStoreKitProductPurchasedNotification\n                                                    object:nil\n                                                     queue:[[NSOperationQueue alloc] init]\n                                                usingBlock:^(NSNotification *note) {\n                                                  \n                                                  NSLog(@\"Purchased/Subscribed to product with id: %@\", [note object]);\n                                                  \n                                                  NSLog(@\"%@\", [[MKStoreKit sharedKit] valueForKey:@\"purchaseRecord\"]);\n                                                }];\n```\n\nIt can't get simpler than this!\n\n\n## Missing Features\n\n* Keychain support for products\n* Local receipt verification using asn1c\n\n## Untested Features\n\n* Non-renewing subscriptions\n* Free subscriptions for news stand\n* Mac OS X support\n\n\nThese three features might work, but they are not tested yet.\n\n\n###Licensing\n\nMKStoreKit is licensed under MIT License\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---\n###Attribution free licensing\nIn case you need attribution free licensing for MKNetworkKit, you can buy one from [my license store](http://blog.mugunthkumar.com/license-store/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMKSG-MugunthKumar%2FMKStoreKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMKSG-MugunthKumar%2FMKStoreKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMKSG-MugunthKumar%2FMKStoreKit/lists"}