GithubHelp home page GithubHelp logo

Comments (11)

SudoPlz avatar SudoPlz commented on July 17, 2024

I'll be away for a week so I can't really help atm but it looks like you haven't installed the amplitude pod. Did you go through the pod installation process (step 2 of the guide)?

from react-native-amplitude-analytics.

pincheira avatar pincheira commented on July 17, 2024

Same thing here:

.../node_modules/react-native-amplitude-analytics/ios/AmplitudeSDK.h:11:9: fatal error: 'Amplitude.h' file not found
#import "Amplitude.h"
        ^~~~~~~~~~~~~
1 error generated.

Any ideas?

cc/@KlimczakM @SudoPlz

from react-native-amplitude-analytics.

SudoPlz avatar SudoPlz commented on July 17, 2024

Did you go through the pod installation process (step 2 of the guide) as well?

from react-native-amplitude-analytics.

pincheira avatar pincheira commented on July 17, 2024

@SudoPlz didn't want to put cocoapods, too much for my little project.

So I fixed it for now:

I had to explicitly set:

"$(SRCROOT)/../../../ios/standupsmobile/Amplitude-iOS/Amplitude"

Under Header Search Paths within the project RNAmplitudeSDK

from react-native-amplitude-analytics.

SudoPlz avatar SudoPlz commented on July 17, 2024

Right yes that makes sense.

from react-native-amplitude-analytics.

pincheira avatar pincheira commented on July 17, 2024

@SudoPlz but gets overridden by react-native link _libraryName_.

Had to go the cocoapods way sadly, I also found out I need it for other libraries.

Thanks for taking the time to reply on a Saturday, and have a great one @SudoPlz

from react-native-amplitude-analytics.

pincheira avatar pincheira commented on July 17, 2024

So I just finished setting up cocoapods, the Amplitude-iOS pod installed well.

But within react-native-amplitude-analytics/ios/AmplitudeSDK.h:11:9 it still cannot find the file? That's weird:

node_modules/react-native-amplitude-analytics/ios/AmplitudeSDK.h:11:9: fatal error: 'Amplitude.h' file not found
#import "Amplitude.h"
        ^~~~~~~~~~~~~
1 error generated.



** BUILD FAILED **

from react-native-amplitude-analytics.

SudoPlz avatar SudoPlz commented on July 17, 2024

I'm on vacation and can't take a deeper dive, but for some reason, the rn amplitude project can't find amplitude sdk files. Usually that's either because the sdk is not installed or most probably in your case because the header files of amplitude sdk are not exposed to the rn amplitude project.

That should not be a problem but it could be because you changed the header files manually.

Can you delete node_modules/react-native-amplitude-analytics and yarn add react-native-amplitude-analytics? That way a fresh copy of the rn amplitude project will be downloaded.

from react-native-amplitude-analytics.

KlimczakM avatar KlimczakM commented on July 17, 2024

I have resolved it. This instruction is incorrect:

download the Amplitude-iOS sdk from here and add it to your project manually. Make sure the Amplitude-iOS directory of the SDK is included in the root of your app's ios folder.

Correct steps:

  1. Download the Amplitude SDK from here: https://github.com/amplitude/Amplitude-iOS/archive/master.zip.
  2. Extract the ZIP file.
  3. Open extracted folder, copy only Amplitude folder (not whole unzipped Amplitude-iOS!) to your project /ios/Pods folder (not the root /ios!), even if you don't use Pods (this location is expected by linked project).
  4. Rename copied Amplitude folder to Amplitude-iOS (this is name expected by linked project).

This solution doesn't change the library itself, so it won't be overridden.

from react-native-amplitude-analytics.

SudoPlz avatar SudoPlz commented on July 17, 2024

Interesting, what you said sounds right, and it looks like an extra header path should be added to the react-native-amplitude-analytics, so that it looks for headers inside root/ios/Amplitude-iOS.
Would it be too much to ask for that PR @KlimczakM ?

from react-native-amplitude-analytics.

SudoPlz avatar SudoPlz commented on July 17, 2024

Fixed on 0.1.20

from react-native-amplitude-analytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.