我试图为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。
答案 0 :(得分:3)
我发现问题是我在创建CocoaPod时指定了资源文件作为实际Resources
(。png,.storyboard和.xib)。
因此,我在广告连播中创建了一个Resources
文件夹,并移动了所有png
张图片,自定义storyboard
文件和xib
个文件。
在podspec
文件中,我添加了以下规范:
s.resources = ['Resources/**/*.*']
结果podspec
文件已成功验证,我能够释放pod。