ios - pod install 在创建 Acknowledgements.plist 时导致错误 "unknown file type"

标签 ios cocoapods

我正在为我的应用程序使用 CocoaPods。

其中一个模块是用 Swift 编写的,所以我的 Podfile 如下。

platform :ios, "8.0"
use_frameworks!

target "ossTest" do
    pod 'Charts', "~> 2.0"
    pod "Color-Picker-for-iOS", "~> 2.0"
end

post_install do | installer |
require 'fileutils'

FileUtils.cp_r('Pods/Target Support Files/Pods/Pods-Acknowledgements.plist', 'ossTest/Settings.bundle/Acknowledgements.plist', :remove_destination => true)
# error
#FileUtils.cp_r('Pods/Pods-acknowledgements.plist', 'ossTest/Settings.bundle/Acknowledgements.plist', :remove_destination => true)

end

当我运行 pod install 时,出现一条错误消息:

[!] An error occurred while processing the post-install hook of the Podfile.

unknown file type: Pods/Target Support Files/Pods/Pods-Acknowledgements.plist

当然,我已经准备好 Setting.bundle 并在包内创建了一个空的 Acknowledgement.plist,并将 root.plist 修改为建议的设置。

我的 CocoaPods 版本是 0.39.0。

如何解决错误?

最佳答案

就我而言,我只是在错误的目录中运行 pod install。显然,因为 Podfile 中的文件路径是相对的,这意味着您应该从项目的根目录运行脚本。

关于ios - pod install 在创建 Acknowledgements.plist 时导致错误 "unknown file type",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35141854/

相关文章:

iphone - 如何将旧的表情符号编码转换为 iOS5 中的最新编码?

ios - 创建一个包含 n 个空格或其他重复字符的字符串

ios - 检查 UIImageView 是否有动画

ios - 命名空间冲突与 cocoa pod 模块 swift

ios - PrepareForSegue 没有传递所有数据?

ios - 设备旋转时更改自定义 inputView 的高度

ios - CocoaPods 因错误停止安装 Firebase/Analytics

ios - '找到一个 uxexpected Mach-O 头代码 : 0x72613c21' when trying to export an archive to IPA.

ios - 需要 Google 移动广告 SDK 常量的值

ios - "~>"在cocoapods中的用途是什么