function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bob_buzzardbob_buzzard 

Hybrid iOS app using mobile sdk 1.5 and barcode scanner

I'm creating a small barcode scanner app using the latest mobile sdk (based on cordova 2.3.0).  Once I've dropped the .mm, .cpp and .h files into the Plugins directory, the build fails on the following line of the scanner code:

 

#import <Cordova/CDVPlugin.h>

 

saying that CDVPlugin can't be found.  The only way that I've been able to get the Xcode compiler to be able to see this file is to copy it from the SalesforceHybridSDK.framework/Headers folder and drop it into the Plugins folder.  The knock-on effects of this are that I have to copy most of the other header files across as well.

 

This works, but it feels wrong - I'm sure there's something obvious that I've missed.

 

Best Answer chosen by Admin (Salesforce Developers) 
Kevin HawkinsKevin Hawkins

Because Cordova is built into the hybrid SDK, you actually have to reference it with the SalesforceHybridSDK prefix.  I.e.:

 

#import "SalesforceHybridSDK/CDVPlugin.h"

 

 

All Answers

Kevin HawkinsKevin Hawkins

Because Cordova is built into the hybrid SDK, you actually have to reference it with the SalesforceHybridSDK prefix.  I.e.:

 

#import "SalesforceHybridSDK/CDVPlugin.h"

 

 

This was selected as the best answer
bob_buzzardbob_buzzard

I knew it would be something simple, just beyond me :)

 

Have some kudos and a solution.

jhennyjhenny

Thanks guys - Glad I found this post - I spent all day on this with a different plugin. What a pain. Some of the classes in the plugin needed adjustments as well to reference the right place.

 

Wish this was documented in the sdk docs.

 

 

HareHare
Hi
i createds one Student  object in that i have Firstname,username,password ,email so once student registered with xyz username when another student try to register with same username beforce clicking save button only need to check existed username
same as bellow link  using apex vf and ajax please help on this
http://phpseason.wordpress.com/2013/02/17/live-username-availability-checking-using-ajax-and-jquery/
leona lewisleona lewis
beco fuanbeco fuan
I've tested .net barcode scanner (http://www.keepdynamic.com/dotnet-barcode-reader/) and java barcode scanner (http://www.keepdynamic.com/java-barcode-reader/), but I have on iso barcode plug-in, can anyone provide such one?