没有规则来处理架构i386的image.png类型的文件

时间:2016-03-18 11:45:08

标签: objective-c xcode cocoapods

我试图为Cocoapods创建Pod。在podspec验证过程中遇到了这个错误:

- ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
- NOTE  | xcodebuild:  warning: no rule to process file 'sequencing-file-selector-api-objc/Pod/ResourceBundle.bundle/myfiles.png' of type image.png for architecture i386
- NOTE  | xcodebuild:  warning: no rule to process file 'sequencing-file-selector-api-objc/Pod/ResourceBundle.bundle/nav_clear_pixel.png' of type image.png for architecture i386
- NOTE  | xcodebuild:  warning: no rule to process file 'sequencing-file-selector-api-objc/Pod/ResourceBundle.bundle/nav_pixel.png' of type image.png for architecture i386
- NOTE  | xcodebuild:  warning: no rule to process file 'sequencing-file-selector-api-objc/Pod/ResourceBundle.bundle/samplefiles.png' of type image.png for architecture i386
- NOTE  | xcodebuild:  warning: no rule to process file 'sequencing-file-selector-api-objc/Pod/ResourceBundle.bundle/myfiles.png' of type image.png for architecture x86_64
- NOTE  | xcodebuild:  warning: no rule to process file 'sequencing-file-selector-api-objc/Pod/ResourceBundle.bundle/nav_clear_pixel.png' of type image.png for architecture x86_64
- NOTE  | xcodebuild:  warning: no rule to process file 'sequencing-file-selector-api-objc/Pod/ResourceBundle.bundle/nav_pixel.png' of type image.png for architecture x86_64
- NOTE  | xcodebuild:  warning: no rule to process file 'sequencing-file-selector-api-objc/Pod/ResourceBundle.bundle/samplefiles.png' of type image.png for architecture x86_64
- NOTE  | [iOS] xcodebuild:  : error: Not enough arguments provided; where is the input document to operate on?

Podspec包含以下设置:

s.resource = 'Pod/ResourceBundle.bundle'
s.resources = ['Pod/ResourceBundle.bundle/*.png']

所有图片都在ResourceBundle.bundle

之内

如何处理此类错误?无法验证podspec。

1 个答案:

答案 0 :(得分:3)

我发现问题是我在创建CocoaPod时指定了资源文件作为实际Resources(。png,.storyboard和.xib)。

因此,我在广告连播中创建了一个Resources文件夹,并移动了所有png张图片,自定义storyboard文件和xib个文件。

podspec文件中,我添加了以下规范:

s.resources = ['Resources/**/*.*']

结果podspec文件已成功验证,我能够释放pod。

相关问题