Potentially misleading iOS manual install instructions
See original GitHub issueTLDR
Steps 2. and 3. of the iOS manual install instructions should probably be replaced with:
- Add the following to your Podfile
pod 'RNShare', :path => '../node_modules/react-native-share'
Detailed explanation
After detaching Expo, I wanted to install react-native-share on it. Since I’d rather make the changes to the files myself, I chose the manual install instructions and followed it to heart, and proceeded to build my project in XCode.
That’s when I met the error that would keep me company for the next 2 hours: 'React/RCTAnimationType.h' file not found
.
No amount of Google searching and project cleaning did anything, but somehow, I eventually decided on running react-native link react-native-share
, expecting it do to close to nothing. Instead it added the following line to my Podfile: pod 'RNShare', :path => '../node_modules/react-native-share'
.
After this I had to do a bit more experimentation but in the end I got my build working by:
- doing some more cleaning (removing node_modules, Pods folder, lock files, etc.),
- removing the
libRNShare.a
fromLink Binary With Libraries
on XCode - reverting steps 2 and 3 of the instructions
- installing everything again (
npm i
,pod install
) - adding
libRNShare.a
once again (this time the version from the recently aquired RNShare Pod)
This leads me to believe that had the instruction been how I described in the TLDR, the build would have worked the first time. Unfortunately I don’t have the time or strength to test this theory right now, but I thought I’d leave this information here in case someone stumbles on this problem too, and hoping someone will have the time to test this theory and update the instructions.
Environment
- React Native version: Expo’s version for SDK 32.0.0
react-native-share
Version: 1.1.3
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
I can confirm that the solution outlined above has worked for me.
These are the exact steps I did to have a successful build:
That’s it.
About updating the README, before I do it I would have to find the time to test that the new instructions would indeed work. I’m confident they would, but they might not and I don’t want to confuse people even more, I would rather just leave this issue as a helper they can find in Google in case they get stuck as I did. But I might have some time to test this next week, we’ll see.