3

I am converting a very basic WebExtension to a Safari Extension, and am getting an odd warning when I run the xcrun command.

xcrun safari-web-extension-converter

Warning: The following keys in your manifest.json are not supported by your current version of Safari. If these are critical to your extension, you should review your code to see if you need to make changes to support Safari:
      manifest_version
      js
      name
      matches
      version

{
    "name": "Search Engine Detector",
    "version": "1.0.0",
    "manifest_version": 2,
    "permissions": [ "*://*/*" ],
    "content_scripts": [ {
        "js": [ "js/Bing.js" ],
        "matches": [ "*://*.bing.com/*" ]
    }, {
        "js": [ "js/DuckDuckGo.js" ],
        "matches": [ "*://*.duckduckgo.com/*" ]
    }, {
        "js": [ "js/Google.js" ],
        "matches": [ "*://*.google.com/*" ]
    }, {
        "js": [ "js/Yahoo.js" ],
        "matches": [ "*://*.yahoo.com/*" ]
    } ]
}

The extension works as intended when built.

Why is the command line tool giving me incorrect information?

wOxxOm
  • 65,848
  • 11
  • 132
  • 136
James Douglas
  • 3,328
  • 2
  • 22
  • 43
  • 2
    Apparently it's a bug in the converter so you can notify its developers. – wOxxOm Apr 30 '21 at 14:58
  • @wOxxOm How did you solve the problem? Is there any solution for that? – Ceren Keklik Apr 06 '22 at 06:41
  • What @wOxxOm mentioned is true. Though xcrun complains about non-matching keys in manifest, it is actually able to convert and open the converted Safari extension in XCode. One more observation is Safari extension APIs are more in line with Mozilla's add-on API rather than Chrome's APIs. Manifest v3 APIs don't work in Safari. – bprasanna May 02 '22 at 08:04

0 Answers0