In app purchase is failing for iOS

Hi all,

I have been working on the mobile game for iOS. I want to add an in-app purchase for ad free game for our gamers. I have followed this [link text][1] as a sample.

Unfortunately, getting no response after clicking on purchase in my case. Kindly provide some help of resolving my problem.

I am testing this feature via mobile connected to my computer. No response after clicking on my mobile device. It shows failed when I test on my computer.

1)Am I testing in the right way?
2) Where can I set cost for this feature for the users? Still not very clear of the the whole picture behind this feature.

My DefaultEngine.ini:

[URL]
[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Mobile
AppliedTargetedHardwareClass=Mobile
DefaultGraphicsPerformance=Maximum
AppliedDefaultGraphicsPerformance=Maximum

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bEnableIOSSupport=True
bEnableGameCenterSupport=True
bSupportsMetal=True
bSupportsMetalMRT=False
bSupportsOpenGLES2=True
bDevForArmV7=True
bDevForArm64=False
bDevForArmV7S=False
bShipForArmV7=True
bShipForArm64=True
bShipForArmV7S=False
RemoteServerName=
bUseRSync=False
RSyncUsername=
SSHPrivateKeyOverridePath=
bSupportsPortraitOrientation=False
bSupportsUpsideDownOrientation=False
bSupportsLandscapeLeftOrientation=True
bSupportsLandscapeRightOrientation=True
BundleDisplayName=***
BundleName=[PROJECT_NAME]
BundleIdentifier=****
VersionInfo=1.0
FrameRateLock=PUFRL_30
MinimumiOSVersion=IOS_61
bSupportsIPad=True
bSupportsIPhone=True
AdditionalPlistData=

[/Script/UnrealEd.CookerSettings]
DefaultPVRTCQuality=1
DefaultASTCQualityBySpeed=3
DefaultASTCQualityBySize=0

[/Script/Engine.UserInterfaceSettings]
RenderFocusRule=NavigationOnly
DefaultCursor=None
TextEditBeamCursor=None
CrosshairsCursor=None
GrabHandCursor=None
GrabHandClosedCursor=None
SlashedCircleCursor=None
UIScaleRule=ShortestSide
UIScaleCurve=(EditorCurveData=(Keys=((Time=480.000000,Value=0.444000),(Time=720.000000,Value=0.666000),(Time=1080.000000,Value=1.000000),(Time=8640.000000,Value=8.000000))),ExternalCurve=None)

[/Script/Engine.RendererSettings]
r.MobileHDR=True
r.AllowOcclusionQueries=True
r.MinScreenRadiusForLights=0.030000
r.MinScreenRadiusForDepthPrepass=0.030000
r.PrecomputedVisibilityWarning=False
r.TextureStreaming=True
Compat.UseDXT5NormalMaps=False
r.AllowStaticLighting=True
r.NormalMapsForStaticLighting=False
r.GBuffer=True
r.GenerateMeshDistanceFields=False
r.Shadow.DistanceFieldPenumbraSize=0.050000
r.TessellationAdaptivePixelsPerTriangle=48.000000
r.SeparateTranslucency=False
r.TranslucentSortPolicy=0
TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000)
r.CustomDepth=1
r.DefaultFeature.Bloom=True
r.DefaultFeature.AmbientOcclusion=False
r.DefaultFeature.AmbientOcclusionStaticFraction=True
r.DefaultFeature.AutoExposure=False
r.DefaultFeature.MotionBlur=False
r.DefaultFeature.LensFlare=False
r.DefaultFeature.AntiAliasing=2
r.EarlyZPass=3
r.EarlyZPassMovable=False
r.DBuffer=False
r.ClearSceneMethod=1
r.WireframeCullThreshold=5.000000
UIScaleRule=ShortestSide
UIScaleCurve=(EditorCurveData=(Keys=),ExternalCurve=None)

[OnlineSubsystem]
DefaultPlatformService=IOS

[Advertising]
DefaultProviderName=IOSAdvertising

[OnlineSubsystemIOS.Store]
bSupportsInAppPurchasing=True
IsAllowedToMakePurchases=True

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/Maps/Day1
LocalMapOptions=
TransitionMap=
bUseSplitscreen=False
TwoPlayerSplitscreenLayout=Horizontal
ThreePlayerSplitscreenLayout=FavorTop
GameInstanceClass=/Game/Blueprints/BWGameInstance.BWGameInstance_C
GameDefaultMap=/Game/Maps/
ServerDefaultMap=
GlobalDefaultGameMode=/Game/Blueprints/
GlobalDefaultServerGameMode=None

Hi ,

Testing in-App purchases can only be done on an ios device.

To test IAP, you will need to follow the steps outlined by apple here:

You will need to create your app in iTunesConnect and configure your products there. When you create a product the price tier can be selected.

If you wish to obtain information to use in your game about available in app purchases, including price. You can use the Query In App Purchase blueprint node. This will ultimately return some details about the requested product, including price.

I hope this helps.

/

Hi Terrence,

Thanks for your suggestions. I am following it but unfortunately I got stuck.

In one stage it asks me to upload the project in Xcode. How is it possible? kindly help me.

Source: Basically: iOS TestFlight Beta Testing - iTunes Connect - YouTube

Hi ,

You can set-up yourself a sandbox account and test on your desired device by following:

/

Hi ,

Me again! I couldnt complete the task yet. I have created sandbox tester account. I have followed all the suggestions mentioned in the recent [weblink][1] which you sent me. I am not getting any options for logging in using my sandbox test account (when I perform in app purchase on my mobile device connected to my pc)… Any problem? plz help!

P.S: As per the sixth bulletin, once I buy for purchase I should have asked for new login, as I have logged out of my current app store (on ios device).

Hi Terrence,

I getting news issues as shown below.

I am not really sure where do I go wrong.

47321-after+adding+myproject.build.cs.png

IT WOULD BE GREAT IF YOU CAN HELP ME.

Hi ,

  • For your last issue : under Windows you can compile “only Blueprint project” for IOS, if you want to add specific code you need a MAC with XCODE under OSX…

Some way for in-app purchase :

  • You have to configure your DefaultEngine.ini with this line :

    [OnlineSubsystemIOS.Store]
    bSupportsInAppPurchasing=True

  • You have to create an in-app purchase with a product identifier in Itunes Connect and configure your type, price, and a print screen

  • You have to link your in-app product to your app (Versions tab) in Itunes Connect

  • You need to add Sandbox Tester in Itunes Connect Users

For distribution :

  • You need an APPLE Computer with “Application Loader” (a specific Apple Software) to transfert your Shipping IPA file to Itunes Connect

Hope that help you

Stéphane

Thanks a lot for your time and help Stéphane.

I have created a new project on mac and have a widget for iap and try to test with a print screen (both success n failure). This simple project is to avoid such errors :slight_smile:

I have done almost everything from your suggestions. I need to verify two things with you.

As per your steps I am not really sure what is “link your in-app product to your app (Versions tab) in Itunes Connect”

Do you mean ?? → create new → product id & other details → snap shot of the iap from mobile and created it. > If not how can I perform this step plz guide me.

Do I need to follow the distribution step which you mentioned in order to test the feature or just for the later stage?

Just curious to know. Thanks a lot!

Hi ,

You can test your in-app purchase without needed to distribute your app; by my side I compile the ipa in Shipping mode and i transfert it via iTunes on my device (may be you can test it in development mode but here it is my working test configuration):

47826-005.jpg

Link your in-app product to your app means : add your in-app product in the “versions” (in french for me) Tab in iTunes Connect (I don’t know if it is really needed for testing but you can check it):

Again here is a part of my DefaultEngine.ini :

47829-004.jpg

Check your Mobile provision Conf your Bundle Identifier and Bundle Name is Matching :

Hope this help,

Stéphane