Currently impossible to add StoreKit to UE5.8?

I downloaded a plugin from here: GitHub - apmason/UEAppleIAPPlugin

It is a very simple and small plugin that imports Foundation and StoreKit. Using it in lower versions of UE is as simple as dropping the folder into the Plugins/MarketPlace folder and then starting Unreal. Easy.

In UE5.8, though, doing this causes a bunch of errors in the Ue source code (not the plugin). Primarily it complains that various classes are trying to redeclare and use Vector as a structure and it doesn’t like that. According to the AI assistant this is due to the new Include Order and Unreal’s new strict header usage. It has many, many, many ideas on how to hack and try tricks to bypass this but it all failed miserably.

To get this plugin “to simply build” I have had to do the following:

  1. make sure I separate Unreal headers and Apple headers into separate files, making absolutely certain to include the unreal headers at the TOP of the .mm files

  2. Add the “Apple/PreAppleSystemHeaders.h” and “Apple/PostAppleSystemHeaders.h” headers around the Apple libraries

  3. Fix my build.cs by adding “InputCore”, “ApplicationCore” to PublicDependencyModuleNames, manually setting the include path for Apple’s SDKs and adding some more modules like so:

    string ApplePath = Path.Combine(Target.RelativeEnginePath, “Source/Runtime/ApplicationCore/Private/Apple”);
    PrivateIncludePaths.Add(ApplePath);

    PublicFrameworks.AddRange(new string[] { "UIKit", "StoreKit", "Foundation", "QuartzCore" });
    
  4. Update my Target.cs but changing IncludeOrderVersion to a lower version since 5.8/Latest simply causes too many Vector errors, making sure BuildEnvironment is set to shared and NOT Unique and setting bOverrideBuildEnvironment to true.

  5. Next I had to update my DefaultEngine.ini to ensure bUseStoreV2 is set to false

And after all of this… it still fails to build. It no longer shows and yellow or red errors or warnings but building fails and there is a plain white message saying it can’t find the UIKit framework.

If I am correct then making a new project and trying to add StoreKit to it will automatically make that project fail but I have linked the plugin above as a simple sample project to test with.

Is it just me/this plugin or can anyone else use StoreKit with Ue 5.8 and actually get their project to compile?