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
Provide an installation option without CocoaPods #54
Comments
Hey, thanks for filing an issue. I'd like us to make Native Navigation work without CocoaPods. The problem is not cocoapods but rather the fact that the swift library (native navigation) has a transitive dependency on React, which we also want to include in the app as a statically linked binary, which for the most part is incompatible with swift. I don't think removing the imports and then treating the library as application code is the right approach though. I will try and rope in some other people that understand this better and see if they can help and what they think we should do. |
Thanks for your feedback! Yeah, I completely understand your concerns. This is just one of the approaches we can take there, so I'm completely fine with any proposed alternative if result will be the same. In the meantime, I'll fill the gap by forking your library and implementing proposed solution. Once it'll be solved in the master, I'll delete my fork. Please, let me know if I can help solving this. |
What about Carthage support? I only use Carthage in my development |
@nihgwu can we have a separate thread for Carthage support? I'd like to keep this thread as focused as possible (otherwise initial subject will be lost). |
@Kureev - could you write out how you got the install working, specifically? Would be helpful to me, I don't use CocoaPods. |
@braco sure. I wrote a short blogpost about it, but not sure if I should publish it. Here you can see the draft: https://medium.com/@kureevalexey/how-to-use-airbnbs-native-navigation-without-cocoapods-aa958554beff |
@Kureev: thank you! I say publish it, a hacky solution beats no solution. |
With upcoming support for Swift static libraries in Xcode 9, it seems like it should be possible to get something working with |
Is there anyone that managed to do this with react-native link? |
Forward activity result to react
Dear authors,
Currently, there is only one way how you can add this project to iOS app (using CocoaPods). As a JavaScript / React Native developer, I'd like to be able to install this awesome library using
react-native install
or link it by usingreact-native link
. Although it's not hard to do, the code won't work with a standardreact-native init
app due to the current way it imports React (usingimport React
in Swift files).I managed to make it work without these imports (by adding
native-navigation
library directly to the project), but I consider this way pretty hackish as I have to remove these imports by hand. I'd like to find a way how we can distribute a Cocoa pod using CocoaPods and npm module using the same codebase. The best thing I can think of is a pre-publish hook that cuts off imports before publishing (tmp dir -> s/import React//g -> publish files from tmp dir -> rm tmp dir).What do you think?
The text was updated successfully, but these errors were encountered: