Describe the bug
After Purchases.configure({ apiKey: REVENUECAT_API_KEY }); is called, Xcode console logs: JSON value '<null>' of type NSNull cannot be converted to NSString. Upon refreshing the simulator the error logs again. If I remove configure, the log is gone.
Update: I found that this error is triggered when appUserID is absent.
Not explicitly setting it to
null (when absent) fixes it for me, so leaving it
undefined.
Now found that it was mentioned here that this warning can't be removed: #1196
What is the downside of passing it as undefined to native instead of null? Which removes the warning...
- Environment
- Platform: iOS
- SDK version:
- OS version: 26.5
- Xcode/Android Studio version: 26.6
- React Native version: 0.87.1
- SDK installation (CocoaPods + version or manual): 10.9.0
- Error on all iOS devices
Describe the bug
After Purchases.configure({ apiKey: REVENUECAT_API_KEY }); is called, Xcode console logs:
JSON value '<null>' of type NSNull cannot be converted to NSString. Upon refreshing the simulator the error logs again. If I remove configure, the log is gone.Update: I found that this error is triggered when appUserID is absent.
react-native-purchases/src/purchases.ts
Line 615 in 85bba1e
Not explicitly setting it to
null(when absent) fixes it for me, so leaving itundefined.react-native-purchases/src/purchases.ts
Line 525 in 85bba1e
Now found that it was mentioned here that this warning can't be removed: #1196
What is the downside of passing it as undefined to native instead of null? Which removes the warning...