在 Xcode / iOs 中为 WKWebView 的 url 添加动态参数

问题描述 投票:0回答:0

我有一个在 bubble.io 上构建并用 PWAbuilder 包装的单页 PWA。

在 AppDelegate 中,我有这段代码可以获取动态值“userId”

    if let deviceState = OneSignal.getDeviceState() {
                // Get the OneSignal Push Player Id
                   let userId = deviceState.userId
                   print("OneSignal Push Player ID: ", userId ?? "called too early, not set yet")```

I now need to add a parameter to the url of my PWA inside WKWebView:
Key = playerid (static word)
Value = "userID" (dynamic value)

Can anyone advise on how to achieve that?
Thanks

I tried everything I found online and nothing worked
ios swift xcode url progressive-web-apps
© www.soinside.com 2019 - 2024. All rights reserved.