-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of unresolved identifier 'RCTOneSignalExtensionService' #530
Comments
Also when i open the app i'm getting the following error when i try to init OneSignal: Cannot read property 'initWithAppId' of undefined |
@gustavomanolo Are you sure you created the Objective-C bridging header and imported RCTOneSignal into it...? |
Closing due to no response... |
Hi @Nightsd01 I am facing the same issue.i have created the Objective-C bridging header and imported RCTOneSignal It looks like this
but still i am getting the same error |
Having the same issue... tried switching to objective-c to see if that would solve it but only getting
@sksahil030 did you find a solution? |
Any updates on this? Just like @yarism, I have the same issue even though i have created the header file. |
@yarism No, i couldn't find any solution for it |
@yarism @sksahil030 |
I know this issue is closed but I am experiencing the same issue within my NotificationService.swift in the OneSignalNotificationServiceExtension folder. Specifically the Use of unresolved identifier 'RCTOneSignalExtensionService' error. I proceeded to create a header file within the same folder directory much like @sksahil030
In the OneSignalNotificationService target > Build Settings. I have specified the following Objective-C Bridging Header path, as mentioned by @nord2ost
After running react-native run-ios the error message I am getting indicates it cannot find the NotificationServiceExtension-Swift.h file specified in the Objective-C Bridging Header path. I am sure that is the correct path to file. Main questions: If creating the Objective-C Bridging Header and adding in How to resolve Use of unresolved identifier 'RCTOneSignalExtensionService' error. Thanks. |
I must apologize, it was an incorrect path issue. The above steps of creating a header file and then specifying the path in the Objective-C Bridging Header path of the OneSignalNotificationService target was the solution for me. Thanks. |
For anyone having issues with this: clarifying @nord2ost In the OneSignalNotificationService folder > Build Settings > Header Search Paths add Create a bridge header and name it whatever you want. and add
Go back into OneSignalNotificationService, selecting Build Settings, finding 'Objective-C Bridging Header' and add
|
Thanks for the clear instructions @vinceprofeta, saved me a ton of time. Some of this stuff isn't immediately obvious for us with limited native iOS dev experience. |
OneSignalNotificationServiceExtension target > Build Settings > Header Search Paths |
Description:
I followed instructions from https://documentation.onesignal.com/v5.0/docs/react-native-sdk-setup and i'm getting the following error in the NotificationService.swift file:
Use of unresolved identifier 'RCTOneSignalExtensionService'
In the following lines:
RCTOneSignalExtensionService.didReceive(self.receivedRequest, with: self.bestAttemptContent);
RCTOneSignalExtensionService.serviceExtensionTimeWillExpireRequest(self.receivedRequest, with: self.bestAttemptContent);
(your description here)
Environment
React native version
react-native-cli: 2.0.1
react-native: 0.55.3
OneSignal React-Native SDK version
3.2.4
How did you add the SDK to your project (eg. npm)
Through npm
npm install --save react-native-onesignal
react-native link
Steps to Reproduce Issue:
Install the latest react-native-onesignal package
Replace content from NotificationService.swift (copied from https://documentation.onesignal.com/v5.0/docs/react-native-sdk-setup) with:
`import UserNotifications
class NotificationService: UNNotificationServiceExtension {
}`
The text was updated successfully, but these errors were encountered: