-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cocoapods) handle assets for cocoapods from sources folder
- Loading branch information
1 parent
f616ca3
commit 6b31b2b
Showing
12 changed files
with
32 additions
and
6 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
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,25 @@ | ||
import Foundation | ||
|
||
public final class ApiVideoPlayerResources { | ||
public static let resourceBundle: Bundle = { | ||
let candidates = [ | ||
// Bundle should be present here when the package is linked into an App. | ||
Bundle.main.resourceURL, | ||
|
||
// Bundle should be present here when the package is linked into a framework. | ||
Bundle(for: ApiVideoPlayerResources.self).resourceURL, | ||
] | ||
|
||
let bundleName = "ApiVideoPlayer_ApiVideoPlayer" | ||
|
||
for candidate in candidates { | ||
let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle") | ||
if let bundle = bundlePath.flatMap(Bundle.init(url:)) { | ||
return bundle | ||
} | ||
} | ||
|
||
// Return whatever bundle this code is in as a last resort. | ||
return Bundle(for: ApiVideoPlayerResources.self) | ||
}() | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
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