mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-08-09 00:17:59 +00:00
Fix iOS build error: CGRect type mismatch in WKWebView frame
This commit is contained in:
parent
480892d864
commit
61a559ad93
1 changed files with 3 additions and 2 deletions
|
|
@ -2,6 +2,7 @@ package com.nuvio.app.features.plugins.runtime.network
|
|||
|
||||
import co.touchlab.kermit.Logger
|
||||
import kotlinx.cinterop.ExperimentalForeignApi
|
||||
import kotlinx.cinterop.readValue
|
||||
import kotlinx.coroutines.CompletableDeferred
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.NonCancellable
|
||||
|
|
@ -56,7 +57,7 @@ internal object IosWebViewSolver : WebViewSolver {
|
|||
withContext(Dispatchers.Main) {
|
||||
val config = WKWebViewConfiguration()
|
||||
val webView = WKWebView(
|
||||
frame = platform.CoreGraphics.CGRectZero,
|
||||
frame = platform.CoreGraphics.CGRectZero.readValue(),
|
||||
configuration = config,
|
||||
)
|
||||
webView.customUserAgent = webViewUserAgent
|
||||
|
|
@ -99,7 +100,7 @@ internal object IosWebViewSolver : WebViewSolver {
|
|||
cachedUserAgent?.let { return it }
|
||||
return withContext(Dispatchers.Main) {
|
||||
val webView = WKWebView(
|
||||
frame = platform.CoreGraphics.CGRectZero,
|
||||
frame = platform.CoreGraphics.CGRectZero.readValue(),
|
||||
configuration = WKWebViewConfiguration(),
|
||||
)
|
||||
val deferred = CompletableDeferred<String>()
|
||||
|
|
|
|||
Loading…
Reference in a new issue