pod lib lint.One of these scenarios:
A resources bundle target is created, but empty, and is not actually build by Xcode or at least doesn't generate a build artifact which can be embedded, so that the build of the pod target fails subsequently due to missing this build product. This is not shown by default when running the linter and appears hidden behind a failure of xcodebuild. e.g.
- ERROR | [OSX] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
In verbose mode:
CpResource /var/folders/64/vmn77sp112xdn5np6mjtwxfw0000gn/T/CocoaPods/Lint/build/Release/RxRealm.bundle /var/folders/64/vmn77sp112xdn5np6mjtwxfw0000gn/T/CocoaPods/Lint/build/Release/RxRealm.framework/Versions/A/Resources/RxRealm.bundle
cd /var/folders/64/vmn77sp112xdn5np6mjtwxfw0000gn/T/CocoaPods/Lint/Pods
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /var/folders/64/vmn77sp112xdn5np6mjtwxfw0000gn/T/CocoaPods/Lint/build/Release/RxRealm.bundle /var/folders/64/vmn77sp112xdn5np6mjtwxfw0000gn/T/CocoaPods/Lint/build/Release/RxRealm.framework/Versions/A/Resources
error: /var/folders/64/vmn77sp112xdn5np6mjtwxfw0000gn/T/CocoaPods/Lint/build/Release/RxRealm.bundle: No such file or directory
** BUILD FAILED **
The following build commands failed:
CpResource /var/folders/64/vmn77sp112xdn5np6mjtwxfw0000gn/T/CocoaPods/Lint/build/Release/RxRealm.bundle /var/folders/64/vmn77sp112xdn5np6mjtwxfw0000gn/T/CocoaPods/Lint/build/Release/RxRealm.framework/Versions/A/Resources/RxRealm.bundle
2. (and 3., but 馃槰) have the advantage that it would support podspecs, which rely on bootstrapping the contents of the resource bundle by a prepare_command, which could yield empty contents as a possible outcome.
I'd prefer 1. as it would be similar to our handling of source_files not matching anything.
Part of the issue is that the default Pod template includes definition for bundle resources. It happened to me that I just leave these lines in my podspec and never realize why the lint fails.
Here's the relevant part of the default spec:
https://github.com/CocoaPods/pod-template/blob/master/NAME.podspec#L33
If you don't manually remove those lines and don't have resources, lint will fail
I'd prefer nr.1 as well, and we spawn a separate issue to comment the lines about resource_bundle in the default pod spec - just the way it is for frameworks, dependancies, etc.
This already appears to be done? https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/validator.rb#L521-L523
@segiddins: I guess, that didn't triggered because of the .gitkeep file in the template.
I think the issue will rather be that the resource_bundles hash isn't empty itself, but values in it will be empty arrays.
@neonichu: Yeah, you're right. We should just implement a custom validate method for resource bundles and remove it from the FILE_PATTERNS array.
@mrackwitz which of the 3 solutions originally proposed would that be?
@icanzilb: Solution 1.
Most helpful comment
@icanzilb: Solution 1.