In-App purchases not working iOS

We’re working on getting In-App purchases to work. Using 4.5.1 and we seem to have changed the ‘bSupportInAppPurchasing=True’ in folder ‘C:\Program Files\Epic Games\4.5\Engine\Config\IOS’ yet whenever we test out the in-app purchase functionality, it fails always.

Any solutions to this?

Here’s the IOSEngine.ini:
[Audio]
AudioDeviceModuleName=IOSAudio

[OnlineSubsystem]
DefaultPlatformService=IOS

[Advertising]
DefaultProviderName=IOSAdvertising

[DeviceProfileManager]
DeviceProfileSelectionModule="IOSDeviceProfileSelector"

[OnlineSubsystemIOS.Store]
bSupportInAppPurchasing=True

Hi GameEon,

I should be able to assist you with this :slight_smile:
Let’s start with how you are testing your IAPs.

Note that the IAP system has changed a lot since 4.5, so it will be beneficial to you if you upgrade your engine version. We have also added blueprint support since then.

/

That’s no problem. Do we have any log output to determine the error code from IAP?

If there is no LogOnline output. we may need to enable it in the DefaultEngine.ini. Just add:

[Core.Log]
LogOnline=verbose

Hey ,
Thanks for your assistance :slight_smile:

We do realise a lot’s been changed since 4.5 but our project is complete and we didn’t want to take chances on upgrading our version since all our development was done in 4.5.1

Having said that, we’ve used the ‘Make In-App Purchase’ blueprint method and also entered the Product Identifier properly in it. But still it gives a failure message each time. Went through a few posts online and tried to implement the IOSEngine.ini method but yet no success.

Hey ,

Getting this log message:

LogScript:Warning: UInAppPurchaseCallbackProxy::Trigger - Invalid or uninitialized OnlineSubsystem

Also getting this message as well:

LogOnline:Warning: No default platform service specified for OnlineSubsystem

It seems like the engine isnt respecting your config entry.

[OnlineSubsystem]
DefaultPlatformService=IOS

Are you in a position to debug the code? I can point you in the right place to find why it’s not using OSSIOS.

/

Just something else, Do you happen to have anything related to OnlineSubsystem in your projects DefaultEngine.ini?

Updating the engine to 4.7.3, lets see if that solves this problem

There’s nothing related to OnlineSubsystem in DefaultEngine.ini and seems like we can’t upgrade to 4.7.3 because our assets are taking too much time to load and many functions have been deprecated.

Should there be some declaration for OnlineSubsystem in DefaultEngine.ini?

Your DefaultEngine.ini should contain the sections you highlighted above, yes.

It’s pretty strange about the slow startup speeds. Does the Log display any information about what is happening there?

The log gets stuck on some weird resolution problem. We kept it for build for 1 entire day and still no progress.

Hey GameEon, apologies for the delay, this thread got lost in spam. It seems as if the OSS is not being initialized correctly. So it’s worth making sure that your defaultEngine.ini or IOSEngine.ini contains the sections and values we discussed above.

Are you in a position to debug the code?

/T

Hey GameEon,

Can you just make sure that the OSS is added as a dependency of your game.build.cs.

PublicDependencyModuleNames.Add("OnlineSubsystem");
DynamicallyLoadedModuleNames.Add("OnlineSubsystemIOS");

This oughta be all you need along with the ini options you highlighted initially.

/