Bug: 'Restore In-App Purchases' Blueprint node doesn't fire delegates if cancel is pressed for iTunes login on iOS

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.

Hello,

According to your edit, it looks like you solved your issue, is that correct? If so, has this also resolved the issue on your other post that you provided a link to?

The solution was what i posted in that other post, (i.e. implementing the request:didFailWithError: delegate function) and then adding the code I specified in the above question.

I am marking this post as resolved, as you were able to discover a fix by implementing the code above in combination with the solution provided in this post: BUG: 'Read In App Purchase Information' blueprint node never fires delegates if connection fails on iOS - Blueprint - Unreal Engine Forums

Have a great day