Hey guys,
This is very similar to the question I posted HERE.
In this case however, the delegates don’t fire if cancel is pressed when the user is prompted for their iTunes password rather than a lack of connectivity.
The same solution as the other question doesn’t work however. (At least on iOS 8.1.1)
I have added the following block of code to the request:didFailWithError: delegate function implemented in the other question to catch any other errors however:
else if ([Request isKindOfClass : [SKReceiptRefreshRequest class]])
{
// Direct the response back to the store interface
[FIOSAsyncTask CreateTaskWithBlock : ^ bool(void)
{
IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get(FName(TEXT("IOS")));
FOnlineStoreInterfaceIOS* StoreInterface = (FOnlineStoreInterfaceIOS*)OnlineSub->GetStoreInterface().Get();
StoreInterface->TriggerOnInAppPurchaseRestoreCompleteDelegates( EInAppPurchaseState::Failed );
return true;
}];
}
Let me know if you need any further info.
Cheers.
EDIT: So this solution does actually work. I’m not sure what I was doing incorrectly beforehand… Oh well.