Closed jamesweb1 closed 8 years ago
I personally don't have any experience making such frameworks on Xcode. However, as long as I read the page in stack overflow, I suppose you need to create your umbrella file manually. An umbrella file should be just a normal header file in which all public import, include etc, are written.
But what is umbrella file? Where should I find it in Xcode? I only know how to add "objective-c bridging header" in build setting. I have read this article in Apple developer website: https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html However I only get the concept in "Importing Code from Within the Same App Target". The second part "Importing Code from Within the Same Framework Target" makes me confused. It said "In your umbrella header file, import every..." But apple didn't tell me where it is? where I should set this? If someone knows, please give me some hint, thanks.
As I mentioned, an umbrella file is just a normal header file. Just add a normal objective-C header file to your project.
Actually, this issue tracker is not for all Xcode or programming issues but just for the NSData+GZIP library. You'd better to ask it somewhere more suitable. Or to google words like "umbrella file", Xcode, framework etc.
Even if include #include <zlib.h>
in umbrella header still cannot work in framework. Because framework cannot include non-modular header, Xcode will show this message. I have a similar question here:https://github.com/CocoaPods/CocoaPods/issues/3666
Also having this issue, have you found a resolution?
I'm not sure if this helps, but this is how I use this extension in my framework:
The other things are the same.
Link binary with libz.tbd
and set Swift compiler import path correctly.
Now you can try swift3 branch that supports framework.
I'm building a swift framework(not an app) now, and I follow the instruction to add an objective-c bridging header under build settings and add "#import" to this file. I also add libz.dylib library to my linked framework and libraries and with status "required".
But when I build my framework, it shows error message...
I find the solution in the stack overflow: http://stackoverflow.com/questions/24875745/xcode-6-beta-4-using-bridging-headers-with-framework-targets-is-unsupported
I don't find any "umbrella file" in my Xcode, so I cannot solve this problem.Can any one help me? Thank you very much. Sorry for I'm very new to iOS development.