iOS: Illegal callback invocation from native module react native push notifications
Opened this issue · 0 comments
Hi!
Our team is trying to setup Push Notifications for ios & android devices.
Following the README instructions with the given code examples works totally fine for android and we're able to trigger notifications from backend to android frontend app. Unfortunately the same code (with further adaptions in XCode, like enable Background modes & Push Notifications) doesn't work for iOS, getting the following error(s):
This appears on the emulator (IPhone 11 / Swift Language Version: 5 / iOS 9.0):
Illegal callback invocation from native module react native push notifications
This appears in the React-Native Debugger Console:
Not Found.
InitSuccess: IBM cloud Push Notification init successful
Illegal callback invocation from native module. This callback type only permits a single invocation from native code.
reactConsoleErrorHandler
BugReporting extraData: Object
Unable to symbolicate stack trace: The stack is null
Register Error: Error: didFailToRegisterForRemoteNotifications
at Object.fn [as registerDevice] (NativeModules.js:99)
at PushNotification.register (index.js:50)
at _callee$ (VM5 checkInContainer.bundle:113)
at tryCatch (runtime.js:45)
at Generator.invoke [as _invoke] (runtime.js:274)
at Generator.prototype.<computed> [as next] (runtime.js:97)
at tryCatch (runtime.js:45)
at invoke (runtime.js:135)
at runtime.js:170
at tryCallTwo (core.js:45)
Seems that there is a problem handling the callback from registration.
Initialization works fine with following parameters:
var initObj = {
"appGUID": sessionData.pushAppGUID,
"clientSecret": sessionData.pushClientSecret,
"region": "eu-de"
}
Do you have any clues, how to fix this issue? Or what could be causing this?
Thank you in advance!