Я создаю приложение, используя https://github.com/invertase/react-native-firebase, и он предложил лучший способ установки - через CocoaPods, однако у меня возникает 10000 проблем, одна за другой, когда я пытаюсь заархивировать свое приложение.
Мне интересно, как лучше всего использовать React Native и Cocoapods и как все импортируется / загружается, и действительно ли это CocoaPods действительно влияет на мое приложение.
В конце концов я дошел до этого шага, и он запускается в симуляторе, однако я не уверен, что мне нужны все мои ссылки на разные модули, даже если бы я мог установить их через npm install
.
Буду очень признателен за любые советы, так как мне все равно придется отказаться от CocoaPods и попробовать установить его с нуля.
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'myApp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for myApp
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
# Add yoga.
# https://github.com/facebook/react-native/issues/13046#issuecomment-350523190
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Set React to be from node_modules.
pod 'React', :path => '../node_modules/react-native'
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'DevSupport',
'CxxBridge',
'RCTNetwork',
]
target 'myApp-tvOSTests' do
inherit! :search_paths
# Pods for testing
# pod 'react-native-video', :path => '../node_modules/react-native-video'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'SentryReactNative', :path => '../node_modules/react-native-sentry'
pod 'react-native-in-app-utils', :path => '../node_modules/react-native-in-app-utils'
pod 'react-native-camera', :path => '../node_modules/react-native-camera'
pod 'RNIap', :path => '../node_modules/react-native-iap'
# pod 'RNShare', :path => '../node_modules/react-native-share'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
end
target 'myApp' do
inherit! :search_paths
# Pods for testing
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
end