Migrated from React Native repo
https://github.com/facebook/react-native/issues/22162
This is not something we can fix at the moment due to architecture limitations of the CLI.
Please do something about this, the only workaround here is doing this manually which is cumbersome . Have some way to pass the target name to the react-native link command. @grabbou
@grabbou is there any progress or work around for this. We are building a CLI at nyc.gov that extends the react-native-cli and automates build processes across multiple targets and ENV's.
This has the potential to be a big blocker for us.
also in 0.60+, is the link call hidden or is it actually replaced, allowing for multiple targets to be linked up without issue?
@GoodPBC in 0.60+ we use autolinking with CocoaPods for automatic native modules discovery, no need for react-native link <package> which is now quite useless and soon to be removed hopefully.
Read about it here: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
@thymikee how does this impact the multi-target/ multi-scheme approach? Basically will only the out of the box ios targets and schemes be auto-linked or does this bring new life to the multi environment approach?
With CocoaPods and autolinking you can use Podfile to do it for you:
def pods()
# react pods...
use_native_modules!
end
target 'appDev' do
pods()
end
target 'app' do
pods()
end
Most helpful comment
With CocoaPods and autolinking you can use Podfile to do it for you: