Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - Building a static framework with other framework dependencies

I am building an iOS static framework (MyFramework.framework) using the method described here.

However, methods in MyFramework.framework are also dependent on the OpenCV framework for iOS (opencv2.framework). Now I understand that I cannot build/link the OpenCV symbols into MyFramework.framework directly, and that the parent project that includes MyFramework.framework will also have to include the opencv2.framework.

My question is this: when building/developing the MyFramework.framework project, how can I reference the opencv2.framework headers? Do I have to copy the headers to the MyFramework.framework project even if I don't directly have opencv2.framework in there? Or is there another way to reference them?

like image 726
Brett Avatar asked Jan 05 '14 01:01

Brett


1 Answers

Drag the OpenCV2.framework to the Frameworks group in Xcode. In the Build Phases, remove the framework from the Link Binary With Libraries build phase. Now you can reference the OpenCV2 headers without linking it directly to your framework.

like image 92
neilco Avatar answered Oct 05 '22 21:10

neilco