ios - phonegap 从 settings.bundle ios 获取值

标签 ios cordova plugins settings.bundle

我是 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 中获取值(value)

最佳答案

I had downloaded applicationPreferences.h ,applicationPreferences.m ...

手动管理插件几乎是不可能的。删除这些文件,然后从命令行运行

phonegap local plugin add https://github.com/apla/me.apla.cordova.app-preferences.git

这将下载插件,将其放置在正确的位置等。没有麻烦!

关于ios - phonegap 从 settings.bundle ios 获取值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25721972/

相关文章:

ios - lldb断点,加载nib但没有得到UITableView

Windows Universal 应用程序在将身份与商店关联后崩溃

jenkins - Jenkins Openshift 管道脚本中出现有关无法读取证书颁发机构的错误

wordpress - Metabox 保存功能看起来不起作用

ios - 无法从委托(delegate)方法中关闭 FBfriendPickerViewController

ios - 如何制作 - 混合cornerRadius - Swift 5

c# - 在 Xamarin iOS 中以编程方式设置 UITableViewCell 样式

ios - filepicker.io 与 IOS 上的电话差距

android - 在 Android 中从 Java 运行 JavaScript 方法

java - eclipse.ui.menus 的名称过滤器