react-native-analytics icon indicating copy to clipboard operation
react-native-analytics copied to clipboard

IOS setup issue

Open PavanGangireddy opened this issue 7 years ago • 2 comments

  1. In the docs, under iOS Installation the fifth point is like this: Make sure your project links to libAnalytics.a (The libraries should be listed under "Build Phases -> Link Binary With Libraries". Should happen automatically if you use cocoapods).

Issue is: cant find libAnalytics.a file instead found libAnalytics-iOS.a, libAnalytics-tvOS.a files. Also tried adding these files (libAnalytics-iOS.a, libAnalytics-tvOS.a) but it is still resulting in error: NativeRNSegmentIOAnalytics is undefined.

  1. Tried to modify 2,3,4 steps like this:
  • Inside Xcode (make sure you've opened your .xcworkspace file), go to the project navigator -> your project's name -> right click your project's name -> Add Files to [your project's name].
  • Go to node_modules/react-native-analytics/ios -> and choose the RNAnalytics folder.
  • Make sure you select RNSegmentIOAnalytics.h and RNSegmentIOAnalytics.h files and add them.

It fixed the issue....

PavanGangireddy avatar May 16 '18 03:05 PavanGangireddy

I have done the same things which you have mentioned above but still facing issue undefined is not an object (evaluating 'NativeRNSegmentIOAnalytics.setup')

rajatpillai avatar Aug 08 '18 07:08 rajatpillai

This worked for me when I added just the files RNSegmentIOAnalytics.h and RNSegmentIOAnalytics.m to libraries, but NOT the RNAnalytics folder.

angineering avatar Sep 15 '18 00:09 angineering