Reputation: 2725
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!
Upvotes: 4
Views: 364
Reputation: 1624
Maybe you add BFramework in compile sources? Or add headers in header search paths? or set dependency in build settings.
Upvotes: 1
Reputation: 485
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.
Upvotes: 2