We are seeing a crash at line 41 in InAppPurchaseCallbackProxy2.cpp because PlayerController->GetLocalPlayer()->GetUniqueNetIdFromCachedControllerId() returns and invalid id.
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.
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?
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:
Log in to Game Center, yes. If using the built in stuff you NEED to be logged in to Game Center
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!
Buy a plugin where someone has already done the work. Simplest way but those plugins don’t come cheap