Safari web extension background script doesnt work on iOS with manifest v3

So I've been trying to debug / read console.logs from background scripts when using manifest v3 but it never fires any log. It works well in manifest v2 though.

I have set the persmission and host_permission as well changed my background to service_work in manifest but nothing really happens:

"background": { "service_worker": "scripts/background.js" },

My Qyestion is, is it currently possible to use manifest v3 on iOS safari web extension?

Some Notes: Reading this page: https://developer.apple.com/documentation/safariservices/safari_web_extensions/assessing_your_safari_web_extension_s_browser_compatibility It says:

"background: In iOS, you must set the persistent attribute to false. With manifest version 3, all background pages are nonpersistent."

So I'm guessing it is somehow possible to use right?

What version of iOS are you running on? Have you set manifest version 3 in the manifest as well?

Please file a bug report at https://feedbackassistant.apple.com and include a sample project that reproduces this issue and we can take a look at what is going on.

Hi, I have same issue did you find any solution?

Try this format:

"background": { "scripts": ["scripts/background.js"], "persistent": false },

I ran into the same issue where CORS was giving me trouble in MV3 after converting from a Chrome extension using the Xcode converter. I then stumbled across this answer https://developer.apple.com/forums/thread/654839?answerId=727731022#727731022 and it fixed it!

Doing "background": { "scripts": ["scripts/background.js"], "persistent": false }, as suggested above does work to some extent but unfortunately the background script keeps getting terminated and does not respond to sendMessage.

Safari web extension background script doesnt work on iOS with manifest v3
 
 
Q