Skip to content
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

RCTOneSignal.h file not found build error #127

Closed
mnmeyers opened this issue Jan 2, 2017 · 32 comments
Closed

RCTOneSignal.h file not found build error #127

mnmeyers opened this issue Jan 2, 2017 · 32 comments

Comments

@mnmeyers
Copy link

mnmeyers commented Jan 2, 2017

I know this is a common issue but I tried everything many times and I keep getting the same error, not sure what to try next.

image

image

image

image

this is the contents of my Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'HelloWorld' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for HelloWorld
pod 'OneSignal', '1.13.3'


end
 target 'HelloWorldTests' do
    inherit! :search_paths
    # Pods for testing
  end

using react-native 0.35.0, react-native-onesignal ^1.2.3
using xcode v. 8.2
thank you!!!

@mnmeyers
Copy link
Author

mnmeyers commented Jan 3, 2017

I upgraded to beta version of react-native-onesignal and v 2.2.0 of OneSignal pod, same issue still persists

@avishayil
Copy link
Contributor

Do you still encounter this issue?
Are you sure you're using the latest version and pod as mentioned in the docs?

@nilsers
Copy link

nilsers commented Jan 14, 2017

Hi!

I'm having the same issue and I have installed the pod as mentioned in the docs.

The build fails with error:

AppDelegate.h:11:9: fatal error: 'RCTOneSignal.h' file not found
#import <RCTOneSignal.h>

I'm using pod version 1.1.1 and Xcode Version 8.2.1 (8C1002) on a macOS 10.12

I have uploaded a demo React Native project which has this issue to my repo onesignal-issuedemo if it helps you.

Thank you for your help!

@mnmeyers
Copy link
Author

mnmeyers commented Jan 15, 2017

yes I still have this issue. I'm using one signal pod 2.2.0. pod version 1.1.1. , mac osx 10.11.6

react-native-onesignal version: git://github.com/geektimecoil/react-native-onesignal.git#dev

react-native version 0.35.0

@avishayil
Copy link
Contributor

@nilsers i'll try running your project and will let you know.

@avishayil
Copy link
Contributor

@nilsers,
Please add the following to your target Header Search Paths under Build Settings on your XCode workspace:
$(SRCROOT)/../node_modules/react-native-onesignal/ios/RCTOneSignal
Should build fine, as I tested on your repository.

@GeoffreyPlitt
Copy link

@mnmeyers Did you ever get it working? I'm having same probs as you, tried everything here, no dice.

@mnmeyers
Copy link
Author

@GeoffreyPlitt I'm getting a bunch of different errors now, pasted below. still debugging. I may try just starting on a new branch, and starting over again. will report back. are you still getting the same error or different ones?

image

@GeoffreyPlitt
Copy link

Thanks so much for the help! I don't get these errors, no. By the way I'm on XCode 8.2.1, not sure if that makes a difference.

Yes feel free to fork the master branch of https://github.com/GeoffreyPlitt/react_native_minimal to try yourself.

@GeoffreyPlitt
Copy link

By the way, I have another branch you can fork, which uses v1.2.3 of this lib, and still has those same errors:

https://github.com/GeoffreyPlitt/react_native_minimal/tree/onesignal_123

In file included from /Users/giro/react_native_minimal/ios/react_native_minimal/AppDelegate.m:10:
In file included from /Users/giro/react_native_minimal/ios/react_native_minimal/AppDelegate.h:11:
../node_modules/react-native-onesignal/ios/RCTOneSignal/RCTOneSignal.h:3:9: fatal error: 'OneSignal/OneSignal.h' file not found
#import <OneSignal/OneSignal.h>
        ^

@mnmeyers
Copy link
Author

@GeoffreyPlitt so I realized that those errors I was getting were all in the tests folder so I just deleted them (right click > delete) from xcode (the remove references option, not true delete) and then the build succeeded. probably those tests are needed for something but.... that's for another day haha

@davidfekke
Copy link

I am DOA. I am having the same error.

@mnmeyers
Copy link
Author

@davidfekke which version of one signal and react-native-one-signal are you using and did you try adding the header search paths as suggested above, did that change anything?

@avishayil
Copy link
Contributor

@mnmeyers @davidfekke @GeoffreyPlitt Can you share repositories with the errors reproduceable?

@GeoffreyPlitt
Copy link

GeoffreyPlitt commented Jan 23, 2017

Yes, my repo that reproduces header issues is at https://github.com/GeoffreyPlitt/react_native_minimal/tree/onesignal. Note: Part of my specific problem is that I'm trying to get it working WITHOUT cocoapods; and the error I'm getting is slightly different than the title of this issues, it's about "OneSignal/OneSignal.h" not being found.

Also: Just saw a suggestion on #153 I'm going to try.

@egunsoma
Copy link

egunsoma commented Feb 4, 2017

Hello guys,

@mnmeyers @davidfekke @GeoffreyPlitt

I had the same issue, and adding
$(SRCROOT)/../node_modules/react-native-onesignal/ios/RCTOneSignal
to Header Search Paths in Build Settings solved my problem.

Make sure you set them for recursive!!! Did not worked until I changed that.

@passabilities
Copy link

@egunsoma I've done this. Set to recursive. Still saying

/path/to/project/AppDelegate.h:11:9: fatal error: 'RCTOneSignal.h' file not found

@Pampounet
Copy link

I have followed the same steps as you, and I keep having the same error than @passabilities :
path/AppDelegate.h:11:9: 'RCTOneSignal.h' file not found

@jkasten2
Copy link
Member

jkasten2 commented Mar 2, 2017

@Pampounet I recommend updating to the latest 3.0.3 version of this SDK. It greatly simplifies the iOS setup process.
https://github.com/geektimecoil/react-native-onesignal#ios-installation

Most of the above comments do not apply to version 3.0.3 as paths have changed and the iOS native source is now included with this SDK.

@Pampounet
Copy link

@jkasten2 Thanks for your help ! Now I'm getting a new error that makes build failing :
ld: 102 duplicate symbols for architecture x86_64
I'm going to seek help about it now !

@jkasten2
Copy link
Member

jkasten2 commented Mar 2, 2017

@Pampounet Make sure to remove all other copies of the OneSignal iOS native SDK. Such as from cocoapods, manual, or carthage.

@Pampounet
Copy link

@jkasten2 Finally, I had to remove $(inherited) flag in Other Files Flag in my target Build Settings : the build succeeded, but my app is not working anymore... Still working on it !

@jkasten2
Copy link
Member

jkasten2 commented Mar 3, 2017

@Pampounet You might want to start over with a new react project and get the OneSignal SDK up and running. Then copy in your existing javascript code.

@Pampounet
Copy link

@jkasten2 I will try this way, since I don't succeed running anything... but Android version works well, so I keep developing on it for the moment !
Thanks !

@Pampounet
Copy link

@jkasten2 So I tried, and did not manage making it working :'(

@therahuls1ngh
Copy link

im getting this error after i solved architecture one
Cannot find protocol declaration for 'OSSubscriptionObserver'

@HananeAlSamrout
Copy link

add "$(SRCROOT)/../node_modules/react-native-onesignal/ios" non-recursive in Framework Search paths
and
add "$(SRCROOT)/../node_modules/react-native-onesignal/ios" recursive in Header search paths

@andreechristian
Copy link

@HananeAlSamrout solution works for me! Thanks

@25matt12
Copy link

25matt12 commented Mar 7, 2018

@HananeAlSamrout worked for me too! :)

Thanks

@vadermemo
Copy link

work! Even when is to candidate release
Thanks @HananeAlSamrout

@tlloydukdev
Copy link

I had to comment out the podfile entry for onesignal to get this to work

@Jeet007das
Copy link

@egunsoma I've done this. Set to recursive. Still saying

/path/to/project/AppDelegate.h:11:9: fatal error: 'RCTOneSignal.h' file not found

i also have same issue in NativeBridgeModel.m that AppDelegate.h not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests