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
OMEGAPOINT
(OMEGAPOINT)
November 22, 2022, 4:03pm
3
Because of this specification, we are currently unable to introduce in-app purchases due to rejection by Apple’s review.
1 Like
KarmaT
(KarmaT)
October 23, 2023, 1:00pm
5
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…
gf11speed
(gf11speed)
October 29, 2023, 9:05pm
6
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.
araz01
(Araz Studio)
May 27, 2024, 7:02am
8
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
@GeorgeTheDev_1 My IAP’s are working now, Here how :
Add IOSEngine File (Path : ProjectDir/Config/IOS/IOSEngine.ini)
[OnlineSubsystem]
DefaultPlatformService=IOS
[OnlineSubsystemIOS.Store]
bSupportsInAppPurchasing=true
bUseStoreV2=true;
[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bEnableGameCenterSupport=True
NOTE : Do check in iOS Project settings that GameCenter in enabled.
Add Dependency in [ProjectName].Build.cs (If C++ Project)
PublicDependencyModuleNames.AddRange(new string[] …
VMukesh
(V Mukesh)
August 23, 2024, 12:37pm
11
do we need source code for mac (for ios build)too?
or only windows?
VMukesh
(V Mukesh)
August 27, 2024, 6:45am
13
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?
surajreddy
(Suraj Reddy)
August 29, 2024, 9:47am
14