Post

Replies

Boosts

Views

Activity

Can I open Safari Preference panel directly
Hi, I am developing a Safari Webextension, I would like to have some instructions on my app's splash screen. I put a button on the splash screen, when clicking it, my app will: open Safari. open Safari Preference panel. go to the "Extensions" tab in the preference panel I know #1's solution, but not sure how to achieve #2 and #3, Do you have any ideas? Thank you very much.
1
0
455
Nov ’21
Can apple gallery detect the safari version and choose the correct app to install
Hi everyone, I have a question for the apple store, for example we already have AppExtension as version 1.0.0 published on store, and we are going to migrate to WebExtension (following this doc) and publish as version 2.0.0. Could you help to confirm the following cases? If user is using Safari 14 and never installed 1.0.0, they will install WebExtension 2.0.0 if user is using Safari 14 and installed 1.0.0, after install 2.0.0, the AppExtension will update to WebExtension automatically if user is using Safari 13 and never installed 1.0.0, can they still install AppExtension 1.0.0? if user is using Safari 13 and installed 1.0.0, do they still get upgrade notification to upgrade to 2.0.0? And they can't upgrade successfully right? Thank you very much
0
0
734
Aug ’21
Two toolbar icons after updating to WebExtension
Hi everyone, I am testing my WebExtension upgrade, I followed this doc https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_safari_app_extension_to_a_safari_web_extension I have the previous App extension installed, but when I installed the new WebExtension app, I see two icons on the toolbar, one is not clickable. (screenshot here https://drive.google.com/file/d/1Sl-0a_-zWaI6wFunbVaXRlQnyocrjQwB/view) After I enable the WebExtension and restart Safari, there is only one toolbar icon and everything works fine. I would like to ask does anyone also have seen this issue? I am testing everything with self-signed apps, will this issue still occur when we publish the app on store? Thanks a lot
1
0
537
Aug ’21
WebExtension webRequest.onAuthRequired seems not working
Hi, I am trying the webRequest.onAuthRequired API on Safari WebExtension. From MDN document: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/onAuthRequired, Safari WebExtension doesn't support extraInfoSpec After inspecting the background, the webRequest.onAuthRequired callback is triggered, but in the callback I return the credentials directly chrome.webRequest.onAuthRequired.addListener( function(details) { return { authCredentials: { username: 'username', password: 'password' } } }, { urls: ['<all_urls>'] } ); It still doesn't work, Any ideas to resolve this? Thanks a lot!
1
0
1.1k
Jun ’21
Migrate AppExt UserDefaults Data to WebExt
Hi, I am working on converting my Safari App Extension to Web Extension, I stored some data in App Extension by using swift UserDefaults(suiteName: "my-app-extension") Now, I am trying to copy all these data to Web Extension background page. To achieve that, I send a native message from background page, and in the SafariWebExtensionHandler.swift, I tried to use the UserDefaults with the same suiteName, but seems I can't get any data. Any solution or suggestions to this problem? Thank you!
3
0
786
May ’21
About migrating the AppExtension to WebExtension
Hi, I am following this doc to migrate AppExtension to WebExtension: https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_safari_app_extension_to_a_safari_web_extension Basically I added another WebExtension bundle to my current project and used the SFSafariAppExtensionBundleIdentifiersToReplace key Everything works fine except one gotcha, If I install the new App on Safari 14, there would be two apps in Safari->Preference menu and two popup icons (one is AppExtension and one is WebExtension). This issue will go away after I restart Safari, but this still brings some bad user experience. I am testing this locally as self-signed App. Any one also sees this issue? or has ideas to resolve it? Thanks!
0
0
454
Feb ’21
Can we use the same App to upgrade Safari AppExt to WebExt?
Hi, We are migrating Safari AppExtension to WebExtension, currently we have an app on Apple Store, which is AppExtension. I tried something locally in dev mode, in the AppExtension's extension .plist, we use <key>NSExtensionPointIdentifier</key> <string>com.apple.Safari.extension</string> while in WebExtension's extension .plist, it is required to use <key>NSExtensionPointIdentifier</key> <string>com.apple.Safari.web-extension</string> I keep all the product bundle identifiers the same, after upgrade from AppExtension to WebExtension, it is actually not upgrading, but there would be two apps showing up in Safari. So my question is what is the best practice to migrate from AppExtension to WebExtension without creating a new app on store? Can we directly submit the WebExtension to the current AppExtension app on store? Thank you very much
1
0
552
Jan ’21
Safari WebExtension runtime.onInstalled API not working
Hi, It seems that the browser.runtime.onInstalled API is not working on Safari WebExtenison. According to MDN - https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onInstalled, that API is supported, but according to my test, either installing it or toggling enable/disable checkbox on the Preference menu, the event listener is not called. Not sure it is my testing issue or it is actually not supported. Thanks!
3
0
1.6k
Sep ’20
use apply and call on WebExtension API functions
Hi, I am converting a chrome extension to safari web extension. In my test in Safari 14 beta 4. (14610.1.26), it seems the web extension api can't use the apply or call method. For example: In Chrome, we can use chrome.tabs.query.apply(null, [{}, function(tabs){ &#9;console.log(1, tabs); }]); But in Safari, this will not work, we can only use browser.tabs.query({}, function(tabs){ &#9;console.log(1, tabs) }); It would be very helpful if in Safari we can use apply and call method for WebExtension APIs Thank you very much
3
0
798
Sep ’20
WebExtension always need to manually consent for host permissions
Hi, I am testing my Safari 14 WebExtension, my extension will make requests towards my server and injects scripts on every websites. I configured the manifest host permission: "permissions": [   "tabs",   "cookies",   "https://*.trexcloud.com/*",   "https://*/",   "http://*/", &#9;...  ], trexcloud.com is my server, but when I firstly enabled my extension, Safari still need to manually consent for host permissions, either when I go to my server or any other websites Here is the screenshot - https://okta.box.com/s/d6k30ek0ufw41oc20sco3s8wjjsukagf Can I bypass the manually consent step? It is a one time config, but it still feels like unnecessary since the host permission is already listed in manifest and it is not very friendly to end users. Or is it a must required step for Safari WebExtension? Thank you very much
7
0
1.8k
Sep ’20
HttpOnly cookie in browser.cookies API
Hi, From MDN - https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/getAll doc, the httpOnly cookie can't be obtained by browser.cookies API for Safari WebExtension. I would like to ask is there any plan to support getting httpOnly cookie in the future? Besides, for the previous App Extension architecture, is there any way to obtain httpOnly cookie in swift code? Thank you very much
1
0
1.4k
Aug ’20
Safari Web Extension background request CORS issues
Hi, I am trying the new Safari WebExtension on Safari 14 beta on Majove, everything seems smooth so far except one thing: The ajax request in the background will always fail since it is cross origin. Here is the error image - https://okta.box.com/s/q1zacdkeu3exe1ckxsba21l3kuhyzuby This is not an issue on Chrome, and I think it make sense because the Web Extension background page's Origin is always the WebExtension protocol(like "chrome://&lt;uuid&gt;"), and should approve all the request even if the origin mismatch But in Safari WebExtension it is not allowed. Even if I add the "Access-Control-Allow-Origin: *" header in the server's response header, the background page requests still fails. The only way I can make it working is to disable the cross origin restrictions in the Develop menu, but that is not a solution for production. Any advice to resolve this? Thanks a lot
11
0
9.7k
Jul ’20