ios - react-native - Pod 安装卡在克隆规范 repo
问题描述
突然间,当我尝试将新的 pod 添加到 Podfile 并尝试安装它们时,这个过程变得无限!这是我的 Podfile:
# Podfile content
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'MyProject' do
# React Native
rn_path = '../node_modules/react-native'
rn_maps_path = '../node_modules/react-native-maps'
pod 'yoga', :path => "#{rn_path}/ReactCommon/yoga"
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'React', path: "#{rn_path}", :subspecs => [
'Core',
'CxxBridge',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'DevSupport'
]
pod 'DoubleConversion', :podspec => "#{rn_path}/third-party-podspecs/DoubleConversion.podspec"
pod 'glog', :podspec => "#{rn_path}/third-party-podspecs/glog.podspec"
pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec"
# Required by Google Map, ignore if you use Apple Map
pod 'GoogleMaps', '2.5.0'
pod 'Google-Maps-iOS-Utils', '2.1.0'
pod 'GoogleUtilities', '5.3.7'
pod 'GoogleAppMeasurement', '5.4'
pod 'react-native-maps', path: rn_maps_path
pod 'react-native-google-maps', path: rn_maps_path # <~~ if you need GoogleMaps support on iOS
pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'RNKeychain', :path => '../node_modules/react-native-keychain'
pod 'RNSecureRandom', :path => '../node_modules/react-native-securerandom'
pod 'RNShare', :path => '../node_modules/react-native-share'
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
pod 'react-native-image-resizer', :path => '../node_modules/react-native-image-resizer'
pod 'RNFS', :path => '../node_modules/react-native-fs'
pod 'RNScrypt', :path => '../node_modules/react-native-scrypt'
pod 'react-native-randombytes', :path => '../node_modules/react-native-randombytes'
pod 'RNOS', :path => '../node_modules/react-native-os'
pod 'TcpSockets', :path => '../node_modules/react-native-tcp'
pod 'react-native-udp', :path => '../node_modules/react-native-udp'
pod 'react-native-aes', :path => '../node_modules/react-native-aes-crypto'
pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'RNFBApp', :path => '../node_modules/@react-native-firebase/app'
pod 'RNFBMessaging', :path => '../node_modules/@react-native-firebase/messaging'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "react-native-google-maps"
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
if target.name == "React"
target.remove_from_project
end
targets_to_ignore = %w(React yoga)
if targets_to_ignore.include? target.name
target.remove_from_project
end
end
end
这是日志:
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-MyProject`: (``)
Fetching external sources
-> Fetching podspec for `BVLinearGradient` from `../node_modules/react-native-linear-gradient`
-> Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
-> Fetching podspec for `Folly` from `../node_modules/react-native/third-party-podspecs/Folly.podspec`
-> Fetching podspec for `RNCAsyncStorage` from `../node_modules/@react-native-community/async-storage`
-> Fetching podspec for `RNDeviceInfo` from `../node_modules/react-native-device-info`
-> Fetching podspec for `RNFBApp` from `../node_modules/@react-native-firebase/app`
-> Fetching podspec for `RNFBMessaging` from `../node_modules/@react-native-firebase/messaging`
-> Fetching podspec for `RNFS` from `../node_modules/react-native-fs`
-> Fetching podspec for `RNKeychain` from `../node_modules/react-native-keychain`
-> Fetching podspec for `RNOS` from `../node_modules/react-native-os`
-> Fetching podspec for `RNSVG` from `../node_modules/react-native-svg`
-> Fetching podspec for `RNScrypt` from `../node_modules/react-native-scrypt`
-> Fetching podspec for `RNSecureRandom` from `../node_modules/react-native-securerandom`
-> Fetching podspec for `RNShare` from `../node_modules/react-native-share`
-> Fetching podspec for `RNVectorIcons` from `../node_modules/react-native-vector-icons`
-> Fetching podspec for `React` from `../node_modules/react-native`
-> Fetching podspec for `TcpSockets` from `../node_modules/react-native-tcp`
-> Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
-> Fetching podspec for `react-native-aes` from `../node_modules/react-native-aes-crypto`
-> Fetching podspec for `react-native-google-maps` from `../node_modules/react-native-maps`
-> Fetching podspec for `react-native-image-picker` from `../node_modules/react-native-image-picker`
-> Fetching podspec for `react-native-image-resizer` from `../node_modules/react-native-image-resizer`
-> Fetching podspec for `react-native-maps` from `../node_modules/react-native-maps`
-> Fetching podspec for `react-native-randombytes` from `../node_modules/react-native-randombytes`
-> Fetching podspec for `react-native-udp` from `../node_modules/react-native-udp`
-> Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because
checking is only perfomed in repo update
Cloning spec repo `cocoapods` from `https://github.com/CocoaPods/Specs.git`
$ /usr/bin/git clone https://github.com/CocoaPods/Specs.git -- cocoapods
Cloning into 'cocoapods'...
它卡在这里,当我检查活动指示器时,一个名为的进程git-remote-https
不断地从 repo 中获取源,但它也没有结束!为什么这样??如何修复它
解决方案
更改
source 'https://github.com/CocoaPods/Specs.git'
为
source 'https://cdn.cocoapods.org/'
请注意,这需要 CocoaPods 1.8.0 或更高版本。看pod --version
推荐阅读
- visual-studio-code - VsCode:是否有键盘快捷键如何使 VS Code 将没有扩展名的文件视为某种语言?
- android - 我在启用 android.useAndroidX 的情况下收到“AndroidX 依赖项”错误
- unit-testing - 如何使用 ctest 和 gtest_discover_tests 累积代码覆盖率?
- vb.net - 使用正则表达式获取字符串中的部分
- python - Scrapy Python 网页抓取 JSON
- xaml - 如何以编程方式将 ScrollViewer 滚动到 uwp xaml 的顶部?
- reactjs - 我的方法调用有什么问题我尝试学习 React 并且必须将组件和道具传递给孩子
- swift - Swift 泛型:如何避免这种奇怪的行为?
- azure - 在 Azure Devops 中,有没有办法让构建/工作目录在作业中持续存在?
- cxf - quarkus-cxf 本机构建失败 - UnresolvedElementException - 在解析期间发现未解析的方法