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
James FeigelJames Feigel 

iOS Bluetooth plugin - Cordova/CDV.h not found

I am trying to add the BluetoothSerial plugin, https://github.com/don/BluetoothSerial, to my hybrid application but when I try to build the project I get the following error:

 

'Cordova/CDV.h' file not found

 I tried changing Cordova to SalesforceHybridSDK as someone else suggested but that did not work either. What do I need to change to get the plugin to work?

Kevin HawkinsKevin Hawkins

Which version of the Mobile SDK are you using?

James FeigelJames Feigel

I am using version 2.0.

Kevin HawkinsKevin Hawkins
It's basically a pathing issue in your build settings. For <Cordova/CDV.h>, the compiler is saying, "For my various header search paths, look for [Header Path Root]/Cordova/CDV.h." And the conforming root header path—$(SRCROOT)/Dependencies/Cordova/include—is probably not defined in your header search paths.

The easiest way to fix this is to just change the import line to:

#import "CDV.h"

But you could also add the path above to your header search paths in your target build settings, and then you won't have to change source code.