4

My question is a duplicate of this one. But that one (rightly)got closed as non constructive, with zero answer and with absolutely no use to anyone.

I am trying to connect to a external bluetooth accessory from my iPhone 5. The accessory is neither MFI certified nor support Bluetooth Low energy communication.

So my only option is to connect to it using a private Framework, and I am doing that since I am not intending to push my app to App store. The app is for personal use.

I am trying to use private BluetoothManager framework class, uses XCode 4.6 and my app is targeting iOS 6.0.

My current setup

  1. Added a folder named Headers in bluetoothManager framework in sdk folder

    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/PrivateFrameworks/BluetoothManager.framework

  2. Created 4 header files in that folder, namely

    1. BluetoothAudioJack.h
    2. BluetoothManager.h
    3. BluetoothDevice.h
    4. CTStructures.h

      I got these header files from here.

  3. Added BluetoothManager.framework to my project , using normal method target->Build Phases->Link Binary with Libraries .

  4. In my ViewController.h file, I imported the header file

    #import "BluetoothManager.h"
    

This is it. Simply I am following this tutorial, but added the steps here just in case the tutorial went down.

My problem

I am yet to get into the coding part. When I tried to compile the above given setup, I am getting error

NSObject.h file not found

in the BluetoothManager.h file I added as header to the framework.

Any ideas?

Community
  • 1
  • 1
Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167
  • @radhoo good tutorial.. But actually it didn't worked for my case.. I fixed this error alright.. But what I actually wanted was to search for and find a bluetooth printer which is near by. But scan results for BluetoothManager is now filtered, and only devices like headset are shown, and not other generic devices.. Apple has plugged that hole.. No luck with private API's either. – Krishnabhadra Feb 03 '13 at 04:11
  • 1
    Also very useful an updated 'Bluetoothmanager.h': http://stackoverflow.com/a/10620237/1864294 – Michael Dorner Aug 13 '13 at 12:05

1 Answers1

10

Well I finally solved this problem. I just removed those

#import "NSObject.h"

calls from 3 header files which I mentioned in the question, and Voila!!

Krishnabhadra
  • 34,169
  • 30
  • 118
  • 167