扩展程序的Chrome应用ID是否会影响同步存储空间? [英] Does chrome app id for extensions affect sync storage

查看:177
本文介绍了扩展程序的Chrome应用ID是否会影响同步存储空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发书签的Chrome扩展程序。在应用程序中,我使用chrome.storage.sync。但是,当我测试从zip文件安装应用程序时,我得到了不同的应用程序ID:s。这似乎影响同步,因此我想知道是否有办法解决这个问题。

I'm developing a Chrome extension for bookmarks. In the application, I make use of chrome.storage.sync. However, when I'm testing to install the application from a zip file I get different app id:s. This seems to affect sync and thus I'm wondering if there is a way to work around this.

推荐答案

您需要设置清单中的属性的适当值(并确保始终使用相同的 .pem 文件来打包扩展名)。 >
在清单的 属性:

You need to set the appropriate value for the key property in your manifest (and make sure you always use the same .pem file for packaging your extension).
Quoting the docs on manifest's key property:


这个值可以用来控制扩展,应用程序或主题。

This value can be used to control the unique ID of an extension, app, or theme when it is loaded during development.

要获得合适的键值,请首先从 .crx 安装扩展程序。文件(您可能需要 上传您的扩展程序 打包手册LY )。然后,在您的 用户数据目录 中,查看文件 默认/扩展/< extensionId> /< versionString> /manifest.json 。您会看到填写的关键值。

To get a suitable key value, first install your extension from a .crx file (you may need to upload your extension or package it manually). Then, in your user data directory, look in the file Default/Extensions/<extensionId>/<versionString>/manifest.json. You will see the key value filled in there.

这篇关于扩展程序的Chrome应用ID是否会影响同步存储空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆