Is Game Center login required for using Make an In-App Purchase v2 on iOS?

We are seeing a crash at line 41 in InAppPurchaseCallbackProxy2.cpp because PlayerController->GetLocalPlayer()->GetUniqueNetIdFromCachedControllerId() returns and invalid id.

PurchasingPlayer = (*PlayerController->GetLocalPlayer()->GetUniqueNetIdFromCachedControllerId()).AsShared();

Once I login into Game Center, the NetId becomes valid and I can complete in app purchases. I am able to complete in app purchases on Android without logging into Google Play Games.

Testing on iPhone 8 and iPhone 6s+.
100% repro.

2 Likes

Have you solved it? I am having the same problem.

1 Like

Because of this specification, we are currently unable to introduce in-app purchases due to rejection by Apple’s review.

1 Like

Our solution : In AppStoreConnect, check “Agreements, Tax and Banking” and setup the “Paid Apps” agreement : P

P.S. Sorry for the salty reply a year back…

I’m seeing a similar issue on UE 5.3.1.

Does In-App purchases work for anyone on UE5.3 on iOS? I haven’t been able to get it working due to this error:

UInAppPurchaseCallbackProxy::Trigger - Invalid player UniqueNetId

This is happening because in the InAppPurchaseCheckoutCallbackProxy::TriggerCheckout() function, this line is failing on IsValid() check:

if( FUniqueNetIdRepl PurchasingPlayer = PlayerController->GetLocalPlayer()->GetUniqueNetIdFromCachedControllerId(); PurchasingPlayer.IsValid())

I have confirmed that my Paid App Agreement is valid and active, that doesn’t seem to be the issue.

Not using Game Center and that option is disabled in the certificate.

Everything works fine in a UE 4.27 build so I know the purchases are setup correctly.

@gf11speed, did you find any solution for this? My IAP was also not working on 5.3. After searching, I found that the UniqueNetID is invalid.

f apple, who do they think they are, telling how i can run my company, im gonna show them what REAL developer can do.

Did you ever figure this out? I’m running into the same issue you did.

yeah i did figured it out

do we need source code for mac (for ios build)too?
or only windows?

just for android

In Android crash seems to be fixed now, thanks
But IOS i get IAP failed everytime
any new steps to be followed for ue5.3?

Android: Start in app purchase always fails - #4 by surajreddy here follow this

2026 now and running UE 5.8.0 and still the same issue.

Can’t make a purchase without being logged in to Game Center and yet Apple is rejecting my app because they want Game Center login to be OPTIONAL! Wtf? :man_shrugging:

EDIT:
Okay, so a bit of research later and I have the definitive answer.
Unreal’s internal system for handling in-app purchases ASSUMES you are logged in to GameCenter (on iOS. Other platforms on other platforms) and then makes a hardcoded call to fetch your id. There are ways to try and fake this id so the function returns something valid but I have not been able to get them to work

You basically have three options open to you:

  1. Log in to Game Center, yes. If using the built in stuff you NEED to be logged in to Game Center
  2. Learn the Apple API’s and write your own translate layer to bring those API’s to your code then code in Apple’s APIs directly from within your project. This way you can do in-app purchases while a user is logged into their phone, not their GameCenter. Thus, GameCenter is completely bypassed and not needed. A lot of work, though!
  3. Buy a plugin where someone has already done the work. Simplest way but those plugins don’t come cheap :frowning: