analytics-react-native: [iOS] Cannot build anymore

Hi,

Since a few days ago I started to get this error when trying to build for iOS

[project_path]/Segment-Amplitude/Pod/Classes/SEGAmplitudeIntegrationFactory.h:2:9: 'Analytics/Analytics.h' file not found

I didn’t change anything in my project and I have tried everything I could think of, but I don’t seem to find a fix. Any ideas?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

@yuriceschin I used in package.json this specific version

 "@segment/analytics-react-native": "1.1.1-beta.2",
 "@segment/analytics-react-native-amplitude": "1.1.1-beta.2",

And in Podfile I’ve put

  pod "Analytics"
  pod 'RNAnalytics', :path => '../node_modules/@segment/analytics-react-native'
  pod 'RNAnalyticsIntegration-Amplitude', :path => '../node_modules/@segment/analytics-react-native-amplitude'

Clean your pod cache , ios/Pods folder, remove Podfile.lock and run pods install again. Keep an eye to get the Analytics 4.0.4 version and it should work

It looks like there is a fix for it though: https://github.com/segmentio/analytics-react-native/commit/cba5666080985ef79c317997f72a5ce13d3f9fe7#diff-7bb11dff82641e759fe6df1c37a1fab6L23 but probably not yet published

What you could try is after you install the integration packages (amplitude) to go to it’s podspec file and remove 3.9.0 and run pod install (I didn’t have the time to try this) but this will reset each time you run npm install

Hello, this is happening for the version >= 2.0.0

I perform some tests of 2.1.7 and 2.2.2 having the same problem

package.json

...
    "@segment/analytics-react-native": "2.0.0",
    "@segment/analytics-react-native-clevertap": "1.5.1",
    "@segment/analytics-react-native-firebase": "1.5.3",
    "@segment/sovran-react-native": "^0.2.8",
    ...
[!] Unable to find a specification for `RNAnalytics` depended upon by `RNAnalyticsIntegration-CleverTap`

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

Couldn't install: RNAnalyticsIntegration-CleverTap » RNAnalytics. Updating the Pods project and trying again...
Command `pod install` failed.
└─ Cause: Unable to find a specification for `RNAnalytics` depended upon by `RNAnalyticsIntegration-CleverTap`

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

any recommendation?