0

我为我的应用程序开发了一个 ios safari 网络扩展程序,在模拟器和我的设备上一切似乎都运行良好。

但是,我注意到在某些情况下,当用户尝试授予 safari 中的扩展程序权限时,系统会显示一条警报,要求对保存在用户钥匙串中的所有站点的权限。这真的很奇怪。我无法始终重现此行为,有时它可以正常工作,并且仅针对用户所在的域请求许可。

当我发现当用户在钥匙串中保存了很多网站密码时,这个问题已经成为一个真正的问题,Safari 在请求许可时冻结并且变得完全无法使用,迫使用户关闭它。

这是我的扩展的清单:

{
"manifest_version": 2,
"content_security_policy": "script-src 'self' https://ssl.google-analytics.com; object-src 'self'",
"background": {
    "scripts": [
        "browser-polyfill.js",
        "background.js"
    ],
    "persistent": false
},
"content_scripts": [{
        "js": [
            "browser-polyfill.js",
            "document-start.js"
        ],
        "matches": [
            "http://*/*",
            "https://*/*"
        ],
        "run_at": "document_start"
    },
    {
        "js": [
            "browser-polyfill.js",
            "contentscript.js"
        ],
        "matches": [
            "http://*/*",
            "https://*/*"
        ],
        "run_at": "document_idle"
    }
],
"browser_action": {
    "default_icon": {
        "19": "assets/images/logos/16x16_logo.png",
        "38": "assets/images/logos/48x48_logo.png",
        "48": "assets/images/logos/48x48_logo.png",
        "64": "assets/images/logos/64x64_logo.png",
        "128": "assets/images/logos/128x128_logo.png",
        "256": "assets/images/logos/256x256_logo.png",
        "512": "assets/images/logos/512x512_logo.png"
    },
    "default_popup": "popup.html"
},
"icons": {
    "16": "assets/images/logos/16x16_logo.png",
    "48": "assets/images/logos/48x48_logo.png",
    "64": "assets/images/logos/64x64_logo.png",
    "128": "assets/images/logos/128x128_logo.png",
    "256": "assets/images/logos/256x256_logo.png",
    "512": "assets/images/logos/512x512_logo.png"
},
"web_accessible_resources": [
    "assets/*"
],
"permissions": [
    "<all_urls>",
    "cookies",
    "storage",
    "unlimitedStorage",
    "webNavigation",
    "notifications",
    "nativeMessaging"
]

}

这是 safari 请求允许扩展访问用户钥匙串中注册的 653 个不同网站的屏幕截图: 在此处输入图像描述

4

0 回答 0