rules_apple
rules_apple copied to clipboard
`apple_resource_bundle` should bundle a default Info.plist if `infoplists` isn't set
A resource bundle without a valid Info.plist won't work correctly (e.g. no images will be found in it). Since infoplists is optional, it's easy to create a resource bundle that doesn't work, and is really hard to debug what is wrong.
Many other rules require this field to be set. I've generally felt like they could have defaults in some cases too. But I wonder if for now we should make that attr required? Or I wonder if it was intentional because some cases do work without it?
Yes it is weird that it is optional, but that the docs state:
At least one file must be specified.
How do you create a Info.plist for a apple_resource_bundle? 🤔 I am trying this empty Info.plist now
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>families</key>
<array/>
</dict>
</plist>
But I doubt it will work correctly.
This is the plist we use for them:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleIdentifier</key>
<string>com.lyft.$(PRODUCT_NAME)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>
Thanks for sharing! :)