-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use Bundle._module instead of Bundle(identifier:)
- Loading branch information
1 parent
0827cfe
commit 611953d
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright © 2022 Delivery Hero. All rights reserved. | ||
|
||
import Foundation | ||
|
||
final class BundleToken {} | ||
|
||
extension Foundation.Bundle { | ||
// NOTE: Can not use the `Bundle.module` right now because the b2c | ||
// still using ParallaxPagerView as a Carthage dependency, so we have to | ||
// support 2 kinds of source dependencies managements. Pls, switch | ||
// to `Bundle.module` when we already removed the Carthage in b2c. | ||
|
||
// swiftlint:disable:next variable_name | ||
static var _module: Bundle = { | ||
#if SWIFT_PACKAGE | ||
return Bundle.module | ||
#else | ||
return Bundle(for: BundleToken.self) | ||
#endif | ||
}() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters