Build Information
Successful build of JSBridge, reference 1.0.0-alpha.16 (cb5846
), with Swift 6.1 for macOS (SPM) on 27 Apr 2025 05:47:46 UTC.
Swift 6 data race errors: 0
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/LinusU/JSBridge.git
Reference: 1.0.0-alpha.16
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/LinusU/JSBridge
* tag 1.0.0-alpha.16 -> FETCH_HEAD
HEAD is now at cb5846a Merge pull request #8 from LinusU/lu-fix
Cloned https://github.com/LinusU/JSBridge.git
Revision (git rev-parse @):
cb5846a525a31c79f7040fd9df024438883d8924
SUCCESS checkout https://github.com/LinusU/JSBridge.git at 1.0.0-alpha.16
Fetching https://github.com/mxcl/PromiseKit
[1/17186] Fetching promisekit
Fetched https://github.com/mxcl/PromiseKit from cache (1.54s)
Computing version for https://github.com/mxcl/PromiseKit
Computed https://github.com/mxcl/PromiseKit at 6.16.0 (2.19s)
Creating working copy for https://github.com/mxcl/PromiseKit
Working copy of https://github.com/mxcl/PromiseKit resolved at 6.16.0
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "jsbridge",
"name": "JSBridge",
"url": "https://github.com/LinusU/JSBridge.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/JSBridge",
"dependencies": [
{
"identity": "promisekit",
"name": "PromiseKit",
"url": "https://github.com/mxcl/PromiseKit",
"version": "6.22.1",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/PromiseKit",
"dependencies": [
]
}
]
}
]
}
Fetching https://github.com/LinusU/JSBridge.git
[1/252] Fetching jsbridge
Fetched https://github.com/LinusU/JSBridge.git from cache (0.66s)
Fetching https://github.com/mxcl/PromiseKit from cache
Fetched https://github.com/mxcl/PromiseKit from cache (0.56s)
Computing version for https://github.com/mxcl/PromiseKit
Computed https://github.com/mxcl/PromiseKit at 6.22.1 (0.63s)
Creating working copy for https://github.com/mxcl/PromiseKit
Working copy of https://github.com/mxcl/PromiseKit resolved at 6.22.1
Creating working copy for https://github.com/LinusU/JSBridge.git
Working copy of https://github.com/LinusU/JSBridge.git resolved at 1.0.0-alpha.16 (cb5846a)
warning: '.resolve-product-dependencies': dependency 'jsbridge' is not used by any target
Found 1 product dependencies
- PromiseKit
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/LinusU/JSBridge.git
https://github.com/LinusU/JSBridge.git
{
"dependencies" : [
{
"identity" : "promisekit",
"requirement" : {
"range" : [
{
"lower_bound" : "6.0.0",
"upper_bound" : "7.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/mxcl/PromiseKit"
}
],
"manifest_display_name" : "JSBridge",
"name" : "JSBridge",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "JSBridge",
"targets" : [
"JSBridge"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "JSBridgeTests",
"module_type" : "SwiftTarget",
"name" : "JSBridgeTests",
"path" : "Tests",
"sources" : [
"JSBridgeTests.swift"
],
"target_dependencies" : [
"JSBridge"
],
"type" : "test"
},
{
"c99name" : "JSBridge",
"module_type" : "SwiftTarget",
"name" : "JSBridge",
"path" : "Sources",
"product_dependencies" : [
"PromiseKit"
],
"product_memberships" : [
"JSBridge"
],
"sources" : [
"Context.swift",
"JSBridge.swift"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/3] Write sources
[2/3] Write swift-version-2F0A5646E1D333AE.txt
[4/18] Compiling PromiseKit Resolver.swift
[5/18] Compiling PromiseKit Thenable.swift
[6/19] Compiling PromiseKit firstly.swift
[7/19] Compiling PromiseKit after.swift
[8/19] Compiling PromiseKit hang.swift
[9/19] Compiling PromiseKit race.swift
[10/19] Compiling PromiseKit LogEvent.swift
[11/19] Compiling PromiseKit Promise.swift
[12/19] Compiling PromiseKit Configuration.swift
[13/19] Compiling PromiseKit CustomStringConvertible.swift
[14/19] Compiling PromiseKit Error.swift
[15/19] Compiling PromiseKit Guarantee.swift
[16/19] Compiling PromiseKit Box.swift
[17/19] Compiling PromiseKit Catchable.swift
[18/19] Emitting module PromiseKit
[19/19] Compiling PromiseKit when.swift
[20/22] Compiling JSBridge JSBridge.swift
/Users/admin/builder/spi-builder-workspace/Sources/JSBridge.swift:45:24: warning: call to main actor-isolated initializer 'init(libraryCode:customOrigin:incognito:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
43 |
44 | public init(libraryCode: String, customOrigin: URL? = nil, headless: Bool = true, incognito: Bool = false) {
45 | self.context = Context(libraryCode: libraryCode, customOrigin: customOrigin, incognito: incognito)
| `- warning: call to main actor-isolated initializer 'init(libraryCode:customOrigin:incognito:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
46 | self.headless = headless
47 | self.webView = headless ? nil : self.context.webView
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:154:5: note: calls to initializer 'init(libraryCode:customOrigin:incognito:)' from outside of its actor context are implicitly asynchronous
152 | internal let webView: WKWebView
153 |
154 | init(libraryCode: String, customOrigin: URL?, incognito: Bool) {
| |- note: calls to initializer 'init(libraryCode:customOrigin:incognito:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'WKScriptMessageHandler'
155 | webView = WKWebView.init(frame: .zero, configuration: buildWebViewConfig(libraryCode: libraryCode, incognito: incognito))
156 |
/Users/admin/builder/spi-builder-workspace/Sources/JSBridge.swift:72:21: warning: call to main actor-isolated instance method 'rawCall(function:args:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
70 | internal func call(function: String, withStringifiedArgs args: String) -> Promise<Void> {
71 | return firstly {
72 | context.rawCall(function: function, args: args)
| `- warning: call to main actor-isolated instance method 'rawCall(function:args:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
73 | }.then { _ in
74 | Promise.value(()) as Promise<Void>
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:222:19: note: calls to instance method 'rawCall(function:args:)' from outside of its actor context are implicitly asynchronous
220 | }
221 |
222 | internal func rawCall(function: String, args: String) -> Promise<String> {
| |- note: calls to instance method 'rawCall(function:args:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'WKScriptMessageHandler'
223 | return Promise<String> { seal in
224 | let id = self.nextIdentifier
/Users/admin/builder/spi-builder-workspace/Sources/JSBridge.swift:80:21: warning: call to main actor-isolated instance method 'rawCall(function:args:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
78 | internal func call<Result: Decodable>(function: String, withStringifiedArgs args: String) -> Promise<Result> {
79 | return firstly {
80 | context.rawCall(function: function, args: args)
| `- warning: call to main actor-isolated instance method 'rawCall(function:args:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
81 | }.map { stringified in
82 | try self.decode(stringified)
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:222:19: note: calls to instance method 'rawCall(function:args:)' from outside of its actor context are implicitly asynchronous
220 | }
221 |
222 | internal func rawCall(function: String, args: String) -> Promise<String> {
| |- note: calls to instance method 'rawCall(function:args:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'WKScriptMessageHandler'
223 | return Promise<String> { seal in
224 | let id = self.nextIdentifier
/Users/admin/builder/spi-builder-workspace/Sources/JSBridge.swift:159:22: warning: call to main actor-isolated instance method 'register(namespace:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
156 | }
157 |
158 | private func rawRegister(namespace: String) {
| `- note: add '@MainActor' to make instance method 'rawRegister(namespace:)' part of global actor 'MainActor'
159 | self.context.register(namespace: namespace)
| `- warning: call to main actor-isolated instance method 'register(namespace:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
160 | }
161 |
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:234:19: note: calls to instance method 'register(namespace:)' from outside of its actor context are implicitly asynchronous
232 | }
233 |
234 | internal func register(namespace: String) {
| |- note: calls to instance method 'register(namespace:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'WKScriptMessageHandler'
235 | self.evaluateJavaScript("window.\(namespace) = {}")
236 | }
/Users/admin/builder/spi-builder-workspace/Sources/JSBridge.swift:163:22: warning: call to main actor-isolated instance method 'register(functionNamed:_:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
160 | }
161 |
162 | private func rawRegister(functionNamed name: String, _ fn: @escaping ([String]) throws -> Promise<String>) {
| `- note: add '@MainActor' to make instance method 'rawRegister(functionNamed:_:)' part of global actor 'MainActor'
163 | self.context.register(functionNamed: name, fn)
| `- warning: call to main actor-isolated instance method 'register(functionNamed:_:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
164 | }
165 |
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:238:19: note: calls to instance method 'register(functionNamed:_:)' from outside of its actor context are implicitly asynchronous
236 | }
237 |
238 | internal func register(functionNamed name: String, _ fn: @escaping ([String]) throws -> Promise<String>) {
| |- note: calls to instance method 'register(functionNamed:_:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'WKScriptMessageHandler'
239 | self.functions[name] = fn
240 | self.evaluateJavaScript("window.\(name) = (...args) => __JSBridge__send__('\(name)', ...args)")
/Users/admin/builder/spi-builder-workspace/Sources/JSBridge.swift:163:22: warning: sending 'fn' risks causing data races; this is an error in the Swift 6 language mode
161 |
162 | private func rawRegister(functionNamed name: String, _ fn: @escaping ([String]) throws -> Promise<String>) {
163 | self.context.register(functionNamed: name, fn)
| |- warning: sending 'fn' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated 'fn' to main actor-isolated instance method 'register(functionNamed:_:)' risks causing data races between main actor-isolated and task-isolated uses
164 | }
165 |
[21/22] Emitting module JSBridge
[22/22] Compiling JSBridge Context.swift
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:125:18: warning: call to main actor-isolated initializer 'init(source:injectionTime:forMainFrameOnly:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
| `- warning: call to main actor-isolated initializer 'init(source:injectionTime:forMainFrameOnly:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
126 | let controller = WKUserContentController()
127 | let configuration = WKWebViewConfiguration()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKUserScript.h:64:1: note: calls to initializer 'init(source:injectionTime:forMainFrameOnly:)' from outside of its actor context are implicitly asynchronous
62 | @discussion Calling this method is the same as calling `initWithSource:injectionTime:forMainFrameOnly:inContentWorld:` with a `contentWorld` value of `WKContentWorld.pageWorld`
63 | */
64 | - (instancetype)initWithSource:(NSString *)source injectionTime:(WKUserScriptInjectionTime)injectionTime forMainFrameOnly:(BOOL)forMainFrameOnly;
| `- note: calls to initializer 'init(source:injectionTime:forMainFrameOnly:)' from outside of its actor context are implicitly asynchronous
65 |
66 | /*! @abstract Returns an initialized user script that can be added to a @link WKUserContentController @/link.
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:126:22: warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
126 | let controller = WKUserContentController()
| `- warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
127 | let configuration = WKWebViewConfiguration()
128 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/objc/NSObject.h:66:1: note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
64 |
65 | + (void)initialize;
66 | - (instancetype)init
| `- note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
67 | #if NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER
68 | NS_DESIGNATED_INITIALIZER
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:127:25: warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
126 | let controller = WKUserContentController()
127 | let configuration = WKWebViewConfiguration()
| `- warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
128 |
129 | controller.addUserScript(script)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/usr/include/objc/NSObject.h:66:1: note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
64 |
65 | + (void)initialize;
66 | - (instancetype)init
| `- note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
67 | #if NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER
68 | NS_DESIGNATED_INITIALIZER
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:129:16: warning: call to main actor-isolated instance method 'addUserScript' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
:
127 | let configuration = WKWebViewConfiguration()
128 |
129 | controller.addUserScript(script)
| `- warning: call to main actor-isolated instance method 'addUserScript' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
130 | configuration.userContentController = controller
131 |
WebKit.WKUserContentController.addUserScript:2:22: note: calls to instance method 'addUserScript' from outside of its actor context are implicitly asynchronous
1 | class WKUserContentController {
2 | @MainActor open func addUserScript(_ userScript: WKUserScript)}
| `- note: calls to instance method 'addUserScript' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:130:19: warning: main actor-isolated property 'userContentController' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
:
128 |
129 | controller.addUserScript(script)
130 | configuration.userContentController = controller
| `- warning: main actor-isolated property 'userContentController' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
131 |
132 | configuration.setURLSchemeHandler(BridgeSchemeHandler(), forURLScheme: "bridge")
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:118:56: note: mutation of this property is only permitted within the actor
116 | /*! @abstract The user content controller to associate with the web view.
117 | */
118 | @property (nonatomic, strong) WKUserContentController *userContentController;
| `- note: mutation of this property is only permitted within the actor
119 |
120 | /*! @abstract The web extension controller to associate with the web view.
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:132:19: warning: call to main actor-isolated instance method 'setURLSchemeHandler(_:forURLScheme:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
:
130 | configuration.userContentController = controller
131 |
132 | configuration.setURLSchemeHandler(BridgeSchemeHandler(), forURLScheme: "bridge")
| `- warning: call to main actor-isolated instance method 'setURLSchemeHandler(_:forURLScheme:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
133 |
134 | if incognito {
WebKit.WKWebViewConfiguration.setURLSchemeHandler:3:24: note: calls to instance method 'setURLSchemeHandler(_:forURLScheme:)' from outside of its actor context are implicitly asynchronous
1 | class WKWebViewConfiguration {
2 | @available(macOS 10.13, *)
3 | @MainActor open func setURLSchemeHandler(_ urlSchemeHandler: (any WKURLSchemeHandler)?, forURLScheme urlScheme: String)}
| `- note: calls to instance method 'setURLSchemeHandler(_:forURLScheme:)' from outside of its actor context are implicitly asynchronous
4 |
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:132:39: warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
96 |
97 | @available(iOS 11.0, macOS 10.13, *)
98 | fileprivate class BridgeSchemeHandler: NSObject, WKURLSchemeHandler {
| |- note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'WKURLSchemeHandler'
99 | func webView(_ webView: WKWebView, start urlSchemeTask: WKURLSchemeTask) {
100 | let url = urlSchemeTask.request.url!
:
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
:
130 | configuration.userContentController = controller
131 |
132 | configuration.setURLSchemeHandler(BridgeSchemeHandler(), forURLScheme: "bridge")
| `- warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
133 |
134 | if incognito {
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:135:23: warning: main actor-isolated property 'websiteDataStore' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
:
133 |
134 | if incognito {
135 | configuration.websiteDataStore = .nonPersistent()
| `- warning: main actor-isolated property 'websiteDataStore' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
136 | }
137 |
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebViewConfiguration.h:126:51: note: mutation of this property is only permitted within the actor
124 | /*! @abstract The website data store to be used by the web view.
125 | */
126 | @property (nonatomic, strong) WKWebsiteDataStore *websiteDataStore API_AVAILABLE(macos(10.11), ios(9.0));
| `- note: mutation of this property is only permitted within the actor
127 |
128 | /*! @abstract A Boolean value indicating whether the web view suppresses
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:135:43: warning: call to main actor-isolated class method 'nonPersistent()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
121 |
122 | @available(iOS 11.0, macOS 10.13, *)
123 | fileprivate func buildWebViewConfig(libraryCode: String, incognito: Bool) -> WKWebViewConfiguration {
| `- note: add '@MainActor' to make global function 'buildWebViewConfig(libraryCode:incognito:)' part of global actor 'MainActor'
124 | let source = "\(internalLibrary);try{(function () {\(libraryCode)}());__JSBridge__ready__(true)} catch (err) {__JSBridge__ready__(false, err)}"
125 | let script = WKUserScript(source: source, injectionTime: .atDocumentStart, forMainFrameOnly: true)
:
133 |
134 | if incognito {
135 | configuration.websiteDataStore = .nonPersistent()
| `- warning: call to main actor-isolated class method 'nonPersistent()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
136 | }
137 |
WebKit.WKWebsiteDataStore.nonPersistent:2:28: note: calls to class method 'nonPersistent()' from outside of its actor context are implicitly asynchronous
1 | class WKWebsiteDataStore {
2 | @MainActor open class func nonPersistent() -> WKWebsiteDataStore}
| `- note: calls to class method 'nonPersistent()' from outside of its actor context are implicitly asynchronous
3 |
/Users/admin/builder/spi-builder-workspace/Sources/Context.swift:216:82: warning: passing non-sendable parameter 'completionHandler' to function expecting a @Sendable closure
210 | }
211 |
212 | private func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?, Error?) -> Void)? = nil) {
| `- note: parameter 'completionHandler' is implicitly non-sendable
213 | firstly {
214 | self.ready
215 | }.done {
216 | self.webView.evaluateJavaScript(javaScriptString, completionHandler: completionHandler)
| `- warning: passing non-sendable parameter 'completionHandler' to function expecting a @Sendable closure
217 | }.catch {
218 | completionHandler?(nil, $0)
Build complete! (8.58s)
Build complete.
{
"dependencies" : [
{
"identity" : "promisekit",
"requirement" : {
"range" : [
{
"lower_bound" : "6.0.0",
"upper_bound" : "7.0.0"
}
]
},
"type" : "sourceControl",
"url" : "https://github.com/mxcl/PromiseKit"
}
],
"manifest_display_name" : "JSBridge",
"name" : "JSBridge",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
],
"products" : [
{
"name" : "JSBridge",
"targets" : [
"JSBridge"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "JSBridgeTests",
"module_type" : "SwiftTarget",
"name" : "JSBridgeTests",
"path" : "Tests",
"sources" : [
"JSBridgeTests.swift"
],
"target_dependencies" : [
"JSBridge"
],
"type" : "test"
},
{
"c99name" : "JSBridge",
"module_type" : "SwiftTarget",
"name" : "JSBridge",
"path" : "Sources",
"product_dependencies" : [
"PromiseKit"
],
"product_memberships" : [
"JSBridge"
],
"sources" : [
"Context.swift",
"JSBridge.swift"
],
"type" : "library"
}
],
"tools_version" : "5.0"
}
Done.