Impossible to add Apple StoreKit to a UE 5.8 project

Hi

So I added the plugin found here GitHub - apmason/UEAppleIAPPlugin to a number of projects in earlier versions of UE5 and it built without any problems of any kind. Just copy it into the project and double click the project to start and Bob’s your uncle.

Then I tried adding it to a UE5.8 project and it immediately refused to build saying the UE source is trying redeclare Vector in Mathematics.h. I asked the AI assistant for advice on how to add code to my project to bypass the compiler saying there are issues in the base UE source and was presented with many, many things to do to get this to compile.

These include separating all UE includes and Apple includes into separate files, making sure CoreMinimal was the first include, adding ApplePre and ApplePost includes around all Apple code, calling #undefine on Vector to try and force it to be defined at the “right time”, .ini file updates, build.cs updates… like I said, many,many tricks and hacks. Even so, setting the includeOrderVersionto UE5_8 causes the build to fail but setting it to UE5_7 causes the errors to move to another class.

The fix here is to add the UIKit to the modules list which then required more modules which then required more includes etc and eventually all errors go away…but building still fails due to “UIKit cannot be found”.

Changing the include order version back to 5_8 brings back the errors. So my question is this: How can I add StoreKit to a UE5.8 project or is that impossible starting from 5.8? I’m certain this will turn out to be an easy fix but what in the world might that fix be?

According to the source repo on GitHub this is the place and category to ask about this so I am hoping this is the right place to reach the right people to fix this issue.

To reproduce, just create a new project and add the above plugin. Job done. Easy mode. Your project is now dead in the water :pensive_face:

Thanks in advance for looking at this.
Ryunosuke