{ "id": "169975", "key": "MOD-2368", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10034", "key": "MOD", "name": "Appcelerator Modules", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20072", "name": "Ti.StoreKit 4.3.0", "archived": false, "released": true } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-02-16T12:58:38.000+0000", "created": "2017-10-09T17:22:09.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "storekit" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-08-06T17:49:30.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10089", "name": "StoreKit" } ], "description": "iOS 11 introduced the ability [to promote in-app purchases in the App Store|https://developer.apple.com/app-store/promoting-in-app-purchases/]. When the user clicks on one of these promoted items in the App Store, the app opens, and the user is prompted to buy the item. This new feature relies on the {{SKPaymentTransactionObserver}} instance method [{{paymentQueue:shouldAddStorePayment:forProduct:}}|https://developer.apple.com/documentation/storekit/skpaymenttransactionobserver/2877502-paymentqueue?language=objc].\r\n\r\nThe [{{ti.storekit}}|https://github.com/appcelerator-modules/ti.storekit] has not been updated since May 2017 and does not appear to support this feature. (See [{{TiStoreKitModule.m}}|https://github.com/appcelerator-modules/ti.storekit/blob/ed85b9a731b40c3d0a538d97e6304ee75be69628/ios/Classes/TiStoreKitModule.m].)", "attachment": [], "flagged": false, "summary": "iOS 11: Add App Store-initiated purchase support to Store Kit module", "creator": { "name": "jacobkettle", "key": "jacobkettle", "displayName": "Jacob Budin", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "jacobkettle", "key": "jacobkettle", "displayName": "Jacob Budin", "active": true, "timeZone": "America/New_York" }, "environment": null, "closedSprints": [ { "id": 1000, "state": "closed", "name": "2018 Sprint 04 SDK", "startDate": "2018-02-12T04:23:01.913Z", "endDate": "2018-02-26T04:23:00.000Z", "completeDate": "2018-02-26T19:36:01.769Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "428975", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Interesting change, we can add that to the module! \r\n\r\nRegarding \"not updated since May\", this should be fine, because that was when we added the latest iOS 10.3 specific API's. Ti.StoreKit is pretty complete, to keep it like that, the iOS 11 API's will follow.\r\n\r\nRegarding the API itself, the delegate expects a boolean indicating whether to open the app to do the purchase or not. How would you as a developer like to see this exposed to the module? Having a property like {{allowAppStorePurchase}} ?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-11T22:38:32.000+0000", "updated": "2017-10-11T22:43:36.000+0000" }, { "id": "429016", "author": { "name": "jacobkettle", "key": "jacobkettle", "displayName": "Jacob Budin", "active": true, "timeZone": "America/New_York" }, "body": "Thanks for picking this up, Hans. I appreciate it.\r\n\r\nAs I understand it, the boolean return value indicates whether to continue the transaction once in-app. So, for example, this would allow the app to cancel a transaction if the item wasn't available in the user's country or the item was a quantity-limited promotion that has \"sold out.\" The app always opens.\r\n\r\n{{allowAppStorePurchase}} could work (would it default to {{true}} or {{false}}?).\r\n\r\n", "updateAuthor": { "name": "jacobkettle", "key": "jacobkettle", "displayName": "Jacob Budin", "active": true, "timeZone": "America/New_York" }, "created": "2017-10-12T14:42:18.000+0000", "updated": "2017-10-12T14:42:18.000+0000" }, { "id": "429017", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "The general problem is that we cannot really make this a configurable per-product property, because we don't have the relation between your local code and the requested products when being triggered from the app-store (because you cannot request the products and return then, it expects an immediate return-statements. So either make it a module-property, e.g. {{TiStorekit.allowsAppStorePurchase = true}} or find different solution. Looking into native storekit-wrappers, they are still having a similar problem, so I cannot find a finished implementation of the feature so far that would help getting inspired in the API design.\r\n\r\n*EDIT*: I might have an idea! We could have a property {{allowedStorePaymentProductIdentifiers}} that is an array of product-identifiers. Having those, we could compare them with the product proposed by the delegate and return {{true}} is it exists and {{ƒalse}} otherwise. Also, if the property is not set, all products are able to be downloaded / added to the payment queue, so it will return {{true}}.\r\n\r\nQuote from a dicussion in the native {{RMStore}} library:\r\n{quote}\r\nWhen you return true, the user will be shown that nice new in-app purchase payment sheet, so they can complete the transaction. And that's it. We're done.\r\nTime to ship it. Oh, all right. Well, what if the user is in the middle of onboarding? Or if they're creating an account? Or if they've already unlocked the item they're trying to buy? Well, in this case, you can hold onto the payment and return false.\r\n{quote}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-12T14:54:37.000+0000", "updated": "2017-10-12T15:00:17.000+0000" }, { "id": "429019", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Here is my PR, try it out: https://github.com/appcelerator-modules/ti.storekit/pull/32", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-10-12T15:20:00.000+0000", "updated": "2017-10-12T15:20:00.000+0000" }, { "id": "429197", "author": { "name": "jacobkettle", "key": "jacobkettle", "displayName": "Jacob Budin", "active": true, "timeZone": "America/New_York" }, "body": "Hans, thanks so much. I had no idea this could and would be addressed so quickly. Appreciate it. I need to get additional approval before implementing this update, but I will reply back as soon as I can validate this update.", "updateAuthor": { "name": "jacobkettle", "key": "jacobkettle", "displayName": "Jacob Budin", "active": true, "timeZone": "America/New_York" }, "created": "2017-10-17T19:13:35.000+0000", "updated": "2017-10-17T19:13:35.000+0000" }, { "id": "434561", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "Hello,\r\nbeautiful upgrade!\r\n\r\nAre there any news about this new realease?\r\n\r\n\r\nBest regards", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-02-16T10:16:28.000+0000", "updated": "2018-02-16T10:16:28.000+0000" }, { "id": "434565", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey [~otto.pic], the new version was released a few weeks ago, see [Ti.StoreKit 4.3.0|https://github.com/appcelerator-modules/ti.storekit/releases/tag/v4.3.0]. We just forgot to resolve the ticket, have fun with it! See the new \"allowedStorePaymentProductIdentifiers\" property in the docs on GitHub for details.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-16T12:56:16.000+0000", "updated": "2018-02-16T12:59:10.000+0000" }, { "id": "434567", "author": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "body": "Wonderfull. I didn't seen it. Great job.\r\n\r\nThanks", "updateAuthor": { "name": "otto.pic", "key": "otto.pic", "displayName": "Lorenzo Piccinini", "active": true, "timeZone": "Europe/Rome" }, "created": "2018-02-16T13:35:09.000+0000", "updated": "2018-02-16T13:35:09.000+0000" }, { "id": "440195", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-08-06T17:49:30.000+0000", "updated": "2018-08-06T17:49:30.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }