Explore the integration of web technologies within your app. Discuss building web-based apps, leveraging Safari functionalities, and integrating with web services.

General Documentation

Post

Replies

Boosts

Views

Activity

Lazy Loading Causes Some Images to Disappear Intermittently on iOS Devices
Hey everyone, Back in 2022 and 2023, we noticed that some images on our web pages would disappear randomly. After refreshing, some of the images that were missing would appear, but then another image would go missing. Did anyone else experience this issue? Is there a fix / workaround I can use? This only seems to be an issue on iOS devices and images that have the loading=“lazy” attribute.
1
0
286
Aug ’24
Safari renders html elements in wrong position
Check the attached screenshot, web inspector shows the right element size and position, but Safari renders it in a wrong place. The element reacts on mouse events also correctly - according to its real position. Here you can find the live example https://3dflipbook.net/css-layer-highlight This is a regression issue, it was working fine in 15.6. Bug tracker: https://bugs.webkit.org/show_bug.cgi?id=278898 Please fix the issue.
1
0
215
Aug ’24
Cookies problem in iOS beta 18
I have a hybrid mobile app which loads web server screens in its iframe(which is under the WKWebView); an https request is initiated from the mobile app to the web server which returns the html page to be loaded in the iframe. The calls which are initiated from outside the iframe have cookies maintained in their requests, while the ones initiated from inside the iframe(web server page) loose the cookies and do not inherit them in IOS beta 18 while It worked fine in the previous IOS versions. Anybody has infos about this or similar cases?
5
2
543
Aug ’24
Enforce Safari Extension state using device management
Hey, Im trying to utilize the new DDM features introduce in Safari 18 & macOS 15 and enabling extension using my MDM (Intune in my case). For some reason, it doesn't seems to work on my mac machine running macOS 15 beta. Intune support claims that everything is configured as it should on their end, and there is a problem with device or configuration. I used Apple documentation and the configuration YAML in apple device management repo So I don't really sure what I am missing. Has someone managed to make it work using MDM (intune, jamf, etc')? And if so can he shared the configuration? Thanks.
2
0
434
Aug ’24
Apple Pay button not appearing
On an older iPhone I'm testing with (6s, iOS 12.5.7), connected to the same Sandbox Apple ID that I'm using on multiple other devices, the Apple Pay button is not appearing. Neither on my web application, whatever version I set in the PaymentRequest, nor on the official demo site. Further, 2 sandbox cards that were added fine to these other devices are failing to add on this one. Same cards and CVV codes are getting errors. At least "Invalid Card" on one of them. Although the other failed several times, then just worked this time when I tried it again :confused: But on this phone, I have two cards successfully added, so the button should be appearing. On the demo site, whether I select Apple Pay JS API or Payment Request API, the button does not appear.
1
0
404
Aug ’24
Issue in the payment processing after the merchant validation
session.onvalidatemerchant = function(event) { const validationURL = event.validationURL; console.log("Validation URL:", validationURL); document.getElementById('methodapplepay').value = "validate"; document.getElementById('validationURL').value = validationURL; $.ajax({ url: 'ajax/processInternalDonate.php', type: 'POST', data: $("#payment_form").serialize(), success: function(dataValidate) { dataValidate = JSON.parse(dataValidate); session.completeMerchantValidation(dataValidate); }, error: function(xhr, status, error) { console.error('Merchant validation failed:', error); session.abort(); } }); }; session.onpaymentauthorized = function(event) { var payment = event.payment; $.ajax({ url: 'ajax/processInternalDonate.php', type: 'POST', data: {pay_mode:"pay_mode",method:"process_payment",payment:JSON.stringify(payment)}, success: function(dataprocess) { if (dataprocess.success) { session.completePayment(ApplePaySession.STATUS_SUCCESS); } else { session.completePayment(ApplePaySession.STATUS_FAILURE); } }, error: function(xhr, status, error) { console.error('Payment processing failed:', error); session.completePayment(ApplePaySession.STATUS_FAILURE); } }); }; from this above two session methods for the first method I got the merchant validation response from the API calling from that method but for the session.onpaymentauthorized when the second API is calling then I got the message payment not processed on my apple pay popup upon autorisation from my phone so I want that you provide me the correct backend flow for this API calling so we get the amount charged and I also got the payment object from event.object on logging in my console.
0
0
292
Aug ’24
Safari Extension load wasm file in popup wrong MIME type error
After loading Safari Web Extension, when making request from the popup to load wasm file it return with wrong MIME type, which makes the WebAssembly compileStreaming to reject the response from fetch. Summary URL: safari-web-extension://ECF91D91-37F4-499D-8D7E-6AA029A2DBED/canvaskit/canvaskit.wasm Status: 200 Source: — Initiator: flutter_bootstrap.js:10:505 Request Accept: / Referer: safari-web-extension://ECF91D91-37F4-499D-8D7E-6AA029A2DBED/index.html User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15 Response Access-Control-Allow-Origin: * Content-Length: 6751354 Content-Security-Policy: script-src 'self' 'wasm-unsafe-eval'; object-src 'self'; Content-Type: application/octet-stream In the response the inner server that returns files for safari-web-extension should return application/wasm
2
0
314
Aug ’24
Issues with Displaying Language Tags Compliant with RFC 5646
Hello, I'm currently facing some issues with localization for the Safari extension on iOS: Issues with Language Tags: Folder names like pt-BR (Brazilian Portuguese) and pt-PT (European Portuguese) placed in the Resources/_locales/ directory are not displaying the respective languages correctly; instead, the default English is shown. Similarly, using folder names like zh-CN (Simplified Chinese) and zh-TW (Traditional Chinese) also results in default English display instead of the intended Chinese language. Conversely, when changing the folder names to pt (Portuguese general) and zh (Chinese general), the languages display correctly. Could you please provide any recommendations or tips regarding language tag settings and how to ensure they are properly recognized according to RFC 5646? Thanks for your help! Best,
3
0
420
Aug ’24
Issue with Authentication Sharing Between Native App and WebView
I’m working on an iOS app using WKWebView, and I’ve implemented the following authentication flow: Sign-In Process: The sign-in process is handled natively. Access Token Storage: Once the user is signed in, the access token is stored within the app. WebView Cookie Setting: When a webview is opened, the app sets the access token in the webview’s cookies. Token Validation: The web server validates the access token from the cookie. Problem: I’m encountering an issue where the authentication state between the native app and the webview doesn’t always synchronize correctly. Specifically: Sign-In Issue: If a user signs in while the webview is already open, the native app attempts to set the cookie in the webview. However, there are cases where the cookie isn’t set properly, and the server fails to retrieve the access token, similar to when a user is signed out. Sign-Out Issue: When a user signs out, the native app deletes the cookie. Although the app reports success in deleting the cookie, the webview sometimes still retains the cookie, which can cause inconsistencies. These issues don’t happen consistently, and the behavior seems to be somewhat random. My Questions: Is there a problem with how I’m sharing authentication between the native app and the webview? Do you have any suggestions or best practices for ensuring that the cookie management between the native app and WKWebView is reliable? Thank you in advance for your help! I believe that the native app should manage the cookies for the WKWebView. However, I’m encountering issues where the cookies are not always synchronized properly between the native app and the webview.
0
0
243
Aug ’24
SFSafariViewController lifecycle delegate
Hello, Is it possible to use a delegate or other approach to detect lifecycle events like form submissions / navigation events from the SFSafariViewController from the application that creates the Safari instance? The use case is a centralised session keep-alive requirement to extend the ttl on tokens for multiple third-party clients that use Single-Sign-On via browser cookies for authentication.
1
0
164
Aug ’24
Mobile IOS v17.5 crashes when opening specific pdf
I have a few pdfs that contains images/grayscale images that opened properly on my app with IOS 16.5 but since upgrading to 17.5, the app crashes with “A problem has repeatedly occured on...” this means the IOS itself is not able to handle the pdf otherwise we would get an error from our app. Previously, while we got a warning in the console saying that the max canvas has been exceeded. The app did not crash. Would it be possible to know what was the changes coming in version 17.0+ that could have caused this? And if so, should this be a bug that gets fixed? I’ve looked at the release note and can’t pinpoint which changes could have caused this new behaviour. This occurs on safari and chrome.
1
0
244
Aug ’24
Username & Password
I have a project where I have two text fields for a user to enter a username and password. When the user clicks the submit button, I want the text they enter to auto inject into a username/password field on a website to log them in. Any ideas how I can make this?
2
0
234
Aug ’24
Safari web extension content blocker takes time to reflect on simulator few devices
We have implemented a content blocker using the Safari Web Extension, which can be toggled on or off as needed. However, we've noticed that changes in the Safari browser take effect only after the page is reloaded again. This behaviour has been observed across all simulators as well as on iPhone 8 Plus running iOS 16.7.8. Is this due to a delay in the JS file rules updation on simulator and lower devices?
1
0
250
Aug ’24
safaridriver failing to launch
MacOS Sonoma 14.6.1 Safari 17.6 Have been trying to launch Safaridriver and consistently getting the error: ERROR: safaridriver could not launch because it is not configured correctly or you need to authenticate. Re-run safaridriver(1) and pass the '--enable' flag to configure and/or authenticate. I have admin rights on the machine, but when I try the flag --enable, I get 'Password is not valid, please try again' (tried with different admin accounts). Sudo lets me use the --enable flag, but still getting the same error when trying to run. This seems to be a recent problem - worked a couple of months ago.
1
1
241
Aug ’24
Getting an MPAN, merchant token or merchantTokenIdentifier
We are trying to retrieve merchant tokens from ApplePay. We used the javascript codes from Apple Pay demo site to request for a recurring payment from the frontend. "recurringPaymentRequest": { "paymentDescription": "A description of the recurring payment to display to the user in the payment sheet.", "regularBilling": { "label": "Recurring", "amount": "4.99", "paymentTiming": "recurring", "recurringPaymentStartDate": "2023-08-11T11:20:32.369Z" }, "trialBilling": { "label": "7 Day Trial", "amount": "0.00", "paymentTiming": "recurring", "recurringPaymentEndDate": "2023-08-11T11:20:32.369Z" }, "billingAgreement": "A localized billing agreement displayed to the user in the payment sheet prior to the payment authorization.", "managementURL": "https://applepaydemo.apple.com", "tokenNotificationURL": "https://applepaydemo.apple.com" } Payment was successful, but merchantTokenIdentifier is not shown in the in decrypted ApplePay token, regardless of test card used. We tried Visa and MasterCard.
0
0
234
Aug ’24
AASA File Not Working as Expected with Hybrid Mobile App and Web Authentication
Hello, We are currently offering both a mobile web and a mobile app service. Our mobile app operates in a hybrid manner by utilizing the mobile web. However, when the app is installed, it seems that the AASA file is not functioning correctly on the mobile web. The AASA file we are using is as follows: AASA : { "applinks": { "apps": [], "details": [ { "appID": "Z9VSKJ792A.com.coke.cokeplaynew", "components": [ { "exclude": true, "/": "/payment/" }, { "exclude": true, "/": "/member/pass/" }, { "exclude": true, "/": "/member/check/pass" }, { "exclude": true, "/": "/member/passWeb" }, { "exclude": true, "/event/spritecoolcoupon" } ] } ] } } We are experiencing an issue when performing pass authentication on the mobile web. When opening a new window for authentication, the new window is generated correctly in the mobile web browser. However, after completing the authentication and posting back to the parent window at the /member/check/pass URL, the app is being launched, which causes a service error. (This URL is excluded in the AASA file.) It doesn’t seem like there’s an issue with the AASA configuration, but we are wondering if there might be another underlying problem. Thank you for your assistance.
1
0
170
Aug ’24