How to detect which country price is loading in InappPurchase? - ios

I want to change my consumable subscription price. also i need to show the old price of the same consumable subscription.
If i know which country i will compare with my local price list and i can display the old price.
OR
DO any one have different solution for my requirement?
Thanks

((SKProduct *)product).priceLocale;

Related

How to fetch InApp Purchase Product Prices in Local currency in iOS?

I am implementing InApp Purchase Products in AppStoreConnect where we get to choose the price in Dollars($). Let's say I have created a Product with the Price of $0.99 which is equivalent to £0.89. Now I want to display the equivalent price of United Kingdom in my App. But unfortunately All I am able to achieve is to get £0.99 from different solutions that provides locale price based on the settings. But this is wrong as I want to ideally display the actual price in GBP which is only 0.89 and not 0.99.
Any help in resolving this would be very helpful.
P.S:- I have tried solutions from How to get locale currency price for in-app purchases in iOS? but none seem to work properly.

How to implement Auto renewable subscription with first time discount

I want to implement auto renewable subscription with different discounts offers to the user.
I have one product id but I want to apply different discount on same product id.
Scenario like this,
If user purchased within 1 week of installed app then want to give 50% discount on first payment.
If user purchased after 1 week and before 2nd week completion then want to give 25% discount on first payment.
Else user go with original price of product..
To achieve this functionality I have searched over internet and found something SKPaymentDiscount. But I don’t know I can achieve with SKPaymentDiscount or not.
If anybody have implemented same things or have experience with SKPaymentDiscount then please share with me.
If anybody have other suggestions then I will try that also.
Thanks in advance and welcome the suggestions.
As far as I know you cannot change the introductory offer dynamically on an auto renewable subscription. A workaround could be to create two different subscription types with different product IDs and different introductory offers. Then you can dynamically select the desired product ID based on the specified condition.
Keep in mind that the users will only get the introductory offer if they haven't purchased the product previously.
A similar question:
Free trial implementation for auto-renewable subscription for macOS app
Some relevant links in Apple's documentation:
App Store Connect Help - Set an introductory offer for an auto-renewable subscription:
https://help.apple.com/app-store-connect/#/deve1d49254f
StoreKit Documentation - Implementing Subscription Offers in Your App:
https://developer.apple.com/documentation/storekit/in-app_purchase/implementing_subscription_offers_in_your_app
No, you can not set introductory offer for different time stamp/ for different user as per your requirement.
You need to create 3 different products and assign the product id's according to user.
For SKPaymentdiscount:-
The SKPaymentDiscount contains the details of a subscription offer discount that you want to apply to a SKMutablePayment.
For more information follow :
https://developer.apple.com/documentation/storekit/skpaymentdiscount
Also check this cool link to know more about SKPaymentdicount class
https://blog.apphud.com/subscription-offers/

How to set up a single In-App Purchase Product having multiple Price Tiers?

I have implemented In-App Purchases in various apps before wherein we can set a price based on a specific Tier for a Product.
Now in this case, the price of the product depends on the number of people. For example, a video will Cost $ 0.99 for >20 students, for >50 students it will be $1.99 ,etc.
So, I thought of making different products for each such case.
Eg:
Product1. VideoForUpto20Students for $0.99. (Video course 1)
Product2. VideoForUpto50Students for $1.99. (Video course 1)
So if I implement it in this way then if the number of students increase, then I will have to create more product Identifiers for a same Product.
Again, I have a number of Video Courses approx. 40 ! That means, the total number of product identifiers for 40 Video Courses having 4 different prices will (40 * 4) = 160 product identifiers.
So, do I need to create different product identifiers for the same product to set multiple prices or is there any other alternative ?
Please help! Thanks in advance!
You will have to create different identifiers for every In-App Purchase unfortunately.
From the accepted answer here In-app purchase custom price:
As noted by other poster, you cannot have variable in-app purchases.
You have to select one of the provided price tiers.
While you aren't exactly making it so the price is changing a lot (since your idea isn't a delivery service), if it is going to change at all you are going to need to create multiple identifiers.

Non Consumable and Dynamic in app purchase

I am having an issue implementing the kind of in-app purchase that my application demands, Basically we need to sell story books but the books and their prices are not fixed as the book list comes from some server. The price range is fixed i.e a book will be having price from this 3 prices(0.99$, 1.99$, 2.99$).Apple demands the purchase of books to be a non-consumable purchase, the issue is that we create 3 in-app purchase that I mentioned but there can be any number of books having the price 0.99$ but once we have purchased a book with in-app id of price 0.99$, if we purchase another book with same in-app ID it will say you have already purchased this item.We just want is to create a single in-app id and use them with multiple books of same price.Please help me out with some solution regarding this issue.
For non-consumable in-app purchase you will need to create an in-app purchase code in iTunesConnect for each product. You can't use a generic product code as content purchases need to be restorable (and you would also have the problem that you pointed out of not being able to purchase more than one product at each price point).
Each content in-app purchasable item needs to be submitted to Apple for approval.
Maybe you can try to let users purchase virtual currencies in your app. Then let them use those currencies to buy your books. In this case, you don't have to worry about the dynamic price and all you have is a single IAP item(currencies). But your server has to handle the purchase history carefully.
Not sure if this helps, i am dealing with the same problem in subscription items.
You can create three consumables IAPs; a 'One dollar book' consumable, a 'two dollar book' consumable and a 'three dollar book' consumable. Each consumable can be used by the user to download (or otherwise secure access to) one book in that price category. Alternatively you could just sell Tokens and require that the user cash in 1,2 or 3 Tokens to buy a book in each of the three (or more) categories. You would need to keep track of the user's purchases or create some way of allowing the user to transfer rights from one device to another device. iCloud (each App has a key-value object) is good at managing that.

How to change price of product programmatically in in-app Purchase functionality?

I want to change price of product dynamically from mobile app on basis of email id through which user login.
Do Apple allow do this? If yes , Please tell me how to do this.
Prices for in-app purchase are set through iTunesconnect. As far as I am aware there is no API available to change prices and prices cannot be changed dynamically, only for specific periods of time (such as a 1 week "sale") or set indefinitely.
You could have multiple products registered at different price points and decide which product to display to a particular user - but be aware, the in-app purchase products are visible in the iTunes store, so your customers would be able to see all of the different price-points and products that you were selling
I do not think apple allows to do this. You can set it using itunesconnect. Application can only retrieve the information of products. They have not provide any web call to change the information of inapp purchase product in their programming guideline.

Resources