在 react-native(0.59.5 版)项目上工作,刚刚安装了 cocoapods(1.7.5 版)
安装过程:
(从项目目录中)
-sudo gem install cocoapods
(从项目的 iOS 目录中)
-pod init
-pod install --repo-update
结果:
Analyzing Dependencies
[!] The Target 'ProjectName-tvOSTests' is declared multiple times.
然后尝试pod update导致相同的“分析依赖关系”警告。iOS 目录中只有一个 Podfile 和一个“Pods”目录。pods 目录有三个子目录,它们都是空的。期间似乎出现了挂断,pod install但我不知道在哪里可以找到重复的声明。
我知道您应该在安装 cocoapods 后从 ProjectName.xcworkspace 文件中工作,但我的 iOS 项目目录中没有 .xcworkspace 文件。我该如何解决?
编辑:
播客文件
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'TicTacWHOA' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TicTacWHOA
pod 'Google-Mobile-Ads-SDK'
target 'TicTacWHOA-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'TicTacWHOATests' do
inherit! :search_paths
# Pods for testing
pod 'Google-Mobile-Ads-SDK'
end
end
target 'TicTacWHOA-tvOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TicTacWHOA-tvOS
target 'TicTacWHOA-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end