ios
ios copied to clipboard
Error: Expected NSNumber or NSString for UIBackgroundFetchResult

index.bundle?platfor…&minify=false:27696 Expected NSNumber or NSString for UIBackgroundFetchResult, received NSMutableDictionary: {
NewData = UIBackgroundFetchResultNewData;
NoData = UIBackgroundFetchResultNoData;
ResultFailed = UIBackgroundFetchResultFailed;
}
Reproduce:
Just use PushNotificationIOS.addEventListener in your code. Run the app on your REAL DEVICE connected via cable, NOT the simulator. Whenever you receive any notification, you will get this error message. The push notification is received successfully, but it's really annoying that every time we need to dismiss this error.
System:
OS: macOS 11.0.1
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 325.94 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.3 - ~/.nvm/versions/node/v14.15.3/bin/node
Yarn: 1.22.4 - ~/Documents/youpendo/youpendo-app-bareworkflow/node_modules/.bin/yarn
npm: 6.14.9 - ~/.nvm/versions/node/v14.15.3/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.3, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: 12.3/12C33 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_275 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: ^4.8.0 => 4.13.0
react: 16.13.1 => 16.13.1
react-native: 0.63.3 => 0.63.3
@react-native-community/push-notification-ios: 1.8.0