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.
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
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