Comments (11)
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.
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?
from react-native-amplitude-analytics.
Did you go through the pod installation process (step 2 of the guide) as well?
from react-native-amplitude-analytics.
@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.
Right yes that makes sense.
from react-native-amplitude-analytics.
@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.
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.
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.
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:
- Download the Amplitude SDK from here: https://github.com/amplitude/Amplitude-iOS/archive/master.zip.
- Extract the ZIP file.
- 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). - 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.
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.
Fixed on 0.1.20
from react-native-amplitude-analytics.
Related Issues (20)
- NPM install / setUserPropertyOnce is not a function HOT 2
- hard coded buildToolsVersion causing warning after upgrading to RN 0.57 HOT 1
- Updating Amplitude SDK to 4.3.1 ? HOT 2
- convertArrayToJson is missing on Android HOT 4
- Add append and prepend methods HOT 4
- Trouble building the app HOT 11
- Ошибка сборки кастомного presenter HOT 3
- TypeScript typings HOT 1
- [iOS] Not finding Amplitude-iOS SDK when building with manual SDK HOT 9
- Doubt about pod install in iOS HOT 3
- Question: how to use amplitude in different places HOT 1
- [Android] com.amplitude.api.AmplitudeClient: Invalid API key, make sure your API key is correct in initialize() HOT 3
- 0.60.x problems on Android HOT 2
- [Question]: How do I disable IDFA HOT 6
- Add setSessionId method HOT 3
- [Question] Initialization in several components HOT 2
- Support TrackLocation HOT 1
- Raw SQL queries used for SQLLite database HOT 1
- Deprecate this repository in favor of @amplitude/react-native
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-amplitude-analytics.