iOS 6 - BluetoothManager framework - “NSObject” not found error

喜欢而已 提交于 2019-12-22 09:18:45

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/14639994/ios-6-bluetoothmanager-framework-nsobject-not-found-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!