使用 'GoogleMaps' 和 'GooglePlaces' pods,在归档时 iOS 构建接收多个命令的错误生成 GoogleUtilities 目标

Using 'GoogleMaps' and 'GooglePlaces' pods, when archiving iOS build receive error for multiple commands produce GoogleUtilities target

归档时遇到问题 - 我收到构建系统信息错误

Multiple commands produce '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework':
1) Target 'GoogleUtilities-00567490' has create directory command with output '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'
2) Target 'GoogleUtilities-ac14cd06' has create directory command with output '.../Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/ArchiveIntermediates/.../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/GoogleUtilities.framework'

我最近更新到最新版本 Xcode (v 10.0)。我也在使用 Cocoapod 版本 1.6.0.beta.1

使用 GoogleMaps pod 版本 2.7.0,GooglePlaces pod 版本 2.7.0 当我 运行 'pod install' 它也会安装 'GoogleUtilities (5.3.0)'.

我尝试删除我的 Podlock、Podfile、.xcworkspace 等,并在更新 Cocoapods 后使用新的 Podfile、pod init、pod install 等重新开始,但仍然没有成功。

我正在寻找与 Embed Pod Frameworks 中构建阶段中的 GoogleUtilities 或 Places 或 Maps 相关的副本,但运气不佳。当我查看 Pods 文件夹时,我确实看到了两个 GoogleUtilities 框架,"GoogleUtilities-00567490" 和 "GoogleUtilities-ac14cd06",但两者的内容似乎并不完全相同。

更新 Xcode 到 10.0 版后才遇到这个问题。

转到文件 > 工作区设置,然后将构建系统从 "New Build System (Default)" 更改为 "Legacy Build System" 将允许您暂时存档。希望在 Xcode 10.0

中使用那些 pods 和新构建系统的另一个解决方案出现了

对我来说,同样的问题来了,大多数人说要将构建系统更改为旧版,但是当我尝试它时它开始 swift 编译器错误。如下所述解决。

  1. 转到您的 目标 并点击 (your_app_name_target).
  2. Select 构建阶段.
  3. 展开复制Pods资源
  4. 请参阅输出文件部分。
  5. 这部分应该是空的。 删除那里的所有条目
  6. 重建你的项目。