storekit

NSLocale currency symbol, show before or after amount value

假装没事ソ 提交于 2019-12-21 04:03:41
问题 I am using StoreKit to implement an in app purchase store in my application. I have a custom design and it means that the value of the price should be white and large, and the currency symbol smaller, darker and aligned to the top of the price value. I can get the currency symbol without any problems by using the NSLocale in SKproduct 's priceLocale property, and the value of the price in the price property. My problem is knowing when I should put the currency symbol before the price and when

How to make auto renewable subscriptions tied to in-house user, not apple id?

一世执手 提交于 2019-12-21 03:28:22
问题 I seem to have hit a brick wall, but essentially what I have in my app is a login page for the user and a create account page. When the user opens my app and creates a new account, their information is stored on a Firebase Server (BaSS). Now my question is how would I go about making it so that for every user that created an account through my application, they have the option to subscribe to my application, and this subscription is only valid for their account (not apple id). Currently, if

In app purchase for auto-renewable content prompts user to share information

谁都会走 提交于 2019-12-20 09:48:15
问题 I am adding the ability to purchase auto-renewable content through the iOS SDK's StoreKit API. When testing this in the sandbox on my iOS device, the following message appears in an alert after agreeing to purchase: Share your Information? The publisher of [app name here] would like your name, email, and zip code for use in accordance with their privacy policy. With buttons for "Don't Allow" and "Allow" I don't want / need this information and don't want to annoy my users by prompting for it.

IAPs are being restoring when they have not yet been purchased yet

梦想的初衷 提交于 2019-12-20 06:43:14
问题 When the user calls restorePurchases(), the non-consumable com.premium is restored even thought they do not own it. Here are the functions that are responsible for the restoring purchases and purchasing IAPs. This is only an issue with non-consumable IAPs. There is no issue with purchasing. And if the user attempts to purchase an IAP that they already have, it is simply restored. Thank you for looking in to this. func restorePurchases() { SKPaymentQueue.default().add(self) SKPaymentQueue

StoreKIt verification error: 21002

笑着哭i 提交于 2019-12-20 03:29:07
问题 On a iPhone 4/iOS 4 device, sandbox App Store is reporting this error during verification. 21002: The data in the receipt-data property was malformed. On a iPhone 5/iOS 6 device, the same code works (status == 0, receipt returned) without any problems. I've restarted the device, made sure the Apple ID is logged out, even made a new test user account. Same result. Any ideas? 回答1: This Error means the JSON Object that you have created to send for verification is not in correct format. {

iPad In App Purchase fails with SKErrorPaymentCancelled and “Cannot connect to iTunes Store” [duplicate]

独自空忆成欢 提交于 2019-12-19 11:35:53
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: iPhone storekit sandbox stopped working. Hi. I updated today to version 3.2.2 of the iPad iOS and I noticed that my In App Purchase testing was not working. I am using a test account and everyhing was working until now (our app is already live since june and the real in app purchase works), but today I wanted to make a test purchase with the same product and test user that I always used and now it's not working.

how to add openssl to a swift project

我的未来我决定 提交于 2019-12-19 07:35:13
问题 I am learning how to add in-app purchase receipt validation to my iOS/OSX projects. There is a nice overview here and the WWDC14 has good videos on this topic. Plenty of sample code, but everyone skips one step. How to import the openSSL header. The swift compiler complains that there is no such module. import Foundation import StoreKit import openssl //no such module ??? I am already stuck before writing one line of code. Where is the openssl framework hiding? 回答1: There is no OpenSSL module

SKProductsRequestDelegate failure

試著忘記壹切 提交于 2019-12-19 05:54:26
问题 The SKProductsRequestDelegate has one single method: - (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response Usually, I find these sorts of delegates will have several methods for handling multiple cases, rather than just success. For example: -(void) connection:(NSURLConnection *)connection didFailWithError:(NSError *) error How can I check if this code fails for some reason, eg. the user is offline? SKProductsRequest *productsRequest = [

iOS StoreKit - When to call - (void)restoreCompletedTransactions?

泪湿孤枕 提交于 2019-12-19 05:43:09
问题 I have lots of 1 time purchase IAPs inside of my application. Users can purchase them just fine. My problem is that I am integrating with Flurry to track real purchases versus just a restoration of a purchase, but my SKPaymentTransaction 's transactionState always comes back as SKPaymentTransactionStatePurchased rather than SKPaymentTransactionStateRestored . Apparently SKPaymentTransactionStateRestored is only called when - (void)restoreCompletedTransactions , but when do I call this method?

StoreKit: Catch failed restore?

时间秒杀一切 提交于 2019-12-18 20:05:15
问题 I'm implementing In-App purchase feature with Restore button. I have a brand new test user set up, without any payments made. When I hit the restore button, and log in with the new test user, I cannot catch any delegated methods that tell me that the restoring transaction has failed (since there is nothing to restore). The only method that get invoked is -(void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue*)queue , but this method gets called in the case when restoring was