Hello,
I'm creating a pluggin fin javascript in an app called obsidian.
I'm using navigator.clipboard.read():
Everything work fine in MacOS for both text and images
on iOS it works for text but if the clipboard is an image the script just stop
Totally stuck, please help
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
My safari plugin login verification is based on cookies. I found that as long as the plugin is used for a period of time, refreshing the page and making another request will result in the loss of cookies. I want to know if there are any other ways besides changing the login verification method to bypass cookies?
As part of a university project, we need to be able to display a website on an Apple Watch and log in to a service. Is it possible to get access to the WebKit framework in a watchOS app? We also need to be able to execute JavaScripts in the browser so that the login process works.
I have an HTTP3 relay setup and I'm trying to get WKWebView traffic to use it. The relay has a self-signed certificate for TLS traffic.
When using URLSession to make a call, everything works as expected, but in WKWebView, it doesn't.
Here is how I setup my ProxyConfiguration
let options = NWProtocolTLS.Options()
// sample options to trust any certificate for testing
sec_protocol_options_set_verify_block(options.securityProtocolOptions, { (sec_protocol_metadata, sec_trust, sec_protocol_verify_complete) in
sec_protocol_verify_complete(true)
}, DispatchQueue.global())
let relayServer = ProxyConfiguration.RelayHop(http3RelayEndpoint: relayEndpoint, tlsOptions: options)
let relayConfig = ProxyConfiguration(relayHops: [relayServer])
I connect that to my webview by simply doing the following:
let configuration = WKWebViewConfiguration()
configuration.websiteDataStore = WKWebsiteDataStore.nonPersistent()
configuration.websiteDataStore.proxyConfigurations = [relayConfig]
let webView = WKWebView(frame: .zero, configuration: configuration)
The sec_protocol_options_set_verify_block is never called for the WKWebView (it is when I use URLSession)
I get the following error in XCode
[pageProxyID=7, webPageID=8, PID=73105] WebPageProxy::didFailProvisionalLoadForFrame: frameID=1, isMainFrame=1, domain=NSURLErrorDomain, code=-1202, isMainFrame=1, willInternallyHandleFailure=0
Is there some API I am missing to get the webview to do custom TLS validation with an HTTP3 relay?
I have registered and created passkey with credentials.create function in apple device with software 17.4.1 in Safari browser. When I clean the cache in safari and try to log in, it force me to register again and after that I had two passkeys on my device. It should be like this ? Why Safari is related to Passkeys ?
hi.
I've come across a UI-related bug. It's not a critical issue, but I'm curious whether it's actually a bug or an intended result.
Enable "Dark Mode" on your device.
Set Safari to "single tab" mode in the settings.
Open the iOS browser.
Switch to "Private Browsing" mode.
When swiping up, the background of the top toolbar (including the status bar) becomes translucent, revealing the content behind it.
When I turn on the 'Reduce Transparency' setting, the issue does not occur, and the background content remains hidden as expected.
iPhone12 mini / iOS 17.0.1
thx!
If I set an input text box connected to a datalist-options, in order to suggest pre-coded values, this is what happens:
The text field shows properly.
When I start typing, one or more coincident "options" from the datalist are shown at the bottom of the available screen.
When one option is selected, the data contained in it is NOT transcript to the input field.
The same webtest works fine on Ipad mini w/ios 15.
Try this simple code, it doesn't work:
<label for="browser">Choose your browser from the list:</label>
<input list="browsers" name="browser" id="browser">
<datalist id="browsers">
<option value="Edge">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
Ever since 17.4.1 updates to Safari, we are unable to debug our web applications using Safari. Was working perfectly fine before.
Safari shows "No Inspectable Applications" in the Develop -> iPadName menu. We have 3 target iPads (Mini, Air and gen 10) and one iPhone 13 Pro Max, all on iPadOS and iOS 17.4.1, all of them show "No Inspectable Applications" in the menu. iPad Mini and iPhone were both visible fine before the 17.4.1 update. Other devices were already updated automagically to 17.4.1 so we couldn't check the before - after scenario. Safari running on iPad simulator with XCode 15.2 has same behaviour.
We tried debugging with latest version of following MacOS:
MacOS Sonoma (Macbook Pro M2)
MacOS Sonoma (Mac Mini M1)
MacOS Ventura (Macbook Pro i9)
All of those have same behaviour: "No Inspectable Applications".
We tried Safari Tech Preview and iPadOS 17.5 beta 2 and no change.
Are we missing something?
We’ve received a lot of user complains after the latest iOS 17.4 update.
Our Safari extension does not work as reliably as it used to be (sometimes it’s just not loaded, or very slowly).
Is this a known issue?
Are any workarounds available?
On iOS 17.5 the problem seems to be fixed, but I’m still wondering for a workaround because we dont know how long until 17.5 is released.
Hi!
I've got a problem with Safari (17.4.1) in Mac OS Sonoma (14.4.1). Safari logs me out in every website I log in: Google websites, Twitter, also all my Wordpress sites... It logs me out after a few minutes.
I try to clean safari, empty caches, cookies. I've got private relay disabled and in privacy settings I've *** all settings unchecked...
I am trying to migrate some of my mapkit code to the Map Server API. My JWT is fine and I can use that within the API Playground just fine. However, when I try to implement a test using PHP and cURL to get my Map token, I receive a 401 Not Authorized Error. My code is below:
<?php
$URL="https://maps-api.apple.com/v1/token";
$accesstoken = "<MY TOKEN HERE>";
$authorization = 'Authorization: Bearer'.$accesstoken;
$headers = [];
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_HTTPHEADER, [$authorization]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADERFUNCTION,
function($curl, $header) use (&$headers)
{
$len = strlen($header);
$header = explode(':', $header, 2);
if (count($header) < 2) // ignore invalid headers
return $len;
$headers[strtolower(trim($header[0]))][] = trim($header[1]);
return $len;
}
);
$result=curl_exec($ch);
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); //get status code
curl_close ($ch);
print_r($headers);
echo($result);
echo($status_code);
?>
Now the exact response that I am receiving is:
Array ( [date] => Array ( [0] => Thu, 18 Apr 2024 18:32:15 GMT ) [content-type] => Array ( [0] => application/json;charset=utf8 ) [content-length] => Array ( [0] => 51 ) [connection] => Array ( [0] => keep-alive ) [cache-control] => Array ( [0] => max-age=0 ) [x-rid] => Array ( [0] => c9507281-bc32-46ac-be3b-dc59e97e7fed ) [strict-transport-security] => Array ( [0] => max-age=31536000; includeSubDomains; ) )
{"error":{"message":"Not Authorized","details":[]}}
401
Any help getting this to work would be appreciated.
I would like to specify "Connection: close" for a request that I load in WKWebView - which actually CAN be done by setting the value on the request that is loaded (and it actually works). However, the documentation at https://developer.apple.com/documentation/foundation/nsurlrequest#1776617 states that it shouldn't be used because the URL loading system handles persistent connections for you.
So - my question is how can I indicate to the URL Loading System that I do NOT want to use persistent connections for this particular request? Or - am I safe to just set the header even though it's listed as reserved (because - as mentioned - it does work)?
I'm not sure if I just missed a recent breaking change, but we are having an issue with the camera in our single page app on iOS 17.4.1 in Safari. We can open the camera and display it to the user using getUserMedia. However, if the path of the site changes at all (for example, the user clicks a button to opens a sidepanel which results in the path in the browser changing) the camera goes black, even if the video element is still being displayed.
I can see in the browser that the camera has stopped, and the user has to re-enable it manually by tapping "Start Using Camera".
Any idea's what could be going on here?
M1 Air, Sonoma., Books.app. How to open an inspector? old method
defaults write com.apple.iBooksX WebKitDeveloperExtras -bool YES
doesn't work
On ios15, when loading a page, occasionally all resources under a domain name cannot be loaded.
the code like this:
<html><head>
<title>issue page</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
</style></head>
<body><div>
<script type="text/javascript" src="https://wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script type="text/javascript" src="https://wap.xxxx.com/static/webapp/common_res/3rd/jquery-3.6.2.min.js"></script>
<script type="text/javascript" src="https://statres.ok.com/quickapp/js/qa_router.min.js"></script>
<script type="text/javascript" src="https://wap.xxxx.com/static/webapp/common_res/js/utils.min.js"></script>
</div></html>
This is a simplified page code.
The problem is that the page cannot be loaded. Resources under wx.qq.com and statres.ok.com can be loaded, but all resources under wap.xxxx.com fail to be loaded. (Debugging via safari)
wkwebview did not call back to didFinishNavigation, and the page load progress was stuck at 0.5. And then it didn't go out of time. It just stayed there.
Here are some of the solutions I tried:
1、At first I thought it was a resource problem, but everything worked fine when I copied it to safari. In addition, most of the time in my page is fine, but once this problem occurs, the page will no longer load out until I restart the app.
2、thought is to cache problem, repetition, I added NSURLRequestReloadIgnoringLocalCacheData, also was not used.
3、 I captured the system logs through idevicesyslog and found no obvious anomalies in webkit.
4、When I used wireshark to find the problem, wap.xxxx.com did not even initiate dns requests, as if the browser ignored the resource.(Normally, I caught the dns request for this page)
Please help me divergent ideas, thank you!
At my work we are making a React App with Tailwind CSS. ever since the new update, safari has been going dark seemingly randomly across the interface.
Has anyone else experienced this or found out what may be causing safari to do this?
Cannot inspect iOS8 device within Safari 17
In one of the latest versions of Safari, my output broke. Safari no longer supports ANSI escape sequences?
Hello
Our app met issue after iOS 17.4 update.
Native view works properly with App language setting. But WKWebview's language is set with general OS setting's language.
In example,
When OS language is Korean and App language is English,
Native view is shown with English, but WKWebview is shown with Korean.
We found that navigator.language is Korean.
This problem has been occurring since iOS 17.4 version.
If anyone knows anything about this issue, could you please share?
How can I download safari-technology-preview-171? This would be the one compatible with machines running MacOS Monterey. If anyone has the dmg for this release it would be greatly appreciated.