Universal purchases (iOS/tvOS)... tvOS not working

Hi.


I have a version 1.0 iOS App that is recently release and it has a bunch of in-app purchases. They all worked fine during development, using Test Flight and now in production. Over the last week, I created a tvOS version of this app and all of my in-app purchases are being returned as invalidProductIdentifiers.


I have scoured over possible reasons from the list to check and seems like I not missed anything obvious. I had filed a question with Apple and they basically pointed me to re-read about Universal Purchases


https://developer.apple.com/support/universal-purchase/


My iOS and tvOS app are listed in the same App Record in iTunesConnect. (They have the same bundle id).

All of my in-app purchases are listed as Ready for Sale (iOS version is live).


In Xcode, my app has two targets, the iOS and tvOS. Both share the same bundleID (matching iTunesConnect). The tvOS has the In-App Purchase Capability/entitlement added. The code to generate my list of valid products is shared between the two targets.


When I build and run the iOS version - all products are listed. I even have a new iOS build in development (1.1) that is still showing all my In-App Purchases.


However, for tvOS, my list comes back empty and upon inspection I see them invalidProductIdentifiers array.


I have tested this in both iOS Simulator and actual iPhone/AppleTV's. All on the iOS side work (even the simulator shows my products), but nothing on the tvOS side.


Reading the Universal Purchase line below, while consise, it is not so instructive.


"To make an In-App Purchase available on both platforms, you’ll need to implement the same In-App Purchase in both versions of your app. After you’ve enabled your app for universal purchase in My Apps on iTunes Connect, customers can restore your In-App Purchases on both platforms."


I think by "implement the same In-App Purchase" means both versions of my app are looking for same product identifiers.


Lastly the phrase "enabled your app for universal purchase", make me feel like there is a switch I am not seeing in iTunesConnect.


Has anyone had any luck with using the same iOS in-app purchases and tvOS in-app purchases?


Thanks in advance

I am unaware of the myriad issues associated with tvOS but can inform you of one of the most common reason for invalid products. The app decides to go to the sandbox or production environment depending on a host of things. If an Xcode running version is installed over an existing app store version or the user is logged into a real App Store account then the Xcode running version incorrectly goes to the production environment and fails to find any IAPs. (But you seem to have covered this in your description by saying it works under iOS - as long as that is the same device as the tvOS version.)


Good luck...

Thanks. I my latest case, the app is running on an actual Apple TV, that was installed via Test Flight. Still no products are being displayed. You are right to point out that I am able to see all my products on my iPhone using the same code-base of my matching update for iOS (installed via Test Flght too).


Interestingly. I have another part part of the code (restoring previous purchases). That is working on both iOS AND tvOS. I am getting back the one product that I purchased on iOS on my TV version. So that is at least telling me it able to communicate with the App Store.


I continue to poke around. Sad that this is the only part holding me up for days in submitting to Apple. Thanks again.

Have you been able to solve this issue? I have the same problem and I have no idea what's happening. I only get invalidProductIdentifiers

I have the exact same problem. Did anyone find a solution for this?

We were with the same problem running the app on Apple TV Simulator. After running it on a real AppleTV device (connected via USB) we started getting the product IDs. Then if you request the payment of one product on your code, you'll be requested to authenticate (with a sandbox user) and approve your purchase.


@SSDev, if perhaps you still have this problem, run your app from Xcode directly to Apple TV (connected with the USB cable) and not using TestFlight.

Yeah, SKProductsRequest doesn't work on tvOS simulator. It works on real Apple TV (plug to it via USB-C and run through Xcode).

Universal purchases (iOS/tvOS)... tvOS not working
 
 
Q