uber / uber-ios-sdk

Uber iOS SDK (beta)
https://developer.uber.com/docs
MIT License
375 stars 125 forks source link

Adds Bundle utility #303

Closed mohssenfathi closed 2 months ago

mohssenfathi commented 2 months ago

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.