Onesignal.h file not found
in my xcode proj, I can't build my project.
i have same problem
You can fix it by adding the OneSignal library though CocoaPods.
Never use cocoapods before, but I'll try
Please add the necessary Pod, since it's part of the setup process.
If you don't want to use CocoaPods and correct follow this 2 steps
- Add OneSignal.framework that is in ../node_modules/react-native-onesignal/ios/Frameworks/OneSignal.framework in YourProject > Build Phases > Link Binary With Libraries
- Add "$(SRCROOT)/../node_modules/react-native-onesignal/ios/Frameworks" in YourProject > Build Settings > Framework Search Paths
Aleready did this, but still error.
On Friday, 29 July 2016, lucasyalap [email protected] wrote:
If you don't want to use CocoaPods and correct follow this 2 steps
- Add OneSignal.framework that is in ../node_modules/react-native-onesignal/ios/Frameworks/OneSignal.framework in YourProject > Build Phases > Link Binary With Libraries
- Add "$(SRCROOT)/../node_modules/react-native-onesignal/ios/Frameworks" in YourProject > Build Settings > Framework Search Paths
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/geektimecoil/react-native-onesignal/issues/19#issuecomment-236196196, or mute the thread https://github.com/notifications/unsubscribe-auth/ACD71lMgJ_q_VZoENrHdVAFxmobcH4F4ks5qag7mgaJpZM4IJK96 .
Please can you show us :
- Screenshot of code error (again)
- YourProject > Build Phases > Link Binary With Libraries
- YourProject > Build Settings > Framework Search Paths
Because normally if did what i said it works.
Here is my screenshot, sorry for very late response, please help @lucasyalap:
RCTOnesignal.h already found. Now I have new problem, when using xcode:
While using cocoapod, I had different error message:
Please help
If you realy don't want to use pods, you have to remove all about pods
- In left panel remove pods project
- In Left panel remove pods directory
- in "YourProject > Build Phases > Link Binary With Libraries" remove libPods-OneSignal.a
- "YourProject > Build Settings > Framework Search Paths" remove "$(PODS_ROOT)/OneSignal/IOS_SDK/Frameworks"
If you have any other errors please send screenshot
THanks a lot @lucasyalap, now all the error had gone. And the user already registered on onesignal users list. But ios simulator can't receive the push notif, I'll test tomorrow on real device and share with you if fail or success. Btw why don't author of this package suggest those simple step by step like yours rather than using pods? Regards
i'm on react-native 0.37 and here's how i was able to get this to work (i think the readmes/documentation are slightly behind react native).
- on a clean branch with none of the onesignal work...
- run
npm install react-native-onesignal --save - run
react-native link - for iOS follow the podfile instructions (be sure to follow the react native version note carefully)
- for iOS follow the code additions in the instructions
- for android follow the android instructions (most of the code should be there from the link command, but double check everything)
- for android be sure to use
import com.geektime.reactnativeonesignal.ReactNativeOneSignalPackage;and NOTimport com.geektime.rnonesignal.ReactNativeOneSignalPackage;(some old documentation had the rnonesignal and that's since been updated) - then complete config and setup and all files
- hopefully that does the trick for you...please reply if you have any issues as i spent some time on both android and iOS over a few branches to get this to work.
YMMV if you are using something lower than v0.37 of RN. good luck.