kemmitorz
kemmitorz

Reputation: 361

Multiple frameworks dependencies XCode

I'm developing some frameworks in iOS which I cannot distribute trough CocoaPods.

Suppose I have framework1, framework2 and my main app project. The app project depends of framework1, an the framework1 depends of framework2.

So the structure would be like this:

app <-- framework1 <-- framework2

My problem is, when I compile alone framework1 (with framework2 dependencies) everything is nice and the framework1 is built successfully. Then I import the framework1 into the app project and... when I try to compile the app with the framework1 (which contains framework2), it claims because the framework1 inside the app cannot find files from framework2... It is really weird.

The error is shown in a .h file of my framework1 that uses another class of framework2.

How can I solve this? I think I'm forgetting some steps when build the framework1 to include framework2 also... Repeat I cannot use CocoaPods =(

Thanks a lot!!

Upvotes: 3

Views: 1143

Answers (1)

Terence
Terence

Reputation: 443

If your framework2 is embedded in framework1, this does not answer your question, but just for a reference why your way is discouraged. link

If your framework1 just dynamically link to framework2, then in your main project, go to your Target in Project setting, in "Linked Frameworks and libraries" add both framework1 and framework2. Then framework1 would dynamically link to your framework2.

Upvotes: 1

Related Questions