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

I am not trying to overrite anything. I am trying to do the absolute minimal effort but:

Unreal ASSSUMES you are logged into something based on the platform you are compiling for and thus your UniquePlayerID willl be set. In the case of iOS, that is not true. You have to first log into GameCenter before that Unique Id is set. If you do NOT log into GameCenter and you look at the output logs in Xcode the errors say “Net Id was invalid. Request was not even sent”. I love how they add the word “even” in that log. “You didn’t provide a unique Id, so this code won’t even run. We won’t even TRY to contact Apple to get your products. Log in to GameCenter first then come see me when you are done”. That is the response from Unreal.

So I implemented GameCenter login and after that all the built in functions worked as expected and all was well with the world. Then I submitted my update to Apple and they rejected it saying “Login to GameCenter should be OPTIONAL. We will NEVER accept your game as long as you force people to log into GameCenter”

So now what? Unreal FORCES you to do it and Apple flat out rejects your app IF you do it.

The only option is to write your own version of that 2 simple functions: GetPurchasedItems and MakePurchase…. those two functions are all I need. How hard can it be to write 2 functions? Well, as soon as you import any of the core Apple libraries Unreal complains about confilicts within itself. Please take special care to read that line very carefully: Unreal doesn’t complain about the code YOU write, it complains about it’s own internal code conflicting with itself in other of it’s internal code.

So that “absolute minimal effort” now involves rewriting Unreal itself. Yeah, I don’t have the skills to rewrite the core of Unreal Engine. And this is where the problem comes in. Once this new version of Unreal goes live, will this problem persist or not? If not, then how in the world did they fix it? Honestly, i don’t care about the how, I just want it to work again like it does for every other version of Unreal up to 5.7

From what I understand, what happened in 5.8 is that Epic now implements a strict “only include what you use” policy and many of those precompiled headers that include so many things for you, yeah, they are gone now. Many of the things that “just worked” in the past now requires extra headers to be included. I don’t know how to explain it… they just got a lot more strict with what gets included and in what order. Now, they declare a struct in one place and declare it again in another place and they do it in such a way that it works. Now, as soon as you add any Apple code into the mix and Apple also defines the same struct then Unreal sees APPLE’s struct FIRST and then complains about it’s own structs when it tries to define them. Problem.

Epic is well aware of this issue and actually includes headers that you call directly BEFORE including Apple headers and one to call directly AFTER including Apple headers. The ApplePreHeaders.h (or whatever it’s called) undefines all Unreal’s types and the ApplePostHeaders.h redeclares them when it’s all done. This was supposed to solve this problem and probably did in earlier versions of Unreal but not any more.

EDIT:
See this post also Impossible to add Apple StoreKit to a UE 5.8 project