1

我正在尝试使用 buildfire.datastore 和 buildfire.userData。

在一个插件中保存和使用此信息。

然后我可以在不同的插件中引用该数据存储和 userData 信息吗?如果没有,浏览器 localStorage 会工作吗?

4

1 回答 1

0

Plugins are not allowed to share data even among different instances of the same plugin. This is done for security reasons.

If your plugins share the same domain they can use the same local storage. However, if they do not share the same domain you can use the Shared LocalStorage in buildfire.js. See https://github.com/BuildFire/sdk/wiki/LocalStorage

While BuildFire has on its roadmap a new database storage mechanism that will allow all plugins to share data. A good substitute for the would be using a service like Google's FireBase which works really well with BuildFire.

Hope this helps

于 2017-11-27T05:12:55.170 回答