当我从Swift 2.2 升级到Swift 3 时,我做的第一件事就是清理并删除我的cocoapods:
pod deintegrate
pod clean
pod cache clean --all
rm Podfile
由于某种原因,当我重新安装我原来拥有的所有 pod 时,GoogleInterchangeUtilities 文件以及其他几个文件在此过程中被删除:
Analyzing dependencies
Removing GoogleInterchangeUtilities //**REMOVED**
Removing GoogleNetworkingUtilities //**REMOVED**
Removing GoogleParsingUtilities //**REMOVED**
Removing GoogleSymbolUtilities //**REMOVED**
Removing GoogleUtilities //**REMOVED**
Downloading dependencies
Installing Alamofire 3.5.1 (was 3.4.1)
Installing Firebase 3.15.0 (was 3.3.0)
Installing FirebaseAnalytics 3.7.0 (was 3.2.1)
Installing FirebaseAuth 3.1.1 (was 3.0.3)
Installing FirebaseCore (3.5.2)
Installing FirebaseCrash 1.1.6 (was 1.0.6)
Installing FirebaseDatabase 3.1.2 (was 3.0.2)
Installing FirebaseDynamicLinks 1.3.4 (was 1.1.0)
Installing FirebaseInstanceID 1.0.9 (was 1.0.7)
Installing FirebaseStorage 1.1.0 (was 1.0.2)
Installing GTMSessionFetcher (1.1.9)
Installing GoogleMaps 2.2.0 (was 1.13.2)
Using GooglePlacesAPI (1.0.6)
Installing GoogleToolboxForMac (2.1.1)
Installing ObjectMapper 1.5.0 (was 1.3.0)
Installing Protobuf (3.2.0)
Using SDWebImage (3.8.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 10 dependencies from the Podfile and 17 total pods installed.
我最终去了谷歌并输入了GoogleInterchangeUtilities,这将我带到了它的 pod 安装页面here。我重新安装了删除错误的 pod,但随后删除的每个其他文件都导致了它们自己的 ld: framework not found... Xcode 错误。
长话短说,如果您清理并删除了 cocoapods 文件并重新安装了所有内容,那么Google...Utilities 框架可能会被删除。您必须将这些特定的单个 pod 重新包含在您的 pod 文件中并再次运行:pod install。
这是我的 pod 文件,除了我的所有其他 pod 之外,还包含它们:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'myProject' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for myProject
pod 'GoogleInterchangeUtilities', '~> 1.2'
pod 'GoogleNetworkingUtilities', '~> 1.2'
pod 'GoogleParsingUtilities', '~> 1.1'
pod 'GoogleSymbolUtilities', '~> 1.1'
pod 'GoogleUtilities', '~> 1.3'
//all my other pods...
这是他们的 cocoapods 安装页面:
GoogleInterchangeUtilities
GoogleNetworkingUtilities
GoogleParsingUtilities
GoogleSymbolUtilities
GoogleUtilities