React Native - The right way to create bridge header in Xcode

Viewed 2606

I'm stuck on manually install RN-onesignal on iOS

already followed the instructions but I got an error RCTOneSignalExtensionService.h is not found

after some research, I found this issue that tell me to manually create bridge header, but I don't know the right way to create a bridge header itself (because this is my first time using macOS)

I've tried this step :

  1. in Xcode project go to File->New->File
  2. choose Swift file and Targeting to MyProject and OneSignalNotificationServiceExtension then finish
  3. add #import "RCTOneSignalExtensionService.h" in OneSignalNotificationServiceExtension-Bridging-Header.h
  4. add $(SRCROOT)/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension-Bridging-Header.h at build setting OneSignalNotificationServiceExtension target

but i got an error Bridging header 'MyProjectPath/ios/OneSignalNotificationServiceExtension/OneSignalNotificationServiceExtension-Bridging-Header.h' does not exist

FYI : at this step OneSignalNotificationServiceExtension-Bridging-Header.h file is on my project folder

Current Structure

so i decided to drag n drop the OneSignalNotificationServiceExtension-Bridging-Header.h to OneSignalNotificationServiceExtension folder, but the error still persist

anyone can help me to fix the error?

BTW my Xcode version is Version 8.3.2

1 Answers

Same problem, trying to solve this 3 hours. Make sure you not missing this step: enter image description here

Related