Add better support for SwiftPM through the new Bundled protocol.
#110
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Better support for Swift Package Manager through a new
Bundledprotocol.1. For Cocoapod frameworks or main app bundles.
Declare your
Reusablebased classes to conform toBundledSelf. This provides a default implementation that uses the bundle associated with the class (Bundle(for: self)). In previous versions of the framework this was the default.2. For Swift Package Manager bundles.
Declare your
Reusablebased classes to conform toBundledModule. This provides a default implementation that uses the bundle associated with a Swift Package Manager Bundle (Bundle.module).In order for the resource to be loaded from the bundle of your package, you will also need to add the following extension somewhere in your package framework...
3. For other uses.
Provide you own implementation of the
static var bundle: Bundleproperty directly in yourReusablebased class.