2

Curious if anyone else getting similar this trying to build via XCode or RN CLI?

Since upgrading to react-native-iap 5.2.0.

Error

No visible @interface for 'SKPaymentQueue' declares the selector 'presentCodeRedemptionSheet'

Screenshot

XCode 11.5 - No visible @interface for 'SKPaymentQueue' declares the selector 'presentCodeRedemptionSheet'

Codeblock

RCT_EXPORT_METHOD(presentCodeRedemptionSheet:(RCTPromiseResolveBlock)resolve
                  reject:(RCTPromiseRejectBlock)reject) {
    if (@available(iOS 14.0, *)) {
        [[SKPaymentQueue defaultQueue] presentCodeRedemptionSheet];
        resolve(nil);
    } else {
        reject([self standardErrorCode:2], @"This method only available above iOS 14", nil);
    }
}

XCode 11.5, no build errors with 50-odd other native libraries.

Leo
  • 10,407
  • 3
  • 45
  • 62

1 Answers1

1

Downgrade/stick to react-native-iap 5.1.3 for a successful build for time being, until patch 5.2.1+.

If you're using react-native-iaphub, then 6.0.1+ too.

Leo
  • 10,407
  • 3
  • 45
  • 62