将 cocoapods 添加到使用cordova 6.5 创建的iOS 工作区

Ami*_*neG 0 xcode ios cocoapods cordova

我正在使用 Apache Cordova 6.5,添加 iOS 平台并尝试在由cordova iOS 项目创建的工作区中使用 cocoapods。

当我运行命令时

吊舱安装

Xcode 项目无法编译,并且出现以下错误

diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Run Code Online (Sandbox Code Playgroud)

以下是我为解决此问题所做的步骤:

  • 创建一个新的 Cordova 6.5 项目

科尔多瓦创建应用程序1

  • 进入项目文件夹并添加iOS平台

光盘应用1/

科尔多瓦平台添加ios

  • 转到 iOS 项目文件夹并运行 pods

cd 平台/ios

豆荚初始化

吊舱安装

我尝试使用基本 podfile 和添加工作区名称的 podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
workspace 'HelloCordova'
xcodeproj 'HelloCordova.xcodeproj'

target 'HelloCordova' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for HelloCordova

end
Run Code Online (Sandbox Code Playgroud)

关于如何解决这个问题的任何想法?

PS:我使用的是cordova 6.5.0、cordova-ios 4.3.1、Xcode 8.2

Ami*_*neG 5

此问题通过修改build-debug.xcconfigbuild-release.xcconfig文件并替换

#include "../pods-release.xcconfig"
Run Code Online (Sandbox Code Playgroud)

像这样的路径

#include "../Pods/Target Support Files/Pods-HelloCordova/Pods-HelloCordova.release.xcconfig
Run Code Online (Sandbox Code Playgroud)

然后再做一次

pod install
Run Code Online (Sandbox Code Playgroud)