Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using LinkingIOS - undefined is not an object #819

Closed
danielkramer opened this issue Apr 12, 2015 · 5 comments
Closed

Error using LinkingIOS - undefined is not an object #819

danielkramer opened this issue Apr 12, 2015 · 5 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@danielkramer
Copy link

I'm simply trying to open a url:

LinkingIOS.openURL("https://facebook.com/PlayUpwordsApp");

And getting:

message: undefined is not an object (evaluating 'RCTLinkingManager.openURL')"

I added RCTLinking.xcodeproj to my project and I'm still getting the same error. Any thoughts? I do notice the libRCTLinking.a file is red in Xcode.. does that mean it's not being built? I did add that .a file to the "Linked Frameworks and Librarys" section of my project.

@dimoreira
Copy link

Ok @danielkramer, Just make it work now.

You just need to add the RCTLinking.xcodeproj from the node_modules/react-native/Libraries/LinkingIOS/ to your project under the Libraries group. Build the project to get the libRCTLinking.a static library, and then go to your project General tab on Xcode and add the library to your Linked Frameworks and Libraries.

This sequence of work did it right for me 😀

@rkstar
Copy link

rkstar commented Apr 22, 2015

seems like this should be done automatically when you do let {LinkingIOS} = React no?

@nicklockwood
Copy link
Contributor

let {LinkingIOS} = React only includes the JavaScript code, not the native code. We split the native code into distinct libraries to keep the binary size down for apps that aren't using all of the features, so you need to include all of the libraries that contain the native modules you want to use in your app.

@rkstar
Copy link

rkstar commented Apr 22, 2015

ok! for anyone else who finds this... here is instructions: https://facebook.github.io/react-native/docs/linking-libraries.html

@cherniv
Copy link

cherniv commented Feb 9, 2016

@rkstar link to this doc has changed, now it is: https://facebook.github.io/react-native/docs/linking-libraries-ios.html) . LinkingIOS needs Step 3

@facebook facebook locked as resolved and limited conversation to collaborators May 29, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants