iOS - Building a static framework with other framework dependencies
ios, iphone, opencv, static-linking
Solution
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.
Problem
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?