将包文件夹添加到cordova插件

时间:2014-03-13 06:31:31

标签: ios xcode cordova phonegap-plugins cordova-plugins

我已通过指定路径

为我的插件添加了一个包
<resource-file src="src/ios/MyDataModel.bundle" />

当我安装我的插件时,捆绑包会被复制到我认为可以预期的Resources文件夹中。

在插件中我尝试通过

获取该包的路径
NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"MyDataModel" ofType:@"bundle"];

但是,bundlePath设置为nil,我无法弄清楚原因。我在这里缺少什么?

0 个答案:

没有答案
相关问题