Reputation: 1557
I've been trying for days to get Universal Linking working on iOS for React Native.
The docs here say "On iOS, you'll need to link RCTLinking to your project". I'm then told to go to node_modules/react-native/Libraries/LinkingIOS
and drag a .xcodeproj
file into my project.
None of the libraries in the Libraries
folder whatsoever have any .xodeproj
files in them.
Is there meant to be? Is my react-native
instance missing something? Googling this issue pulls up nothing at all - does everyone else have .xcodeproj
files in their Libraries
folder??
Upvotes: 9
Views: 3005
Reputation: 10252
Starting with version 0.60 React Native provides auto-linking.
To have the library available in RN versions newer than 0.60 you have to:
1) Add reference to LinkingIOS
folder into header search paths
in
Xcode -> project target -> projectName ->Build Settings -> header search paths:
$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS
2) Import it in AppDelegate.m
#import "RCTLinkingManager.h"
About the other steps that you need to do:
you can check this link:
https://www.ekreative.com/blog/universal-linking-in-react-native-for-ios/
Just ignore the manual linking paragraph on that page.
Upvotes: 23