Hi, I'm installed react-native-fcm, like described in README, (npm install, rnpm link, created pod file and runned pod install)
Pods installed fine, my Podfile contains:
# Uncomment this line to define a global platform for your project
# platform :ios, '6.0'
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
target 'MyApp' do
end
target 'MyAppTests' do
end
I'm using .xcworkspace file to open the project, but I get this error:
/Users/me/Projects/MyApp/ios/Pods/Firebase/Headers/Firebase.h:1:9: 'FirebaseAnalytics/FirebaseAnalytics.h' file not found and cannot build my project.
$(inherited) added to Header Search Path and to Other Linker Flags
Any suggestions?
is your pod folder under ios folder?
Directory Pods and Podfile are in MyApp/ios directory
I removed all pods data from my project and made this steps for install:
1) Create Podsfile with content described in first comment
2) Run pod install (my pod version is 0.37.2), no errors was here only
dyld: warning, LC_RPATH @executable_path/../../../../../../../SharedFrameworks in /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/../../..//DVTInstrumentsFoundation.framework/Versions/A/DVTInstrumentsFoundation being ignored in restricted program because of @executable_path
3) Open xcworkspace instead of xcodeproj
4) Add RNFIRMessaging.xcodeproj to my project
5) Add #import "RNFIRMessaging.h" and
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))handler {
[[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:notification];
handler(UIBackgroundFetchResultNoData);
}
to AppDelegate.m
6) Add libRNFIRMessaging.a to Link binary with libraries (libPods.a was there)
7) Run project, but got the same errors like in first comment
FirebaseAnalytics/FirebaseAnalytics.h not found, but FirebaseAnalytics listed in Pods group
FCM doesn't import FirebaseAnalytics.h. The error looks like is thrown by the pod project itself. If you remove the dependency of this library and import "Firebase.h" in AppDelegate.h, you should still see this error.
my pod file looks simpler, only having
pod 'Firebase/Messaging'
did you create your podfile using pod init?
I removed all pods data, create Podfile with pod init, add to generated Podfile
pod 'Firebase/Messaging'
and still having
MyApp/ios/Pods/Firebase/Headers/Firebase.h:1:9: 'FirebaseAnalytics/FirebaseAnalytics.h' file not found
MyApp/node_modules/react-native-fcm/ios/RNFIRMessaging.h:4:9: Could not build module 'Firebase'
Firebase Analytics goes with in firebase module by default.
Now, my Pods group looks like:

Podfile:

The error screenshot:

I think, the problem may be in headers search path or in some pods settings. Tomorrow will try to update pod CLI and try again
Yeaaaah!!!!!!
1) Remove all pod files from your project
http://stackoverflow.com/a/16427883/1551940
2) Update pods to latest version (!) My pods version was 0.3.7, Firebase requires cocapods > 1.0
3) Run pod init
4) I have issues with building
ld: warning: directory not found for option '-L/MyPath/MyApp/ios/build/Debug-iphoneos'
, so on Stack Overflow I found a working solution:
http://stackoverflow.com/a/23085107/1551940
The result Podfile:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'MyApp' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for MyApp
pod 'FirebaseAnalytics'
pod 'Firebase/Messaging'
end
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
pod 'FirebaseAnalytics'
pod 'Firebase/Messaging'
end
5) Run pod install
6) Go to Build Settings and check, that you have $(inherited) option in Framework Search Path, Header Search Path, Library Search Path
7) Run and enjoy :)
Please, add to readme cocoapods version check, $(inherited) check, Podfile example
awesome! readme updated. There shouldn't be any changes to $(inherited) manually though.
Interesting, this did not work for me. The only way i could get it to build was to change "Allow Non-Modular includes in Framework Modules" on the node_module itself.

This is obviously not correct as it will get overwritten if i reinstall the node module.
I'm getting the same error. Perhaps this has been resolved but I had to use @tarr11 fix but my build server is going to nuke this without special configuration.
This is the fix:
https://github.com/evollu/react-native-fcm/issues/143#issuecomment-252178914
Thanks for the reference. It did work. Thank you!
On Wed, Oct 12, 2016 at 8:03 AM Douglas Tarr [email protected]
wrote:
This is the fix:
143 (comment)
https://github.com/evollu/react-native-fcm/issues/143#issuecomment-252178914
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/evollu/react-native-fcm/issues/17#issuecomment-253239817,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARl5OZASr486FzRlLyR_7ycANcQyVwyRks5qzPbLgaJpZM4I4ijJ
.
*michael gilmore jr. *director of production
(714) 222-2119 <%28714%29%20609-1799>
www.medlmobile.com
http://www.facebook.com/medlmobile
http://www.facebook.com/medlmobile http://www.twitter.com/medlmobile
http://www.youtube.com/shinymedlobjects
http://pinterest.com/medlmobilenow http://instagram.com/medlmobile
http://www.medlmobile.com/blog
Confidentiality Notice: The information contained in this electronic e-mail
and any accompanying attachment(s) is intended only for the use of the
intended recipient and may be confidential and/or privileged. If any reader
of this communication is not the intended recipient, unauthorized use,
disclosure or copying is strictly prohibited, and may be unlawful. If you
have received this communication in error, please immediately notify the
sender by return e-mail, and delete the original message and all copies
from your system. Thank you.
FYI. I received also hundreds of errors for FirebaseAnalytics file missing. git add . resolved this for me.
Yay pods! They conveniently make you have to do more work!!!
Most helpful comment
Yay pods! They conveniently make you have to do more work!!!