Add Info.plist on SPM Bundle

Hi all, looking to add Info.plist on Bundle, but got error instead
resource 'Resource/Info.plist' in target 'Project' is forbidden; Info.plist is not supported as a top-level resource file in the resources bundle

any reason why this is not supported on current SPM ?

Xcode 12 beta 4

Xcode generates an Info.plist for resource bundles automatically and we don't support merging multiple Info.plists right now, so a custom one would conflict with the one produced by Xcode.

Having a similar issue: We're in the process of making our framework available with SPM.
Our framework provides a property to access the current version string. Previously this was just wrapping CFBundleShortVersionString from the frameworks Info.plist.

Is this still accessible without explicitly adding it to the packages resource bundle? Or how would you achieve something like access to version info in a swift package?

Would love to get some thoughts on this as well. Given that version info is stored in Info.plist and libraries often have reasons for needing to get that (logging, API methods, user-agent, etc.) this feels like a bit of a miss.

For now we've had to add a separate plist to hold this information for SPM integrations but it would be awesome to not have to do this.

Alamofire moved to including the version number internally. This has, unfortunately, led to bugs when I forget to bump that version and not the others for a release, but it works.

Terms of Service

Privacy Policy

Cookie Policy