question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Potentially misleading iOS manual install instructions

See original GitHub issue

TLDR

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 from Link 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:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pavelgajdoscommented, Feb 6, 2019

I can confirm that the solution outlined above has worked for me.

These are the exact steps I did to have a successful build:

(0.) expo eject // I didn't need to eject before
1. removing node_modules
2. npm install
3. cd ios && pod install && cd ..

4. npm install react-native-share --save
5. react-native link react-native-share
6. cd ios && pod install # this is important, pod install should be called again after react-native link
7. Adding libRNShare.a to Build phases in Xcode
(8.) I also added MessageUI.framework and Social.framework as suggested in the readme.

That’s it.

1reaction
fvieiracommented, Jan 11, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Direct manual 14.8 iOS download - Apple Community
Direct manual 14.8 iOS download ... There is no downloadable iPhone manual any more, only the online Using iPhone website. You can load...
Read more >
How to Install the iOS 16 Public Beta - MacRumors
1. Plug your iPhone, iPad, or iPod touch into your Mac using the supplied cable. 2. Open a Finder window by clicking the...
Read more >
Remove “Your iPhone has been hacked” pop-up ad
This article explains the logic of 'Your iPhone has been hacked' scam ad campaign and provides steps to remove this pop-up virus from...
Read more >
iOS Accessibility: Getting Started - RayWenderlich.com
In this iOS accessibility tutorial, learn how to make apps more accessible using VoiceOver and the Accessibility inspector.
Read more >
Hidden iPhone Tips and Tricks to Make You an iOS Pro | PCMag
Apple's iOS is a very user-friendly mobile operating system, ... These expert tips will help you unlock your iPhone's full potential.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found