正在解决一个问题,我需要添加react-native-device-info
打包到我的 iOS 系统后,我必须将 React 的依赖项添加到我的 Podfile 中。
最初,我应用了我在网上找到的列表中的所有 podspec:
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'DevSupport',
'Core',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket'
]
但我意识到其中一些可能是不必要的,并通过反复试验将其缩减为:
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'DevSupport',
'Core',
'RCTAnimation',
'RCTImage',
'RCTLinkingIOS',
'RCTSettings',
'RCTText'
]
我的问题是我如何找出哪些子规格是必要的以及为什么?
也希望这个问题的答案能让我更好地理解使用子规格时发生的情况。