With the introduction of Swift PM support, we started referencing bundles using Bundle.main. This breaks integration for anyone building manually or wrapping in a Cocoapods Podspec.
This change adds Bundle utilities to each framework that will select the correct bundle to load resources from. It will check the runtime argument SWIFT_PACKAGE to determine if we are in a Swift Package and use Bundle.module if so. Otherwise, it will target the bundle by class.
With the introduction of Swift PM support, we started referencing bundles using Bundle.main. This breaks integration for anyone building manually or wrapping in a Cocoapods Podspec. This change adds Bundle utilities to each framework that will select the correct bundle to load resources from. It will check the runtime argument
SWIFT_PACKAGE
to determine if we are in a Swift Package and useBundle.module
if so. Otherwise, it will target the bundle by class.