sircrom
sircrom

Reputation: 273

phonegap barcode scanner iOS6 screen orientation

tthis is my first Question here. So please forgive me, if its not perfekt formated.

Goal

A native App, build with Phonegap via Dreamweaver, includes the Barcode Scanner Plugin https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/BarcodeScanner

Issue

All iOS versions i tried, shows the barcode scanner in portrait mode, expect iOS 6. Its shows a landscape orientation for the barcode scanner plugin. If this were the matter, i could deal with it, but it only scans, when i hold it in a portrait orientation.

I googled all day long, without any solution.

Here is my config.xml file:

<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="*" />

I want a portrait orientated barcode scanner in all OS. Any solution for this problem?

EDIT: Found a Solution

At least, i loaded all my Data in xcode. Downloaded the latest version of the barcodescanner plugin. Set it up in xcode, compiled it and it worked.

It seems to be, that the Problem is an outdated version of the barcodescanner plugin, which is used by Phonegap, when the build is created via Dreamweaver/Phonegap Webseite.

Upvotes: 3

Views: 1050

Answers (1)

Thiago MadPin
Thiago MadPin

Reputation: 104

Please update below code in AppDelegate.m file

Add this line:

[self.window setRootViewController:self.viewController];

Comment this line (or) remove this line:

//[self.window addSubview:self.viewController.view];

Upvotes: 0

Related Questions