edge-core-js 2.41.2 → 2.41.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/ios/EdgeCoreModule.swift +16 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/ios/EdgeCoreModule.swift
CHANGED
|
@@ -7,9 +7,24 @@ class EdgeCoreModule: NSObject {
|
|
|
7
7
|
@objc static func requiresMainQueueSetup() -> Bool { return false }
|
|
8
8
|
|
|
9
9
|
@objc func constantsToExport() -> [AnyHashable: Any]! {
|
|
10
|
+
// Derive the app root URI using the same two-level Bundle lookup that
|
|
11
|
+
// plugin native modules use: find a .bundle resource, create a sub-Bundle,
|
|
12
|
+
// then call url(forResource:) on the sub-Bundle. This produces file:// URLs
|
|
13
|
+
// without /private, matching the plugin sourceUri values.
|
|
14
|
+
var rootBaseUri = Bundle.main.bundleURL.absoluteString
|
|
15
|
+
if let bundleUrl = Bundle.main.url(forResource: "edge-core-js", withExtension: "bundle"),
|
|
16
|
+
let bundle = Bundle(url: bundleUrl),
|
|
17
|
+
let coreUrl = bundle.url(forResource: "edge-core", withExtension: "js")
|
|
18
|
+
{
|
|
19
|
+
// Go up two levels: edge-core.js -> edge-core-js.bundle/ -> Edge.app/
|
|
20
|
+
rootBaseUri = coreUrl
|
|
21
|
+
.deletingLastPathComponent()
|
|
22
|
+
.deletingLastPathComponent()
|
|
23
|
+
.absoluteString
|
|
24
|
+
}
|
|
10
25
|
return [
|
|
11
26
|
"bundleBaseUri": BUNDLE_BASE_URI,
|
|
12
|
-
"rootBaseUri":
|
|
27
|
+
"rootBaseUri": rootBaseUri,
|
|
13
28
|
]
|
|
14
29
|
}
|
|
15
30
|
}
|