0

I am having problems including frameworks in my project.

I have downloaded the private APIs from https://github.com/nst/iOS-Runtime-Headers/tree/master/PrivateFrameworks This gives me header files to use with the framework already in xcode as I understand it. I have added the header files to the framework folder in xcode for bluetoothmanager. I have also included this framework in xcode. paths for adding framework

The "framework search paths" is:

/Applications/Xcode.app/Contents/Develop­er/Platforms/iPhoneOS.platform/Developer­/SDKs/iPhoneOS.sdk/System/Library/Privat­eFrameworks

Here is a picture of my xcode folder structure: This is in project root as you can see

When I try to include the header file i get the error "BluetoothManager/BluetoothManager.h file not found".

Here is the code for that:

#include <BluetoothManager/BluetoothManager.h>
Julian E.
  • 4,687
  • 6
  • 32
  • 49
Simon Guldstrand
  • 488
  • 1
  • 5
  • 24

1 Answers1

2

Objective-C has this in common with C/C++; the quoted form is for "local" includes of files (you need to specify the relative path from the current file, e.g. #include "headers/my_header.h"), while the angle-bracket form is for "global" includes -- those found somewhere on the include path passed to the compiler (e.g. #include <math.h>).

So to have your own headers use < > not " " you need to pass either the relative or the absolute path for your header directory to the compiler.

eliasRuizHz
  • 356
  • 4
  • 15
  • Thanks! I will check when I get back to work on monday! – Simon Guldstrand Jun 14 '15 at 13:22
  • The weird thing is that I still cannot find it.. I have included the correct path. I include in code with #import . - error can't find file.... – Simon Guldstrand Jun 15 '15 at 05:37
  • Ok I solved it. I am using a bridging header since im writing in swift and wanted to import objective-c headers. Now the problem has become that my header files in the framework gives alot of errors. Something like xcode tries to compile using swift on the objective-c headers..? – Simon Guldstrand Jun 15 '15 at 10:57
  • What's not yet clear it is, if you want to import `Obj-c to Swift` or `Swift to Obj-c`?. If the import is from Obj-C Swift steps you should llebar out they are: 1. Create a `Header.h` comprehensive file containing all frameworks and / or files written in Obj-c and add the file `Header.h` a project settings. If you have questions on how to do I recommend this question: [link](http://stackoverflow.com/questions/24062618/swift-to-objective-c-header-not-created-in-xcode-6). – eliasRuizHz Jun 15 '15 at 14:12