airbnb / airbnb/native-navigation
Provide an installation option without CocoaPods
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
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 using `react-native link`. Although it's not hard to do, the code won't work with a standard `react-native init` app due to the current way it imports React (using `import 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?
Contributor guide
Research direction
Start by comparing the existing CocoaPods distribution with how a standard react-native init app uses react-native install or react-native link. Investigate the Swift files containing `import React` and the npm publishing flow; done means the library can be installed without CocoaPods while preserving the existing CocoaPods path and avoiding manual import removal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native, swift
- Domain
- developer-experience, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100