Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 771
flix Avatar asked Dec 07 '25 04:12

flix


1 Answers

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

like image 180
Denis Avatar answered Dec 08 '25 17:12

Denis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!