我是phonegap的新手,我在settings.bundle中有名为name_preference的字段,我在main.js中尝试我的代码
function deviceReady() {
window.plugins.applicationPreferences.get('name_preference',
function(result) {
alert("We got a setting: " + result);
}, function(error) {
alert("Failed to retrieve a setting: " + error);
} );
我下载了applicationPreferences.h,applicationPreferences.m,放在xcode中,然后放在applicationPreferences.js中,放在js文件夹中。帮帮我,我如何从phonegap ios中获得settings.bundle的价值
发布于 2014-09-16 21:29:30
我已经下载了应用程序首选项.h,应用程序首选项.m...
手动管理插件几乎是不可能的。删除这些文件,然后从命令行运行
phonegap local plugin add https://github.com/apla/me.apla.cordova.app-preferences.git
这将下载插件,把它放在正确的地方,等等。对你来说没有麻烦!
发布于 2014-09-16 21:30:51
另一种答案:
将.m和.h文件放在Xcode中是不够的。您还需要在Xcode中右键单击Project Navigator窗格,然后单击"Add Files...“。然后,选择.m和.h文件。Xcode现在将它们包含在构建中。
https://stackoverflow.com/questions/25721972
复制相似问题