radarlabs / react-native-radar

React Native module for Radar, the leading geofencing and location tracking platform
https://radar.com
Apache License 2.0
170 stars 32 forks source link

iOS Linking Problem #42

Closed neegbeah closed 6 years ago

neegbeah commented 6 years ago

I followed the directions to link the module from the iOS version of the React Native Application. After linking the Android Portion works fine but the iOS version return this message dealing with the RNRadar Framework. I also added the iOS Framework for the iOS project and still return the same error message

'RadarSDK/RadarSDK.h' file not found

russellcullen commented 6 years ago

Hey there, how are you adding and linking the iOS Radar Framework, with CocoaPods, Carthage or manually?

If you're using Carthage or manual, you'll have to make sure the framework is linked in the Link Binary With Libraries Build Phase in your project settings.

neegbeah commented 6 years ago

It linked manually. This is an existing project and I don't want to recreate using CocoaPods. I added the iOS SDK and producing the same result.

russellcullen commented 6 years ago

Yeah no worries, no need to use CocoaPods, just trying to get more details. Which version of the Radar iOS SDK and radar-react-native are you seeing this issue?

neegbeah commented 6 years ago

This is some screenshots going on Xcode Version 10.0

screen shot 2018-11-14 at 11 09 40 am screen shot 2018-11-14 at 11 09 29 am

russellcullen commented 6 years ago

Mind sharing your build details?

neegbeah commented 6 years ago

Version of radar-react-native: 2.0.4. 2.1.0 was giving problems for the Android project so I reverted back iOS Version was 2.0.4 but recently upgraded to 2.1.0. Screenshot: screen shot 2018-11-14 at 11 27 58 am

Location Path : Project_Root/ios/RadarSDK.framework

russellcullen commented 6 years ago

Thanks, will look into it. Mind opening another issue for the 2.1.0 android bug?

neegbeah commented 6 years ago

Yes. Will open soon

russellcullen commented 6 years ago

We're not able to reproduce this behavior at the moment, would you also mind also sharing your Framework Search Paths (from Build Settings) in both your top-level app target and the embedded RNRadar.xcodeproj, see image below:

screen shot 2018-11-14 at 4 03 06 pm
neegbeah commented 6 years ago

Yes. Of course screen shot 2018-11-14 at 1 14 30 pm screen shot 2018-11-14 at 1 14 01 pm

russellcullen commented 6 years ago

Sorry I meant the Framework Search Paths for the embedded project as well, I suspect the RNRadar.xcodeproj isn't finding the linked framework in this case.

russellcullen commented 6 years ago

Related - are you seeing the same error if you were to try the import in your project files? Or is the error only in the embedded project?

neegbeah commented 6 years ago

Just in the embedded project. When I imported the Native iOS SDK and imported into the AppDelegate.h, it works fine. It just the RNRadar framework not recognizing the build.

russellcullen commented 6 years ago

Here's what my search paths look like in a working test project:

screen shot 2018-11-15 at 10 48 09 am

I've removed the pods and have basically the same setup as you described, so you can ignore the pod-specific search path. Does adding $(inherited) to the list fix your issue?

neegbeah commented 6 years ago

It works now. I just have to put the folder path without mentioning RadarSDK.framework. Sorry about that

russellcullen commented 6 years ago

Not a problem! Thanks for the report, we'll look into having better default search paths to prevent these kinds of issues in future versions.

vadimshvetsov commented 5 years ago

@coolbrow Is it possible to add ${SRCROOT}/../../../ios as a search path and make a release? I can manually do that in my XCode Project, but CI can't do that and always getting Library from npm without my path.

Or maybe I can handle that case with another way?