{"id":13742877,"url":"https://github.com/mattt/CargoBay","last_synced_at":"2025-05-09T00:32:00.600Z","repository":{"id":4601174,"uuid":"5744149","full_name":"mattt/CargoBay","owner":"mattt","description":"The Essential StoreKit Companion","archived":true,"fork":false,"pushed_at":"2021-06-22T17:08:43.000Z","size":256,"stargazers_count":1762,"open_issues_count":0,"forks_count":156,"subscribers_count":76,"default_branch":"master","last_synced_at":"2025-05-04T06:17:21.790Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/mattt.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":"2012-09-10T02:50:12.000Z","updated_at":"2025-03-20T11:03:53.000Z","dependencies_parsed_at":"2022-08-24T22:51:18.229Z","dependency_job_id":null,"html_url":"https://github.com/mattt/CargoBay","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattt%2FCargoBay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattt%2FCargoBay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattt%2FCargoBay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattt%2FCargoBay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattt","download_url":"https://codeload.github.com/mattt/CargoBay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171053,"owners_count":21865275,"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-03T05:00:37.257Z","updated_at":"2025-05-09T00:32:00.180Z","avatar_url":"https://github.com/mattt.png","language":"Objective-C","funding_links":[],"categories":["Objective-C  Stars 1000以内排名整理","Objective-C"],"sub_categories":[],"readme":"# CargoBay\n\n\u003e **Note**: This project is no longer being maintained.\n\n[`StoreKit`](http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/StoreKit_Collection/) is the Apple framework for [making In-App Purchases](https://developer.apple.com/library/IOS/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction.html). It's pretty good, but it has a few rough edges.\n\n`CargoBay` smooths out those rough parts by providing:\n\n- One step receipt \u0026 transaction verification, done securely [according to Apple's guidelines](https://developer.apple.com/library/IOS/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/DeliverProduct.html#//apple_ref/doc/uid/TP40008267-CH5-SW12)\n- Block-based interface for requesting product information\n- Ability to request product information for identifiers asynchronously from a remote web service\n- Block-based callbacks for payment queue observation delegate methods\n- Automatic check for transaction uniqueness\n\n## Usage\n\n### Product Requests\n\n```objective-c\nNSArray *identifiers = @[\n  @\"com.example.myapp.apple\",\n  @\"com.example.myapp.pear\",\n  @\"com.example.myapp.banana\"\n];\n\n[[CargoBay sharedManager] productsWithIdentifiers:[NSSet setWithArray:identifiers]\nsuccess:^(NSArray *products, NSArray *invalidIdentifiers) {\n  NSLog(@\"Products: %@\", products);\n  NSLog(@\"Invalid Identifiers: %@\", invalidIdentifiers);\n} failure:^(NSError *error) {\n  NSLog(@\"Error: %@\", error);\n}];\n```\n\n### Payment Queue Observation\n\n**AppDelegate.m**\n\n```objective-c\n- (void)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)options {\n  [[CargoBay sharedManager] setPaymentQueueUpdatedTransactionsBlock:^(SKPaymentQueue *queue, NSArray *transactions) {\n    NSLog(@\"Updated Transactions: %@\", transactions);\n  }];\n\n  [[SKPaymentQueue defaultQueue] addTransactionObserver:[CargoBay sharedManager]];\n\n  // ...\n}\n```\n\n### Verifying Receipts\n\n```objective-c\n[[CargoBay sharedManager] verifyTransaction:transaction password:nil success:^(NSDictionary *receipt) {\n  NSLog(@\"Receipt: %@\", receipt);\n} failure:^(NSError *error) {\n    NSLog(@\"Error %d (%@)\", [error code], [error localizedDescription]);\n}];\n```\n\n## License\n\nCargoBay is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattt%2FCargoBay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattt%2FCargoBay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattt%2FCargoBay/lists"}