4

I am developing an iOS Real Framework with XCode. This Framework (A) needs an external framework (B) to compile. For example:

A FRAMEWORK
+Frameworks
 -B FRAMEWORK

It is imported in A by using:

#import<BFRAMEWORK/bframework.h>

I create the A.framework to be linked in a project.

The problem is when I link this A Framework in a project. The project returns "BFRAMEWORK/bframework.h" not found.

I want to include B framework in A.framework so not to need to add B framework also in my project. For example:

MY PROJECT
+Frameworks
 -A.Framework (with B Framework included inside).

Do you know how to do this? or another way to do this?

Thank you!

Ravi Sharma
  • 975
  • 11
  • 29
jomafer
  • 2,655
  • 1
  • 32
  • 47

3 Answers3

2

I was able to create this structure with iOS-Universal-Framework: https://github.com/kstenerud/iOS-Universal-Framework.

I created a Static iOS Framework 'FrameworkB' with 1 method, which is imported in a second Static iOS Framework 'Framework A' with 1 method that's calling FrameworkB's method. I then created an iPad app which imports FrameworkA and calls the method. Code runs fine and prints from FrameworkA (which fetches from FrameworkB) and of course FrameworkB is not imported. Please note that all frameworks have to be built for the same profile (i used iPad), otherwise you'll get linker errors.

BCBlanka
  • 485
  • 3
  • 7
1

Maybe you add BFramework in compile sources? Or add headers in header search paths? or set dependency in build settings.

changtung
  • 1,614
  • 15
  • 19
-2

I think you are looking for OTHER_LDFLAGS = -ObjC

RolandasR
  • 3,030
  • 2
  • 25
  • 26