-
Notifications
You must be signed in to change notification settings - Fork 375
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
OneSignal/OneSignal.h file not found #161
Comments
So basically it means that the framework is not updated on the module, if you choose not to use CocoaPods. Am I correct? |
Yes, I think that is correct. I am not using CocoaPods. |
I see. The current problem is that I can't find any way to make the library recognize the framework if it's outside the library, for example in the |
Hey, found a repo with hints for you. Made my code work again. |
I not really familiar with objective-c, I really wish I could help solve the problem. In the mean time I copied the OneSignal.framework directory into my ios project with the right "Header" directory and "OneSignal" file and changed the "Framework Search Paths" to point to it. I will have to keep and eye for updates, but this works for me for now. Thanks! |
@haxtrujillo Also running into this issue when not using CocoaPods. Which Header file and OneSignal file did you change to make this work via direct import instead of the official README instructions? Thanks! |
@dguillamot make sure to set the "Header Search Paths" and "Header Search Paths", copy the files from version "B" (Current) two levels up. |
I'm still wondering how to solve it without this "ugly" way. @jkasten2 can you help here? |
I had to do 2 separate things to get it working: 0 - I created a subfolder in my main project folder (where the xcode workspace file is) called /ios/OneSignal 1 - Then, similar to what haxtrujillo said above, in the node_modules/react-native-onesignal/ios/Frameworks folder, you can double-click / expand the OneSignal.framework file. Inside there is a Versions/B subfolder. Select the 'Headers' and 'OneSignal' files in there, copy ( CMD-C ) and then select the OneSignal.framework 'file' again and paste . Then, I copied this new OneSignal.framework file into the /ios/OneSignal folder I made above in step 0. 2 - Next, I copied the node_modules/react-native-onesignal/ios/RCTOneSignal.xcodeproj file and the RCTOneSignal folder over to the ios/OneSignal folder I made in step 0. Then in Xcode, I added the OneSignal.Framework file into the Frameworks folder of my xcode workspace, and added the RCTOneSignal.xcodeproj to the Libraries folder. Then, I selected the xcodeproj file in my Libraries folder in xcode. Checking that the target was RCTOneSignal, I went to BuildSettings, and changed Framework Search Paths to be '$(PROJECT_DIR)/OneSignal' .. That way it could find the new OneSignal.framework I made. I also changed Header Search Paths in the same Build Settings area to make sure that it was picking up React. In my case, it was easiest to do it relative to PROJECT_DIR as '$(PROJECT_DIR)/../node_modules/react-native/React' After these changes, everything is now in my ios/OneSignal folder and I don't really need the node_modules folder at all. I am still using it though, for Android. But if you are ios only, you don't need the node_module folder as this workaround has basically made a local copy. This is definitely not a good long term solution and should be undone once the author has updated this package. It's just short-cutting the node module by copying the project over so you can change the Build Settings. Once the node module is modified to fix this issue, these changes should be undone. |
Thank you @dguillamot ! I've done it in a bit different way but sense is the same I guess
P.S.: P.S. 2:
|
There hasn't been a |
@jkasten2 right,
BTW,
Podfile:
but actually it installs |
@jkasten2, |
@jkasten2
but package.json |
The issue seems to be missing symlinks from the 3.0.0 release tag. @avishayil I noticed that the The native iOS SDK repo also has symlinks here. Can you release an update with these missing files? |
@jkasten2 There you go, in this project at the Try to build this project, it says it's missing the header files. |
@avishayil I did a fresh clone and following the instructions below but didn't run into a missing Note: The instructions should be Ran the project from both the terminal as the instructions noted and built from Xcode directly by opening the |
Hi @jkasten2, no problem when building a project with CocoaPods. Problem is when trying to build a project with the framework without CocoaPods. |
I mentioned this before, forgive me if this is a duplicate but: One of the problems is that the header file |
@avishayil is still the problem without cocoa?, sorry for didn't notice it, let me see guys and am going to let you know :) |
@eriksape yep |
@avishayil I don't know what happen, my method to insert is still Ok, as I see cocoa pods do the same thing but automatically and downloading a lot of packages with the last version of OneSignal-iOS-SDK as said by @jkasten2 is the 2.3.5, know you downgrade the version of the sdk now? |
Guys I have the header issue when using v2 and Cocoapods :/ Any hint on why? Should I create a dedicated issue? |
I'll have a look on v2 this week. |
I am on RN40 and OneSignal3.0, using the Framework and still getting "OneSignal/OneSignal.h not found". My header / framework paths are correctly set, the library has been linked with react-native link, so I don't see any issue regarding setup. I had the same with Cocoapods though. |
I was having this error for v3.0.0 and react native 0.41. I got it to build by running the command react-native link. Correction: still getting a build error :( |
Are you guys using CocoaPods? |
@avishayil No, I'm not using Cocoapods and will not be using it. I just got your latest changes in 3.0.2 and it's still not building. Any updates on fixing this? |
@larryranches This is still something i'm looking at alongside OneSignal's team. @jkasten2 and I will update when we have a solution for this. |
@avishayil Thanks for looking into this! Would be nice to get this working as we have to upgrade to the latest React Native 0.41. Please let us know once there's a fix. |
Same issue when running with Xcode. App starts with |
@avishayil I have tried to use Coca and the Framework, same result. |
@edo1493 can you share a repo with the error reproduced? |
This pull-request worked for me ✌️: |
Interesting, how did you build it? From scratch or to an existing project? |
@avishayil into a existing project (with the problem described here) and followed the updated README at https://github.com/jkasten2/react-native-onesignal. |
PR #184 works for me as well |
Merged, tested and fixed. |
i have done all the things still its not found :( |
I have this error too with Cacaopods ... RN 0.50 and react-native-onesignal ^3.0.5 |
anyone fix this bug ? i am facing on RN 0.51 and react-native-onesignal ^3.0.5 |
Reinstalling one signal from scratch helped me fix this issue. |
There was and issue already opened and closed, but this is still and issue. See issue 133.
My comment on the issue describes the problem.
React Native 0.40.0 OneSignal 3.0
The text was updated successfully, but these errors were encountered: