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

no rule to process file of type image.png for architecture i386

I.m 正在尝试为 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。

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

所以我在 pod 中创建了一个 Resources 文件夹并移动了所有 png 图像、自定义 storyboard 文件和 xib 文件。

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

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

结果 podspec 文件验证成功,我可以发布 pod。