phonegap条码扫描器iOS6屏幕方向

时间:2012-12-07 15:39:10

标签: cordova barcode barcode-scanner

这是我的第一个问题。所以请原谅我,如果它不是完美的。

目标

通过Dreamweaver使用Phonegap构建的本机应用程序包含条形码扫描程序插件 https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/BarcodeScanner

问题

我试过的所有iOS版本都以纵向模式显示条形码扫描器,预计iOS 6.它显示条形码扫描器插件的横向方向。如果这是问题,我可以处理它,但它只扫描,当我以纵向方向持有它。

我一整天用谷歌搜索,没有任何解决方案。

这是我的config.xml文件:

<feature name="http://api.phonegap.com/1.0/device" />

<preference name="phonegap-version"     value="2.2.0" />
<preference name="orientation"          value="portrait" />
<preference name="target-device"        value="universal" />
<preference name="fullscreen"           value="false" />
<preference name="webviewbounce"            value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />

<gap:plugin name="BarcodeScanner" />
<gap:plugin name="ChildBrowser" />
<access origin="*" />

我想在所有操作系统中使用面向纵向的条形码扫描仪。解决这个问题的任何方法?

编辑:找到解决方案

至少,我在xcode中加载了所有数据。下载了最新版本的barcodescanner插件。在xcode中设置它,编译它并且它工作。

似乎问题是当通过Dreamweaver / Phonegap Webseite创建构建时,Phonecap使用的barcodescanner插件的过时版本。

1 个答案:

答案 0 :(得分:0)

请在AppDelegate.m文件

中更新以下代码

添加以下行:

[self.window setRootViewController:self.viewController];

评论此行(或)删除此行:

//[self.window addSubview:self.viewController.view];
相关问题