Skip to main content

Posts

Using Phonegap Barcode Scanner on Iphone

I'm trying to add a barcode scanner to a JQM phonegap project for iOS. I have followed the instructions listed, although I'm not 100% sure if I did the first and last steps correctly. Copy the .h, .cpp and .mm files to the Plugins directory in your project. You may need to set the compile options for zxing-all-in-one.cc to turn off optimization. I directly copied the three files into the plugins folder in xcode. It isn't giving me any errors, but it also isn't working. I have no idea how to do compiler options in xcode, so I haven't done the last step. Currently my app still runs with no errors and running the scan function opens the camera with the ui for the barcode scanner up. The problem is that it doesn't seem to be either looking for or finding barcodes, it just stays up and does nothing (until you hit cancel, then it displays the cancelled message correctly). Anyone have any ideas what's wrong or where I should look?

Using Phonegap Barcode Scanner on Iphone

I'm trying to add a barcode scanner to a JQM phonegap project for iOS. I have followed the instructions listed, although I'm not 100% sure if I did the first and last steps correctly. Copy the .h, .cpp and .mm files to the Plugins directory in your project. You may need to set the compile options for zxing-all-in-one.cc to turn off optimization. I directly copied the three files into the plugins folder in xcode. It isn't giving me any errors, but it also isn't working. I have no idea how to do compiler options in xcode, so I haven't done the last step. Currently my app still runs with no errors and running the scan function opens the camera with the ui for the barcode scanner up. The problem is that it doesn't seem to be either looking for or finding barcodes, it just stays up and does nothing (until you hit cancel, then it displays the cancelled message correctly). Anyone have any ideas what's wrong or where I should look?

EXC_BAD_ACCESS when opening modal view

I'm having a problem with my iPhone App, I'm getting EXC_BAD_ACCESS, I had some memory leaks, but these are now fixed, so I'm not sure whats going on. I realise that I haven't provide a lot of information, but I really don't know whats happening. The initial screen opens up where I have a number of buttons. Tapping on the first button, which runs the following code and opens up a modal view: -(IBAction)newWorkoutButton { newWorkoutViewController .loadedFromRootViewController = @"YES"; [self presentModalViewController:newWorkoutViewController animated:YES]; } The screen freezes and the is in the code below: #import <UIKit/UIKit.h> #import <objc/runtime.h> #import <CoreLocation/CoreLocation.h> int main(int argc, char *argv[]) { Method getDistanceFrom = class_getInstanceMethod([CLLocation class], @selector(getDistanceFrom:)); class_addMethod([CLLocation class], @selector(distanceFromLocation:), method_getImplementation(

EXC_BAD_ACCESS when opening modal view

I'm having a problem with my iPhone App, I'm getting EXC_BAD_ACCESS, I had some memory leaks, but these are now fixed, so I'm not sure whats going on. I realise that I haven't provide a lot of information, but I really don't know whats happening. The initial screen opens up where I have a number of buttons. Tapping on the first button, which runs the following code and opens up a modal view: -(IBAction)newWorkoutButton { newWorkoutViewController .loadedFromRootViewController = @"YES"; [self presentModalViewController:newWorkoutViewController animated:YES]; } The screen freezes and the is in the code below: #import <UIKit/UIKit.h> #import <objc/runtime.h> #import <CoreLocation/CoreLocation.h> int main(int argc, char *argv[]) { Method getDistanceFrom = class_getInstanceMethod([CLLocation class], @selector(getDistanceFrom:)); class_addMethod([CLLocation class], @selector(distanceFromLocation:), method_getImplementation(

iPhone, iPad script rule out

Is it possible to rule out a script load only when viewing site on Apple devices? For example I don't want this file to be loaded on iPhone/iPad: <script type="text/javascript" src="js/jquery.skinned-select.js"></script> Will be grateful for any help.