Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 6 - BluetoothManager framework - "NSObject" not found error

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?

like image 461
Krishnabhadra Avatar asked Dec 27 '22 10:12

Krishnabhadra


1 Answers

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!!

like image 99
Krishnabhadra Avatar answered Jan 31 '23 05:01

Krishnabhadra