# Problem in In-App Purchase setup on iOS

**URL:** <https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241>\
**Category:** Mobile\
**Tags:** iap, in-app-purchase, unreal-engine, iOS, question\
**Created:** [June 16, 2017, 6:56pm UTC](https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241 "2017-06-16T18:56:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_be27c619](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be27c619](https://forums.unrealengine.com/u/anonymous_user_be27c619)\
**Post date:** [June 16, 2017, 6:56pm UTC](https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241/1 "2017-06-16T18:56:25Z")

</div>

I have searched whole internet for the solution, no success ☹

Same code works for Android with no issue.

Here’s what was done so far.

On Apple side

- Cleared for Sale is checked
- In-App purchase products are submitted
- In-App purchase product IDs have this syntax: com.companyname.gamename.consumableproduct.packnumber
- Bundle identifier and most of other things are setup, which require app for uploading to itunes connect with application loader
- Testing with TestFlight and Sandbox accounts are also configured, but game fails to retrieve In-App Purchase product details.

On UE4 side

- Packaging with Development build, DebugGame, Shipping with Distribution works
- Debugging with Xcode is partially setup (Engine symbols present on dSYM file but breakpoints do not hit)
- Correct development and distribution provisioning profiles setup correctly (In-App purchase checkbox is enabled there).

Read In-App purchase Information node always returns failed callback, while the same code works on Android.

 ![190742-screen+shot+2017-06-16+at+10.44.51+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/1/6/616053d3f46bfd5c8c3b1091158f0a76a46fe92f.png)

**Engine/Config/IOS/IOSEngine.ini** is set up like this

```
[OnlineSubsystem]
DefaultPlatformService=IOS

[Advertising]
DefaultProviderName=IOSAdvertising

[DeviceProfileManager]
DeviceProfileSelectionModule="IOSDeviceProfileSelector"

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bEnableGameCenterSupport=True

[OnlineSubsystemIOS.Store]
bSupportsInAppPurchasing=true
bUseStoreV2=false

```

The only useful debugging log from Xcode:

```
========= This app is in LANDSCAPE mode
LogOnline:Display: FOnlineSubsystemIOSModule::StartupModule()
2017-06-16 22:09:44.462129+0400 Adventures[2706:380188] LogInit:Display: RandInit(17780007) SRandInit(17780008).
2017-06-16 22:09:44.462446+0400 Adventures[2706:380188] LogTaskGraph: Started task graph with 5 named threads and 6 total threads with 1 sets of task threads.
2017-06-16 22:09:44.462529+0400 Adventures[2706:380188] LogStats: Stats thread started at 0.377944
2017-06-16 22:09:44.462596+0400 Adventures[2706:380188] LogOnline:Display: FOnlineSubsystemIOSModule::StartupModule()
LogOnline:Display: FOnlineSubsystemIOS::Init()
2017-06-16 22:09:44.462833+0400 Adventures[2706:380188] LogOnline:Display: FOnlineSubsystemIOS::Init()
LogOnline:Display: FOnlineSessionIOS::FOnlineSessionIOS(FOnlineSubsystemIOS* InSubsystem)
2017-06-16 22:09:44.463016+0400 Adventures[2706:380188] LogOnline:Display: FOnlineSessionIOS::FOnlineSessionIOS(FOnlineSubsystemIOS* InSubsystem)
LogOnline:Display: FOnlineLeaderboardsIOS::FOnlineLeaderboardsIOS()
2017-06-16 22:09:44.463664+0400 Adventures[2706:380188] LogOnline:Display: FOnlineLeaderboardsIOS::FOnlineLeaderboardsIOS()
LogOnline:Display: FOnlineSubsystemIOS::FOnlineAchievementsIOS()
2017-06-16 22:09:44.463781+0400 Adventures[2706:380188] LogOnline:Display: FOnlineSubsystemIOS::FOnlineAchievementsIOS()

```

…

```
LogOnline:Warning: Problem in iTunes connect configuration for product: com.xxx.xxxxx.xxxx.xx
2017-06-16 22:10:38.407257+0400 Adventures[2706:380188] [2017.06.16-18.10.38:407][132]LogOnline:Warning: Problem in iTunes connect configuration for product: com.xxx.xxxxx.xxxx.xx

```

This warning is called in OnlineStoreIOS.cpp of OnlineSubsystemIOS plugin

```
void FOnlineStoreIOS::OnProductPurchaseRequestResponse(SKProductsResponse* Response, const FOnQueryOnlineStoreOffersComplete& CompletionDelegate)
{
	if(bIsQueryInFlight)
	{
		bool bWasSuccessful = [Response.products count] > 0;
		int32 NumInvalidProducts = [Response.invalidProductIdentifiers count];
		if ([Response.products count] == 0 && NumInvalidProducts == 0)
		{
			UE_LOG(LogOnline, Warning, TEXT("Wrong number of products [%d] in the response when trying to make a single purchase"), [Response.products count]);
		}
		
		TArray<FUniqueOfferId> OfferIds;
		for (SKProduct* Product in Response.products)
		{
			FOnlineStoreOfferIOS NewProductOffer(Product, ConvertProductToStoreOffer(Product));
			
			AddOffer(NewProductOffer);
			OfferIds.Add(NewProductOffer.Offer->OfferId);
			
			UE_LOG(LogOnline, Log, TEXT("Product Identifier: %s, Name: %s, Desc: %s, Long Desc: %s, Price: %s IntPrice: %d"),
				   *NewProductOffer.Offer->OfferId,
				   *NewProductOffer.Offer->Title.ToString(),
				   *NewProductOffer.Offer->Description.ToString(),
				   *NewProductOffer.Offer->LongDescription.ToString(),
				   *NewProductOffer.Offer->PriceText.ToString(),
				   NewProductOffer.Offer->NumericPrice);
		}
		
		for (NSString *invalidProduct in Response.invalidProductIdentifiers)
		{
			UE_LOG(LogOnline, Warning, TEXT("Problem in iTunes connect configuration for product: %s"), *FString(invalidProduct));
		}
		
		CompletionDelegate.ExecuteIfBound(bWasSuccessful, OfferIds, TEXT(""));
		bIsQueryInFlight = false;
	}
}

```

All of my In-App products are in Response.invalidProductIdentifiers

I also compared standard IAP implementations with UE4 OnlineSubsystemIOS, not much difference.

Here’s In-App Purchase settings from ITunes connect

 ![190741-screen+shot+2017-06-16+at+10.18.15+pm.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/5/d/45d5f44704a0429689bab5be03a05a29713a8cb5.png)

Maybe I missed something, but If more information is needed, I will provide.

It’s still not clear for me whether the problem lies on Apple backend or on game.

Please help ☹

---

<div class="post-metadata">

**Author:** ![Dan\_Unrealskills](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dan\_Unrealskills](https://forums.unrealengine.com/u/Dan_Unrealskills)\
**Post date:** [July 7, 2017, 6:58am UTC](https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241/2 "2017-07-07T06:58:32Z")

</div>

Did you find anything about this problem? I’m in the same situation as you, read and restore return nothing, make purchase always return failed

Can you make InAppPurchases?

By the way, using SDKBOX solves the problem with Reading purchase information, but I still can’t buy anything. Maybe it depends on my Development build instead of Shipping…

Does anyone know if purchases are allowed in development builds?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be27c619](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be27c619](https://forums.unrealengine.com/u/anonymous_user_be27c619)\
**Post date:** [July 10, 2017, 7:49am UTC](https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241/3 "2017-07-10T07:49:09Z")

</div>

mister\_dan, you can make sure that your agreements and tax info is correctly set up as shown in this link

> **[App Store Connect - Help - Apple Developer](https://developer.apple.com/help/app-store-connect/)**
>
> Learn about uploading, testing, submitting, managing your apps and in-app purchases, and viewing app performance with App Store Connect.

---

<div class="post-metadata">

**Author:** ![Dan\_Unrealskills](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dan\_Unrealskills](https://forums.unrealengine.com/u/Dan_Unrealskills)\
**Post date:** [July 10, 2017, 8:55am UTC](https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241/4 "2017-07-10T08:55:55Z")

</div>

Yes, atually I didn’t correctly setup mobile purchases in iTunes. I’ve sent the message to Apple to bring me the functionality of adding purchases to applications in iTunes Connect application page. So it is my mistake, thank you.

---

<div class="post-metadata">

**Author:** ![thejus75](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thejus75](https://forums.unrealengine.com/u/thejus75)\
**Post date:** [July 13, 2017, 4:51pm UTC](https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241/5 "2017-07-13T16:51:51Z")

</div>

This is a major issue I’ve encountered as well, and has stopped me from releasing my app so far. I’ve followed the documentation for IOS in-app-purchases closely; however, the purchase always fails. The Blueprint is correct, the i-Tunes connect setup is correct, and as far as I’m aware, the IOSEngine.ini file is correct. My project is made with 4.16.2 it would be difficult and time consuming to downgrade engine versions, and I shouldn’t have to for a basic and essential mobile feature to work in the first place.

---

<div class="post-metadata">

**Author:** ![Dan\_Unrealskills](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dan\_Unrealskills](https://forums.unrealengine.com/u/Dan_Unrealskills)\
**Post date:** [July 15, 2017, 12:16am UTC](https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241/6 "2017-07-15T00:16:32Z")

</div>

I see, that it really doesn’t work. Even with SDKBOX plugin, everytime failure on make purchase, failure on read purchase info…

---

<div class="post-metadata">

**Author:** ![apmason](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/apmason/32/88719_2.png) [@apmason](https://forums.unrealengine.com/u/apmason)\
**Post date:** [March 4, 2023, 11:34pm UTC](https://forums.unrealengine.com/t/problem-in-in-app-purchase-setup-on-ios/396241/7 "2023-03-04T23:34:39Z")

</div>

I wrote my own plugin that solves this. Available here: [GitHub - apmason/UEAppleIAPPlugin](https://github.com/apmason/UEAppleIAPPlugin)
