-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Has anyone integrated this package with
"expo": "~53.0.23",
"react-native": "0.79.6",
I added header in bridge file. and applied swift code in AppDelegate.swift as below
` public override func application(
_ application: UIApplication,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data
) {
print("Registered for remote notifications with token: (deviceToken)")
RNPusherPushNotifications.setDeviceToken(deviceToken)
}
public override func application(
_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable : Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
) {
RNPusherPushNotifications.handleNotification(userInfo)
completionHandler(.newData)
}
public override func application(
_ application: UIApplication,
didFailToRegisterForRemoteNotificationsWithError error: Error
) {
print("Failed to register for remote notifications: (error.localizedDescription)")
}
`
But it gives error
` 42 | ) {
43 | print("Registered for remote notifications with token: (deviceToken)")
44 | RNPusherPushNotifications.setDeviceToken(deviceToken)
| ^ instance member 'setDeviceToken' cannot be used on type 'RNPusherPushNotifications'; did you mean to use a value of this type instead?
45 | }
46 |
47 | public override func application(
❌ (ios/Edupression/AppDelegate.swift:52:5)
50 | fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
51 | ) {
52 | RNPusherPushNotifications.handleNotification(userInfo)
| ^ instance member 'handleNotification' cannot be used on type 'RNPusherPushNotifications'; did you mean to use a value of this type instead?
53 | completionHandler(.newData)
54 | }
55 | `
Please help.