Elango
Elango

Reputation: 300

Entries must be arrays of the form [key: string, value: string], JSON value '<null>' of type NSNull cannot be converted to NSString

In Android, it is working fine but I'm getting an issue on iOS. When I'm dismissing the error by clicking on Dismiss, it is working for me.

Error

Error: {
    message = "Entries must be arrays of the form [key: string, value: string], got: (\n    notificationCount\n)";
}

Environment

"react": "16.6.3",
"react-native": "0.58.6",
"react-native-firebase": "^5.4.3",

Upvotes: 0

Views: 1720

Answers (2)

rufeng
rufeng

Reputation: 121

react-native-easy-app can access AsyncStorage synchronously, and can also store and retrieve objects, strings or Boolean data,maybe can help you.

Upvotes: 0

Ritesh Pratap
Ritesh Pratap

Reputation: 9

Pass value in AsyncStorage as JSON.stringify its solve your problem for example

testFunction =async()=>{
  let arr = await AsyncStorage.multiset([JSON.stringify(token)])
}

Upvotes: 1

Related Questions