In-App purchases in 4.18

Does anyone have this working in 4.18? The documentation looks nothing like real life.

Docs:

https://docs.unrealengine.com/latest/images/Platforms/Mobile/InAppPurchases/image_3.jpg

Real life:

I think I’ve worked it out, although it looks like a mess compared to the old way of doing events:

And for the functions, add an input argument:

Not sure why the big step backwards in usability but that’s how you do it. The functions you make will not appear in the drop down until you match the signature hint in the event bind node.

My new problem is something other people have had, except none of their solutions have helped.

When I load up and try to check for in-app purchases I get this:


UInAppPurchaseQueryCallbackProxy::TriggerQuery - Invalid or uninitialized OnlineSubsystem

I’ve added subsystem things to the Build.cs file, I’ve added things to defaultengine.ini and iosengine.ini.

Does anyone have any advice about what else needs to be done?

Progress: I got all of the config and build.cs extrast from the Unreal Match 3 example and now the Online Subsystem is initialized.

Unfortunately it says “In App Purchases are not supported by Online Subsystem” even though bSupportsInAppPurchasing=True is set in several places.

Also, I tried finding the same nodes in the Unreal Match 3 example and I found a node that looks just like the docs and another one that looks just like my example. So why can’t my project show the nodes correctly?

Anyone have any ideas?

Update: it turns out you can call both nodes but only in a UI widget. I am really confused why it’s arranged like that, but I’ll… try moving my store logic into a… ui widget. Okay then.

Update 2: problem did not go away, in-app purchases are still not supported by the online subsystem.

I’m making more progress. I believe I wasn’t using my distribution cert for signing, because when I turn it on for sure packaging fails with something about get-task-allow entitlements, so it never would have returned available in-app purchases anyway.

But back to the Online Subsystem problem. I’ve also tried figuring out which Online Subsystem plugins need to be turned off. I’ve turned off everything except Online Subsystem, Online Subsystem Utils and Online Subsystem IOS, but I get this message during packaging:


UATHelper: Packaging (iOS):   LogModuleManager: Warning: No filename provided for module OnlineSubsystemIOS
UATHelper: Packaging (iOS):   LogModuleManager: Warning: ModuleManager: Unable to load module 'OnlineSubsystemIOS' because the file '/Users/Shared/Epic Games/UE_4.18/Engine/Binaries/Mac/' was not found.
UATHelper: Packaging (iOS):   LogModuleManager: Warning: No filename provided for module OnlineSubsystemNull
UATHelper: Packaging (iOS):   LogModuleManager: Warning: ModuleManager: Unable to load module 'OnlineSubsystemNull' because the file '/Users/Shared/Epic Games/UE_4.18/Engine/Binaries/Mac/' was not found.

I’ve disabled OnlineSubsystemNull after it was suggested by several answerhub posts, but otherwise I can’t find a solution to this error.

Just FYI, the “documentation”-like BP nodes only can be used in main graph, in functions there are only the ones you used available.

I’m looking forward to port a game to IOS, I found some bugs in the android version of getInAppPurchases. Does it behave correctly the IOS deployment of these functions?

That makes sense.

I’ve had zero success at getting the iOS Online Subsystem module to load. I just keep getting this. I don’t know how to fix it.


UATHelper: Packaging (iOS):   LogModuleManager: Warning: No filename provided for module OnlineSubsystemIOS
UATHelper: Packaging (iOS):   LogModuleManager: Warning: ModuleManager: Unable to load module 'OnlineSubsystemIOS' because the file '/Users/Shared/Epic Games/UE_4.18/Engine/Binaries/Mac/' was not found. 

I’d be interested in talking to someone who has actually had this working. I am having my doubts that in-app purchases via blueprints or any UE subsystem have ever worked. I have scoured the internet for two months and not found evidence that anyone has done this successfully.

If it’s not working we need to make it work, but that’s a goose chase until there’s some solid confirmation that it worked in the past and that it’s broken now. I’ve had posts up on answerhub for a month and no reply - it’d be nice if someone from Epic familiar with iOS in-app purchases could drop in and discuss it.

I’ve been advised that the better way forward is to use GameSparks to handle the in-app purchases, but that’s not nearly as nice and tidy as using the built-in stuff. But I think that may be our only option.

Not sure about IOS, but for Android target minor tweaking had to be done to the android java to get all the functionality I needed. Check the Android/bp forum or this link In app purchases for Android with Unreal Engine 4.16 and Blueprints – AP, although it won’t apply for you probably. Let us know if you get it working pls.

Has anyone ever reported this issue to the new bug reporting system or AH ?!

That makes sense.

I’ve had zero success at getting the iOS Online Subsystem module to load. I just keep getting this. I don’t know how to fix it.


UATHelper: Packaging (iOS): LogModuleManager: Warning: No filename provided for module OnlineSubsystemIOS
UATHelper: Packaging (iOS): LogModuleManager: Warning: ModuleManager: Unable to load module 'OnlineSubsystemIOS' because the file '/Users/Shared/Epic Games/UE_4.18/Engine/Binaries/Mac/' was not found. 

[/QUOTE]

My studio’s game shipped with several IAPs. It was a lot of trial and error to get it to work, and referencing the Unreal Match 3 project.

Make sure you have an IOSEngine.ini file in your Config folder, in an IOS subfolder (path is */Config/IOS/IOSEngine.ini). I started with the IOSEngine.ini file that is in the Engine’s base Config folder (search for IOSEngine.ini in your Engine install). Then make sure these lines are added or updated (if they’re already in there):


    [OnlineSubsystem]
    DefaultPlatformService=IOS


    [OnlineSubsystemIOS.Store]
    bSupportsInAppPurchasing=true
    bUseStoreV2=false

bUseStoreV2=false is SUPER important. With it set to true, there’s an issue that causes all IAPs to fail; but setting it to false fixes that issue.

Also, in your project’s Build file (only available if you have C++ in the project):

Below where you add the Public Dependency Module Names, add this line:


    DynamicallyLoadedModuleNames.Add("OnlineSubsystemNull");

Then, below that add:
(note: the Private Dependency Module Names are for any modules you’re using on iOS, so your list might vary, but the important one here is “OnlineSubsystem”)
(second note: it’s my understanding that the Dynamically Loaded Module Names is required to make sure the iOS subsystem is loaded)


    if (Target.Platform == UnrealTargetPlatform.IOS)
    {
        PrivateDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "OnlineSubsystem" });
        DynamicallyLoadedModuleNames.Add("OnlineSubsystemIOS");
    }

And finally, uncomment the following line (or add it to the end of the constructor if it’s not already there):


    PrivateDependencyModuleNames.Add("OnlineSubsystem");

Lastly, make sure the following plugins are enabled:

Online Subsystem
Online Subsystem iOS
Online Subsystem NULL
Online Subsystem Utils

If I remember anything else I did, I’ll post it here. But that should be it.

Thanks for the reply! I did all of that EXCEPT the v2Store to false thing. Trying it now!

Well, I’m still getting this warning a startup:


LogModuleManager: Warning: No filename provided for module OnlineSubsystemIOS
LogModuleManager: Warning: ModuleManager: Unable to load module 'OnlineSubsystemIOS' because the file '/Users/Shared/Epic Games/UE_4.18/Engine/Binaries/Mac/' was not found.

It seems pretty obvious what’s going wrong there but I do not know how to fix it. I’ll try changing the base iOS engine INI file in the install folder too.

Nope, still failing to load.

Did you ever figure out a solution to this issue? I’m encountering it as well.

Haven’t had a proper go with 4.19 yet.

you have found a solution to this problem, I have been suffering for many weeks with purchases

LogModuleManager: Warning: No filename provided for module OnlineSubsystemIOS LogModuleManager: Warning: ModuleManager: Unable to load module ‘OnlineSubsystemIOS’ because the file ‘/Users/Shared/Epic Games/UE_4.18/Engine/Binaries/Mac/’ was not found. I also have this error, sorry for my English

I haven’t been back to try this again yet, that’s how crazy busy I am. I will have to get to it within the next month though.

I strongly recommend going to 4.19 though, if only for the other iOS-specific fixes it has.

If you get something right away, I’m already in despair 3 months

I’m on ue 4.19.2.I did not manage to make in-app purchases I work on a blueprint I apologize for English просто я Русский

my problem was solved when I included the code in the project and everything worked from blueprint and failed