Setting up UnityIAP for iOS - I'm totally stuck
Hey there,
I've built a game for android and iOS which is just about to be finished, the only thing left is iOS in app purchases. Android works perfectly fine, but I can't seem to get it to work on iOS.
I'm using a modified version of the unity iap script from the docs which works fine for android, but somehow not for iOS. Here is my initialization:
public void InitiateController()
{
var module = StandardPurchasingModule.Instance();
ConfigurationBuilder builder = ConfigurationBuilder.Instance(module);
foreach (CatalogItem item in buyableItems)
builder.AddProduct(item.ItemId, ProductType.Consumable);
UnityPurchasing.Initialize(this, builder);
validator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), Application.bundleIdentifier);
}
The IDs im adding to the builder are correct product ids as I use them in iTunes Connect, I have verified that using Debug commands.
Initialization fails because it can't find the products.
Nov 17 15:00:11 [303] : UnityIAP:Requesting 6 products Nov 17 15:00:11 [303] : UnityIAP:Requesting product data... Nov 17 15:00:12 [303] : UnityIAP:Received 0 products
I have no idea what is missing. I set up all the 6 products in iTunes Connect as consumables, only missing is the screenshot and the submit of course. I've added a sandbox user to be able to test them, but I ain't even receiving them.
Anyone able to tell me what could be wrong?
I've had a quick look and found this forum entry:
https://forum.unity3d.com/threads/iap-unavailable-product-issue.374734/
two questions:
- did any of the consumables need verification by Apple? - if not, did you run the game in Release configuration? (happened to me a lot due to all the debugging)
Hello and thanks for your reply,
as far as I can tell all those consumables need verification, right? But shouldn't I be able to test them with a sandbox account without them being verified, as that needs an app review? See this screenshot:
[1]: /storage/temp/82374-inapppurchases.jpg
Abd yes, I'm running in release configuration.
Answer by kendogar · Nov 18, 2016 at 05:17 PM
Alright, I've found my problem.
Since my game is going to be free to play with in app purchases, I had reasons to believe I need a "Free Applications" contract in iTunes Connect. Apparently free-to-play with in app purchases counts as "Paid Applications" for Apple, after requesting the "Paid Applications" contract everything worked fine.
At this point I've gotta thank apple for making the whole app development and release process that much more unnecessarily complicated than it has to be. Just take a look at how google's done it and copy some of it, jesus...
Anyway, if any of you ever encounter the same problem, check that you have a "Paid Applications" contract under "Agreements, Tax, and Banking" including full banking information.
Cheers
Answer by bigboer · May 11, 2020 at 01:19 PM
Hey @ kendogar, thanks for the info. Did you have to submit your in aap purchases for review With a build of did you just submit them standalone before they were approved for review and appeared in your app?
I usually do submit them together with the first test-flight build in order to test the in-app purchase with test-flight users and they work right away. Does that help you?
Your answer
![](https://koobas.hobune.stream/wayback/20220612100848im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The product.receipt of a cancelled IAP does not return null. Help? 1 Answer
Problems with plugins 5 Answers
iOS 14 Family Sharing for IAP and subscriptions 0 Answers
Android - Invoking the in-app billing service without setting a target package for the intent 1 Answer
InApp purchase dont working 0 Answers