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