Hi,
I need use the method paymentQueue:shouldAddStorePayment:forProduct for buy from Appstore. But I open the application with this link, I receive a message in console:
Tried to send purchase intent: <productID> to delegate, delegate does not respond to method paymentQueue:shouldAddStorePayment:forProduct
This is the link:
itms-services://?action=purchaseIntent&bundleId=<bundleID>&productIdentifier=<productID>
Docs:
https://developer.apple.com/documentation/storekit/in-app_purchase/testing_promoted_in-app_purchases
My code:
AppDelegate.h
#import <StoreKit/StoreKit.h>
@interface AppDelegate : CDVAppDelegate <SKPaymentTransactionObserver, SKPaymentQueueDelegate> {}
@end
AppDelegate.m
@implementation AppDelegate
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (BOOL)paymentQueue:(SKPaymentQueue *)queue shouldAddStorePayment:(SKPayment *)payment forProduct:(SKProduct *)product
{
return true;//Never is executed
}
Thanks