segmentio / analytics-react-native

The hassle-free way to add analytics to your React-Native app.
https://segment.com/docs/sources/mobile/react-native/
MIT License
367 stars 191 forks source link

'Analytics/SEGAnalytics.h' file not found after updating to 1.3.2 #236

Closed SMJ93 closed 3 years ago

SMJ93 commented 4 years ago

I updated from 1.3.1 to 1.3.2 and my iOS app no longer builds and outputs the following error:

'Analytics/SEGAnalytics.h' file not found

I think it is related to the pod dependency: Analytics (4.1.1).

It works as expected if I revert to 1.3.1 Analytics (4.0.5).

react-native-info:

System:
    OS: macOS 10.15.7
    CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Memory: 1.18 GB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.9.1 - ~/.nvm/versions/node/v12.9.1/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v12.9.1/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v12.9.1/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.9.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK:
      API Levels: 23, 25, 26, 27, 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 12.1/12A7403 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_172 - /usr/bin/javac
    Python: 2.7.15 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1
    react-native: 0.63.3 => 0.63.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
Diego-F-Aguirre commented 4 years ago

For me the solution was downgrading to 1.3.0

martintreurnicht commented 4 years ago

https://github.com/segmentio/analytics-react-native/pull/234 fixes this issue

rborn commented 4 years ago

@martintreurnicht I tried to patch the package with this but is not working, any idea how I could do it ? 'Segment/SEGAnalytics.h' file not found

Thank you 😻

martintreurnicht commented 4 years ago

@rborn Did you run pod install? It seems like you haven't installed the latest version of Analytics (4.1+) package yet

agabriele-radius commented 3 years ago

This is preventing me from using @segment/analytics-react-native-amplitude (using version 1.3.0 doesn't help). For some reason, @segment/analytics-react-native-mixpanel is working fine.

alicema15 commented 3 years ago

Downgrading to version 1.3.1 worked for me ✨

FadiAboMsalam commented 3 years ago

@agabriele-radius I am facing the same issue with amplitude any solution for this?

DuncanLewis commented 3 years ago

Any update on this? I'm blocked and none of the proposed fixes has worked for me without causing additional errors.

bandojulio commented 3 years ago

I am having the same problem. It looks like it depends on Segment/SEGAnalytics.h instead of Analytics/SEGAnalytics.h

bsneed commented 3 years ago

Closing this as it seems to be resolved by various other changes.

DuncanLewis commented 3 years ago

@bsneed Can you confirm which other changes fix this and what the suggested resolution for us is?

bsneed commented 3 years ago

@DuncanLewis all device mode libraries have been updated to reflect the Segment path being used for the headers. I can't list them all here, but be sure you do a pod repo update to make sure CocoaPods has all the latest versions available.

simistern commented 3 years ago

@bsneed I am facing this issue and cannot seem to resolve via any of the above methods:

we cannot downgrade either.

Is there anything else available I could try? Thank you

sirajtahra commented 2 years ago

+1

alacret commented 2 years ago

Having the same problem with version 2.3.1

AppDelegate.m:23:9: 'Analytics/SEGAnalytics.h' file not found

bsneed commented 2 years ago

You can't mix and match 2.x with 1.x. 2.x does not need Analytics-iOS anymore. You have some kind of misconfiguration.

alacret commented 2 years ago

@bsneed appreciate the help and super fast answer to my inquiry.

I manage to get the build running by removing the CleverTap library and destination and by removing this 2 lines on the AppDelegate.m :

...
#import <Analytics/SEGAnalytics.h>
...
[[SEGAnalytics sharedAnalytics] receivedRemoteNotification:userInfo];
...

Maybe this can be added to the Migration Guide: https://github.com/segmentio/analytics-react-native/blob/master/MIGRATION_GUIDE.md

bsneed commented 2 years ago

No problem! I realize this is confusing and not documented well enough as there are some destination support gaps between 1.x and 2.x here. I started a thread internally about rectifying it ASAP.