0

I am currently attempting to add the BluetoothManager private framework to my xcode project, but it is always ending up as a failure. I've downloaded all of the files already from NST's github but it's pointless if I don't know what to do with them.

I've seen some tutorials on having to add the files directly inside the XCode.app file but that doesn't seem to work anymore. Simply linking the frameworks in the project returns a Mach-O linker error and after setting up a search path it tells me that UIKit cannot be found.

Can anyone please give me some details steps on how to get the private framework to work? There really isn't that much information on this online, and if there is it's outdated.

Matt
  • 1,087
  • 1
  • 12
  • 28
  • You do know your app will be rejected if it uses private api's? – Harry Singh Jul 01 '17 at 19:12
  • @HarrySingh Yes I am very aware of that, I do not intend to submit it to the app store. It is for testing purposes. – Matt Jul 01 '17 at 19:22
  • Check out this answer https://stackoverflow.com/questions/43962260/how-to-import-a-private-framework-in-xcode-8-3-without-getting-undefined-symbol You can rebuild private frameworks with that and link to them as usual at compile-time. – creker Jul 01 '17 at 20:20

1 Answers1

0

To get an instance of BluetoothManager just do the following.

id manager = [[NSClassFromString(@"BluetoothManager") alloc] init];

I assume you're using objective-c. You don't need to import any frameworks or anything.

enter image description here

Harry Singh
  • 826
  • 5
  • 11