I have simulators downloaded to my 14" M2 Pro Macbook Pro, and for some reason, I cannot see any simulators as an option in Safari's Responsive Design Mode.
Am I missing something obvious, or is my computer bugged?
Above is an image of the Responsive Design Mode showing no simulators. I would offer more screenshots to prove that I have simulators installed, but it won't let me upload any more photos for some reason.
General
RSS for tagExplore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.
Post
Replies
Boosts
Views
Activity
Can not select anything within WkWebView editor view of my MacCatalyst app when running on macOS 14 Sonoma.
Any selection gesture or command key fails to select anything in content editable WKWebView, so none of the Editor tools can be activated.
My application uses the nnhubbard / ZSSRichTextEditor WKWebView-based Rich Text Editor: https://github.com/nnhubbard/ZSSRichTextEditor. The app is built with Xcode 15.0 or 15.0.1.
The app is a Catalyst app that implements an editor view with a ZSSRichTextEditor WKWebView.
The problem does not occur if the the app is run in iOS or macOS 11, 12, or 13 (Catalina, Monterey, or Ventura.) The issue only occurs in macOS 14 Sonoma.
To reproduce this bug:
Create a simple Safari App Extension using the SFSafariWindow.getAllTabs method
Open a few tabs in Safari and save them to a named tab group
Quit Safari with Command + Q
Open Safari and navigate to the saved named tab group (do not navigate to other tabs, those non-active tabs will be suspended until we navigate to them)
Trigger the SFSafariWindow.getAllTabs method in our Safari App Extension
Ideally we should get all tabs in the tab group of the window, but instead we only get the active tab
Did I miss anything to make it work as expected?
If I store a wep page as WebApp on MacOS, as described here:
https://support.apple.com/de-de/104996
I cant use any Safari plugins in that WebApp
How to use plugins? is it blocked by MacOS/Safari generally? Does the Safari Plugin/Extension need to support this explicitly?
When the web is running on iPhone, localStorage is first set, but there may be occasional loss during retrieval. Because it is a native API of JS, the app cannot monitor it. How to configure wkwebview for consultation?
The WKWebView in my application runs flawlessly and executes all the JavaScript of the websites visited.
However, if I call up a very simple web page that contains nothing more than a text and a reference to the external JavaScript file "https://code.jquery.com/jquery-3.7.1.min.js", which is nothing unusual, then the WKWebView freezes and no longer responds.
The NSAllowArbitaryLoads in Info.plist is set to true.
I have checked all configarations and all callbacks of WKNavigationDelegate, but found no way to allow or disallow the external JavaScript.
If in my test the JavaScript is loaded from the same server, it works.
This is just a test to reproduce the error. I cannot influence the website that I actually want to display in WKWebView.
I want to develop the application where I can able to capture and send the touch events like TAP,Press,Swipe etc from iphone
to browser(Client) for remote support .can anyone suggest any method or API to capture Touch Events and the method to send on browser.
Is there any document or link is available or support for the same
I'm developing a PWA for mobile Safari. Here is a video of the problem that I have: https://share.icloud.com/photos/068xNZvHZqAQI83EP5FHJj8ag
I open the app. It's like a Hacker News or Reddit clone so users always navigate away to external links.
The external link gets opened in this overlay, which I really like, that's great
However, when I press "done", you can see how the page somehow re-evaluates the JavaScript. E.g. the "voting errors" start pulsating which means that the page re-fetches some data from the server, which IMO isn't strictly necessary as the page was fine without that
I noticed that this isn't happening if I e.g. have the page open in a tab on regular Safari. When I then navigate to the tab, it doesn't reload JUST the JavaScript
What I also find weird about this is that it seems to only reload the JavaScript, not the entire page.
My site is at https://news.kiwistand.com/ so you can test this for yourself. The source code of the frontend is here https://github.com/attestate/kiwistand/tree/main/src/web and here's the PWA manifest https://github.com/attestate/kiwistand/blob/main/src/public/pwa.json
My question: Is there a way I can stop Safari from "reloading" the JavaScript when navigating back from an external link?
Hello Sirs,
I've developed http/2 server, tested with nghttpx, Edge, Mozilla, Chrome web browsers, all seems to be fine.
As I navigate to an url under my http/2 server with Safari browser (ver 17.^) on MacBook 2023, the server is catching WINDOW_UPDATE frame for stream id 0, but unfortunately no WINDOW_UPDATE frames with specific stream Id are sent from Safari
http/2 specification tells, that this frame for stream id 0 isn't yet enough to be allowed to send DATA frames to browser. The concrete stream id is needed in WINDOW_UPDATE frame.
The INITIAL_WINDOW_SIZE setting of the SETTINGS frame from Safari is only 100 bytes. I just send the response SETTINGS frame with ACK flag set true, not trying to increase this setting's value.
Now the server just sends first DATA frames for each stream, and Safari fetches them, renders and shows in browser, however the streams' window sizes are exhausted. But I'm not risking pushing all DATA frames of larger files, so that other browsers then don't RST these streams.
Any infos for me please about specific Safari http/2 frames flow?
Hi - Any suggestions on how I add my website into my Xcode App Build, using Xcode 13.4?
Hi,
I'm trying to convert a chrome extension to a safari extension and I have some unsupported permissions that don't work in safari. They are
chrome.enterprise.networkingAttributes
and
chrome.enterprise.deviceAttributes
Is there a way to get the ip address of the device in a Safari extension. The page we use this in is written in typescript.
Thank you
Hello everyone, i want to set transparent status bar (where wifi and time), in my pwa app, writing on html, using manifest.manifest and sw.js, i make:
and this not work, i am want but this work on ios 15-17.xx, who know, how do setup this variable?
On my MacBook Air, when using the trackpad to zoom in on a Safari screen containing a textarea with a two-finger gesture, there is occasional flickering of the textarea border when typing.
macbook air Model:MacBook Air 2022 M2
iOS version:14.0(23A344)
Safari version:17.0(19616.1.27.211.1)
Hi! I'm having this crash on the app, it only happens in production and I haven't been able to reproduce it. I attacedh the full crash report and here is the code for the decidePolicyForNavigationAction action:
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
guard let url = navigationAction.request.url else {
decisionHandler(.allow)
return
}
var policy: WKNavigationActionPolicy = .allow
if (["tel", "sms", "facetime"].contains(url.scheme)
|| navigationAction.navigationType == .linkActivated
&& initialUrl.host != url.host)
&& UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url)
policy = .cancel
}
decisionHandler(policy)
}
Can someone help me find out what could be then cause for this isse?
CrashReport
Hi, after the upgrade to Safari 17 the Mouse Over text, is not popping up any more.
At least not in graphics.
When inspecting the Element, the <g cursor="pointer" aria=label='text..' is there, but it is not doing anything.
How to activate this again?
Thanks
Currently I am using Objective-C and embedding a React website into the WKWebview. I have a component with scroll function and I also have some text description with an input component in the scroll function component. If the input component is shown all and I onClick the input component for inputting value in it, it works normally. However, when the input component shows only half of it and another half is hidden by the scroll component (Because it scrolls to see only half of the input component), it will triggers an unexpected issue that the WKWebview will have a white bar on the bottom and it will keep exists and affecting my UI. I have checked with web inspector that it is outside of the tag. Therefore, seems it is related to the issue with the external keyboard behaviour.
Please provide some suggestion if anyone have any idea on this topic. Thanks a lot
Is there a way to pass/read cookies from SFSafariViewController to my application?
My team is attempting to use an an add-in for Outlook for Mac that stores a Microsoft account access credentials in safari, so that it can refresh the credentials in the background and not force users to manually re-login every time the credentials expire. The update to safari that prevents local storage has prevented this from working correctly. It appears that the local storage prevention policy can be disabled with this command:
'defaults write com.apple.Safari BlockStoragePolicy -bool false'
This initially seemed to work but no long seems to be allowing the credentials to be stored. I was unable to find any documentation as to what exactly this command does. I wanted to see if anyone knew exactly what this command does and if there is a variation or alternative command that would make local storage in safari allowed again.
Description
I've seen this issue when I use WKWebView in SwiftUI. If I have 2 web views at once in a SwiftUI view, it produces unwanted console warnings that seem to be not solvable on client side.
The warnings aren't present when there is only 1 web view.
Similar warnings regarding the "running board" or RBSAssertionErrorDomain are reported by others as well.
Please advice how to dismiss these warnings in the app. Thank you.
Repro Steps and Code
Create a new iOS project.
Put the following code into ContentView.swift. It wraps a WKWebView in SwiftUI and display some dummy html data in the web views.
Build and run the app.
Tap the info button.
Drag down or dismiss the sheet. Upon dismiss, in the console it prints the error messages attached below.
import SwiftUI
import WebKit
struct ContentView: View {
@State private var isInfoViewPresented = false
@State private var selectedIndex = 0
func makeErrorHTML(index: Int) -> String {
#"<!doctype html><html><h1 style="text-align: center;">Unable to display README.</h1></html>"#
}
var body: some View {
VStack(spacing: 8) {
Text("Hello, world!")
Button {
isInfoViewPresented = true
} label: {
Image(systemName: "info.circle")
.imageScale(.large)
}
.sheet(isPresented: $isInfoViewPresented) {
sheetContent
}
}
}
var sheetContent: some View {
NavigationStack {
ZStack {
WebView(htmlString: makeErrorHTML(index: 0))
.background(Color(uiColor: .systemGray))
.opacity(selectedIndex == 0 ? 1 : 0)
WebView(htmlString: makeErrorHTML(index: 1))
.background(Color(uiColor: .systemGray2))
.opacity(selectedIndex == 1 ? 1 : 0)
}
.toolbar {
ToolbarItem(placement: .principal) {
Picker("Information Mode", selection: $selectedIndex) {
Text("0").tag(0)
Text("1").tag(1)
}
.pickerStyle(.segmented)
}
ToolbarItem(placement: .confirmationAction) {
Button("Done") {
isInfoViewPresented = false
}
}
}
}
}
}
struct WebView: UIViewRepresentable {
/// The HTML to load in the web view.
let htmlString: String
func makeUIView(context: Context) -> WKWebView {
// Creates an empty web view.
let webView = WKWebView(frame: .zero)
// Sets the web view's navigation delegate.
webView.navigationDelegate = context.coordinator
return webView
}
func updateUIView(_ webView: WKWebView, context: Context) {
// Loads the given HTML string.
webView.loadHTMLString(htmlString, baseURL: nil)
}
func makeCoordinator() -> Coordinator {
Coordinator()
}
class Coordinator: NSObject, WKNavigationDelegate {
func webView(
_ webView: WKWebView,
decidePolicyFor navigationAction: WKNavigationAction,
decisionHandler: @escaping (WKNavigationActionPolicy) -> Void
) {
switch navigationAction.navigationType {
case .linkActivated:
if let url = navigationAction.request.url, UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url)
}
decisionHandler(.cancel)
default:
decisionHandler(.allow)
}
}
}
}
OS Version
iOS 15 - iOS 17 Simulator and Device
Xcode Version 15.0.1 (15A507)
macOS 14.1.1 (23B81)
Similar Posts
@eskimo shared information about runningboard in this post: https://developer.apple.com/forums/thread/702207
https://developer.apple.com/forums/thread/709919
https://stackoverflow.com/questions/69902932/error-acquiring-assertions-what-is-that
https://developer.apple.com/forums/thread/708801
Error From Console
Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
0x11e024780 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'XPCConnectionTerminationWatchdog' for process with PID=85,796, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
0x11e0247e0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess NearSuspended Assertion' for process with PID=85,796, error: Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}
Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>
0x11e0248a0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'WebProcess NearSuspended Assertion' for process with PID=85,797, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}
Problem Description:
In the current scenario, I am dealing with a website platform that lacks traditional APIs for service access. To circumvent this limitation, the mobile application necessitates hosting a "web server" locally on "ws://127.0.0.1:****". The idea is that the website, loaded in a WKWebView, should establish a WebSocket connection with the locally hosted server. The responsibility for creating this WebSocket lies with the loaded website.
I am utilizing "Telegraph" to set up the local server within the iOS application. To verify the functionality of the local Webserver, I attempted to establish a WebSocket connection to it outside of the WKWebView, and the connection was successfully established.
Question:
Despite the success of the direct WebSocket connection outside of WKWebView, I am encountering difficulties when attempting to establish the same connection within the WKWebView. Is this approach even feasible? If it is, could you kindly point out any potential oversights or provide guidance on what might be missing in my implementation? Your assistance in resolving this matter is greatly appreciated.