mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 09:12:02 +00:00
74146cb315
Summary: The core React Native codebase already has full support for CocoaPods. However, `react-native link` doesn’t play nicely with CocoaPods, so installing third-party libs from the RN ecosystem is really hard. This change will allow to link projects that contains its own `.podspec` file to CocoaPods-based projects. In case `link` detect `Podfile` in `iOS` directory, it will look for related `.podspec` file in linked project directory, and add it to `Podfile`. If `Podfile` and `.podspec` files are not present, it will fall back to previous implementation. **Test Plan** 1. Build a React Native project where the iOS part uses CocoaPods to manage its dependencies. The most common scenario here is to have React Native be a Pod dependency, among others. 2. Install a RN-related library, that contains `.podspec` file, with `react-native link` (as an example it could be: [react-native-maps](https://github.com/airbnb/react-native-maps) 3. Building the resulting iOS workspace should succeed (and there should be new entry in `Podfile`) Closes https://github.com/facebook/react-native/pull/15460 Differential Revision: D6078649 Pulled By: hramos fbshipit-source-id: 9651085875892fd66299563ca0e42fb2bcc00825
34 lines
862 B
Plaintext
34 lines
862 B
Plaintext
source 'https://github.com/CocoaPods/Specs.git'
|
|
# platform :ios, '9.0'
|
|
|
|
target 'None' do
|
|
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
|
|
# use_frameworks!
|
|
# Your 'node_modules' directory is probably in the root of your project, # but if not, adjust the `:path` accordingly
|
|
pod 'React', :path => '../node_modules/react-native', :subspecs => [
|
|
'Core',
|
|
'RCTText',
|
|
'RCTNetwork',
|
|
'BatchedBridge',
|
|
'RCTImage',
|
|
'RCTWebSocket', # needed for debugging
|
|
# Add any other subspecs you want to use in your project
|
|
]
|
|
|
|
# Add new pods below this line
|
|
|
|
# test should point to this line
|
|
target 'NoneTests' do
|
|
inherit! :search_paths
|
|
# Pods for testing
|
|
end
|
|
end
|
|
|
|
target 'Second' do
|
|
|
|
target 'NoneUITests' do
|
|
inherit! :search_paths
|
|
# Add new pods below this line
|
|
end
|
|
|
|
end |