flurry / react-native-flurry-sdk

React Native Flurry SDK
Apache License 2.0
45 stars 13 forks source link

[iOS only] Fconfig.h not found and FlurryMessaging.h not found #14

Closed TomBallagh closed 4 years ago

TomBallagh commented 5 years ago

Attempting to build an app after installing flurry following all the instructions results in a Lexical or Preprocessor issue in xcode.

fConfig.h file not found

FlurryMessaging.h file not found

Resulting in not being able to build the app.

xnth97 commented 5 years ago

Hi @tomball123 ,

Thank you for using Flurry SDK! Sorry to hear that you are having issues with Flurry. Are you using CocoaPods or RN >= 0.60? FConfig and FlurryMessaging dependencies (and those header files) should be managed by CocoaPods in this case. Please go to react-native-flurry-sdk under targets, go to Build Settings, and check if Flurry-iOS-SDK folder is included in Header Search Paths.

Screen Shot 2019-08-02 at 10 51 50 AM

If you are not using CocoaPods, please stick to react-native-flurry-sdk@3.7.0.

Please let me know if you are still facing this issue. Thank you!

markgoodyear commented 5 years ago

Hi @xnth97

Just as some background, I'm working with @tomball123 on the same project. We're using RN 0.59.9, but are using pods. I've checked the react-native-flurry-sdk header paths, and they do include the Flurry-iOS SDK.

I tried downgrading to 3.7.0, as we use CocoaPods, react-native-link adds the react-native-flurry-sdk pod to the Podfile. After a pod install, 3.7.0 does work and looks to be tracking fine. It's just the 4.x I can't get working on 0.59.9. If I can get some time I'll create a dummy project.

Cheers, Mark

xnth97 commented 5 years ago

Hi @markgoodyear ,

Thank you for your feedback! I created a dummy project using react-native 0.59.9 but still cannot reproduce the issue. I'm using react-native-cli 2.0.1 and cocoapods 1.7.5.

If your Podfile contains use_frameworks!, perhaps removing this line can get 4.x to work. We also released version 4.1.0 to try to cover this situation. Please let me know if 4.1.0 still doesn't work for you.

Thank you

unmec commented 5 years ago

Hello,

A similar issue here while giving Flurry a try, error thrown being 'FConfig.h' file not found with React Native 0.57.8 and react-native link. Maybe a manual change in header search path is necessary?

Thanks

xnth97 commented 5 years ago

Hi @unmec ,

Are you using CocoaPods for integrating React Native? If not, please use react-native-flurry-sdk@3.7.0 instead.

Thanks

unmec commented 5 years ago

Thanks for reply @xnth97

I believe that I somehow misunderstood this:

Please note that starting from React Native 0.60, CocoaPods is now the default integration approach for React Native iOS projects. If you are not using CocoaPods, please stick to react-native-flurry-sdk@3.7.0.

Since the project is on React Native 0.57.8 and I used pod for a few other packages but not for Flurry, I considered myself as the one who "is using CocoaPods".

Maybe change the line to something like "If you did not install react-native-flurry-sdk with CocoaPods" to avoid confusion.

Thanks!

xnth97 commented 5 years ago

Hi @unmec ,

Thank you so much for the feedback! Sorry for the confusion it may cause, but the actual meaning is "using CocoaPods for React Native integration", aka if you have something like this in your Podfile.

pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTText',
    'RCTNetwork',
    'RCTWebSocket', # Needed for debugging
    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
]

In this case, according to documentation, "If your iOS project is using CocoaPods (contains Podfile) and linked library has podspec file, then react-native link will link library using Podfile", therefore after react-native link you should see the following line being added to your Podfile.

pod 'react-native-flurry-sdk', :path => '../node_modules/react-native-flurry-sdk/ios'

If this line is missing in your Podfile after react-native link, manually adding it may also solve your problem of using CocoaPods and version 4.1.0. We will also try to cover this situation in future release.

Thanks!

unmec commented 5 years ago

Very clear now! Thanks for additional info. 👍