Skip to content

[iOS] JSON value '<null>' of type NSNull cannot be converted to NSString #1938

Description

@dylancom

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.
appUserID = null,

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

  1. Environment
    1. Platform: iOS
    2. SDK version:
    3. OS version: 26.5
    4. Xcode/Android Studio version: 26.6
    5. React Native version: 0.87.1
    6. SDK installation (CocoaPods + version or manual): 10.9.0
    7. Error on all iOS devices

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions