We managed to make IAP working in TestFlight, but then had to create a new AppId in AppStoreConnect. After switching to the new AppId we are encountering NoProductsAvailable.
Paid Agreement is done
InAppPurchase Products are in Ready to Submit
The ProductId’s are matching the ones we use for builder.AddProduct(product_id, ProductType.Consumable)
UnityServices is initialised before we initialise UnityPurchasing
Version 4.7.0
Does anyone have an idea what we might have forgotten? Is there something like a checklist for this? We’ve seen other topics with this issue, but couldn’t find any solution yet.
You will need to also ensure your bundle identifier in Unity and Xcode matches the identifier for your app on AppStoreConnect.
To test production in app purchases your first in-app purchase must be submitted with a new app version. Subsequent IAP configuration changes/additions will not require a new app version.
The bundle_id is the same in both unity and the appstoreconnect. I think if they weren’t the same TestFlight won’t be able to link the ios-build to the appstoreconnect-app.
When uploading to TestFlight we use a new version - like 5.0 … 5.1 … 5.2
Everything is checked on Apple side and just fine. Maybe you miss something on unity iap package. For example, Apple’s StoreKit may has changed backends and unity iap is not fully integrated yet?
Hi, we’re facing this same issue too and have exhausted pretty much all the sane explanations and potential fixes.
One thing to note, this issue has been brought up on the Apple forums too (https://developer.apple.com/forums/thread/726252) just a couple of days ago and judging by the amount of views and messages that thread has received, it would seem this is an ongoing issue on Apple’s side. Unfortunately they have not acknowledge it as such yet.
I’m not familiar with the apple-api, but it would be very useful if apple or the iap-package can provide more detailed message. I see the developers have already integrated a listener OnInitializeFailed(InitializationFailureReason error, string? message) - this is great! But currently the message for NoProductsAvailable is empty. Or maybe introducing further Enum options.
More detailed message can help developers and package-users debug quicker. Otherwise people try over and over with further builds and have zero guidelines.
Quick info for you guys. I released on appstore today to see in app products are available. Yes they all became available now. But only store version not on test flight.
Unfortunately in this case the native iOS side StoreKit SKProductRequest and more specifically its respective SKProductResponse only contains an array of product details and an array of invalid product IDs.
Unity could theoretically wrap this lack of valid product details into a slightly more informative error but without any error codes from StoreKit’s side, “NoProductsAvailable” pretty much describes the entirety of information that StoreKit is returning: That none of the product IDs requested from Apple’s servers returned valid product details.
Part of the problem is on the Apple side. They introduced a fix and now the Initialisation is working, but the ProductPurchase doesn’t - it returns PurchaseFailureReason.Unknown
Hint for people experiencing those issues - it can be problem on the Apple side - so you should most probably wait for them to fix it. Rebuilding and publishing further builds may be redundant.
Same change happened on our side, product details are now returning successfully in the sandbox environment but purchase attempts fail with a “This item is not available.” error.
This issue also seems to be reported by others so definitely still an ongoing Apple issue. Not much to do here but wait.
I’m still not seeing any orders/localizedPriceStrings working in TestFlight or production, but I checked one of my older games running an older version of unity purchasing, and it still works fine. It makes me wonder if I should try downgrading from 4.7 and seeing if it fixes things.
Ok, you can disregard me, I got my issue figured out. I have a custom data model to store products with a unified ID, and I had the wrong app store in the config. After adding AppleAppStore.Name, it all works fine
public IDs GetId()
{
return new IDs()
{
{StoreId, GooglePlay.Name },
{StoreId, AppleAppStore.Name }, <--- didn't have this
{StoreId, MacAppStore.Name }
};
}