iOS In-App purchase inside Action Extension - ios

Is it possible to create Custom iOS Extension, probably of type Action
https://developer.apple.com/app-extensions/
And inside its content purchase product using in-app purchase ?
Let say I have limited app, with extension functionality and I want to give them option to buy it, while they are still inside their app, using extension itself.

Related

iOS InApp Purchase in Action Extension app

I've tried to add a working inApp purchase view inside an Action Extension.
As you know, in Action Extension we have 2 targets, one is the normal App (the app you can download from app store), and the second one the extension.
The view inApp purchase, works in the normal app (first target) but doesn't work in the extension target, I mean the loading purchase product is loop running without found the purchase product.
I've also opened API for the extension target (no restricted API) on building setting.
Any one know how to do?
I think you can do it in different way !
instead of trying to use in-App purchase on Action Extension itself
make the app checking on UserDefault with AppGroup !
.
This will help you on how to share UserDefault with App Extension by using it with AppGroup
That mean the user Must use the app first
then when the user make the purchased , you will change value from false to true
and save it to UserDefault
then when the user using the Action Extension
you will check the UserDefault
if the value changed to true
then the user can use the Action Extension
BTW : I remembered reading about Apple will rejected the app if the App Extension didn't do any functions !
So I think you need to add some limitation if the user didn't purchased
and remove the limitation after purchased
I hope this help you

Possible to sell various content sets via a single in-app purchase slot?

If my application offers four content sets that can alter the appearance of the app, is it possible (in iOS 11) to have a single in-app purchase where the content set is specified, or would they have to be configured as four different in-app purchases? They are all the same price, and the customer can purchase more than one.
From Apple's docs (no changes for iOS 11):
The SKMutablePayment class defines a request to the Apple App Store to process payment for additional functionality offered by your application. A payment encapsulates a string that identifies a particular product and the quantity of that item the user would like to purchase.

Enable Today's View widget via in-app purchase

What I have done so far:
I have created a Today's widget via app extension for my containing app. Widget is working perfectly the way I want. My application has the feature of in-app purchases.
What I want:
I want the widget to not show up(even the name of widget) in Today's view unless the user don't make purchases from the containing app.
p.s
In-app purchases is working fine and I have a UserDefault in my Today's view controller which tells me whether user has made in-app purchases or not.
You don't get to make that choice.
If the today extension exists, it shows up in the list. No exceptions.
If the user enables the today extension, it's enabled.
What you would need to do is let the today extension be displayed, but without whatever functionality your in-app purchase enables. You can't have the extension and prevent it from appearing, but you can still control what it shows when it's visible.
I'm just gonna point out that enabling widget functionality via IAP will most probably get rejected from the App Store(as it recently did for me).
Here's the message I got in Resolution Center:
The Today Extension should provide some functionality before purchase
with IAP per the App Extension Programming Guide.

How can I add multiple In-App purchases in iTunes Connect?

Usually i am going to
iTunes connect -> my app -> Manage In-App Purchase to add single item to the in app-purchase of my app.
I wanna to know if there is an API i can call it to add multiple files at once to the in-app purchase.
Help is appreciated
There is no such API. You should add all of them manually.
You have to add them manually. And check them during request. Store the appId in array and send the appropriate id with request from array. This is the only way to handle Multiple inAppp
No There is No Such API, You have to add them all for each tier you want to set.
for full app purchase setting and working check out Reywenderlich Full In-App purchase implementation
You can use the Application Loader from your Mac. There is a template there you can download and populate with your IAPs

Bulk creation of In-App purchases or an alternative approach?

I have been looking for a solution for a question for a while without any real luck. Is there a way to bulk create non-consumable in-App purchases via iTunes Connect? I have roughly 20,000 individual items within my app that can be unlocked via in-App purchase.
If there is not a bulk upload option, which I suspect there is not, is there a way to just place a single generic in-App purchase that will unlock a selected item? For example I would present a table view with items available for unlocking based on user search criteria, each has a unique ID, with a button that would purchase that item that is selected. All the items are the same price and of the same type. Seems like this should work but I have not idea how to implement it with the in-App purchase confines.
Any thoughts?
Thanks
There's actually a way: uploading a csv(comma seperated values) text file, containing the products' metadata, and uploading it through Application Loader.
Check This Post
Quoting:
You can use the Application Loader to mass import in app purchases: https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf
Read the "Creating a Package from a File" section on page 15:
You can create a package containing the In-App Purchase you want to submit to iTunes by importing details from an Application Loader file and adding and editing the metadata. When creating a package from a file, be sure to use the Application Loader template. To get a copy of the template, choose File > Open App Import Template in Application Loader 2.9. Application Loader creates the AppFileImportTemplates folder containing the AppMassImportTemplate.txt template. To always have an original version of the template file, be sure to make a copy of the template before editing.
Regards
I think, that making 20.000 items in iTunes Connect isn't a right choice for you,
You can try to combine Apple's iAP with your server — just make several tiers of IAP(1$,2$,3$), each responsible for a variety of items with the same price, and on your server take track of what specific item have user purchase.
Because there is no default solution, provided by Apple, to make such kind of Store.

Resources