Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pod install causes error "unknown file type" when creating Acknowledgements.plist

Tags:

ios

cocoapods

I'm using CocoaPods for my app.

One of the modules is written in Swift, so my Podfile is as below.

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

When I run pod install, an error message appears:

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

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

Of course, I've prepared Setting.bundle and inside the bundle, I've created an empty Acknowledgement.plist, and modified root.plist to the suggested setting.

My CocoaPods' version is 0.39.0.

How can I solve the error?

like image 891
Masaru Kitajima Avatar asked Feb 01 '16 22:02

Masaru Kitajima


2 Answers

In my case, I was just running pod install in the wrong directory. Obviously, because file paths in your Podfile are relative, it means you should run the script from your project's root directory.

like image 124
mojuba Avatar answered Oct 19 '22 23:10

mojuba


Turns out the issue is not with CocoaPods. Instead it can't find a file at the provided location... Go in finder and insure there is a file at "Pods/Target Support Files/Pods/Pods-Acknowledgements.plist"

like image 27
Stephen Avatar answered Oct 20 '22 00:10

Stephen