-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from reown-com/develop
1.0.2
- Loading branch information
Showing
11 changed files
with
264 additions
and
238 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 |
---|---|---|
@@ -1,38 +1,9 @@ | ||
import class Foundation.Bundle | ||
|
||
private class BundleFinder {} | ||
import Foundation | ||
|
||
extension Foundation.Bundle { | ||
/// Returns the resource bundle associated with the current Swift module. | ||
static var resourceBundle: Bundle = { | ||
let bundleName = "reown_WalletConnectRelay" | ||
|
||
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: BundleFinder.self).resourceURL, | ||
|
||
// For command-line tools. | ||
Bundle.main.bundleURL, | ||
|
||
// One of these should be used when building SwiftUI Previews | ||
Bundle(for: BundleFinder.self).resourceURL? | ||
.deletingLastPathComponent() | ||
.deletingLastPathComponent() | ||
.deletingLastPathComponent(), | ||
Bundle(for: BundleFinder.self).resourceURL? | ||
.deletingLastPathComponent() | ||
.deletingLastPathComponent() | ||
] | ||
|
||
for candidate in candidates { | ||
let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle") | ||
if let bundle = bundlePath.flatMap(Bundle.init(url:)) { | ||
return bundle | ||
} | ||
} | ||
fatalError("unable to find bundle named WalletConnect_WalletConnectRelay") | ||
}() | ||
extension Bundle { | ||
// This will provide access to the resources for the WalletConnectRelay module | ||
static var resourceBundle: Bundle { | ||
return Bundle.module | ||
} | ||
} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"version": "1.0.1"} | ||
{"version": "1.0.2"} |
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
Oops, something went wrong.