Does chrome app id for extensions affect sync storage

杀马特。学长 韩版系。学妹 提交于 2019-12-13 06:21:08

问题


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.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/20970833/does-chrome-app-id-for-extensions-affect-sync-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!