Does iOS Prefix header only works for objective-c header files and not c's? -
i have 2 cocoa touch framework projects.
first 1 have file structure below:
|--sszip-prefix.pch |--ioapi.c |--ioapi.h
second 1 have file structure below:
|--zipzap-prefix.pch |--zzconstants.h |--zzconstants.m
the contents of prefix.pch file same:
#include <zlib.h> #if defined(__iphone_os_version_min_required) #include <coregraphics/coregraphics.h> #elif defined(__mac_os_x_version_min_required) #include <applicationservices/applicationservices.h> #endif #ifdef __objc__ #import <foundation/foundation.h> #endif
both ioapi.h , zzconstants.h need use stuff in zlib.h
however when compile both of them, second project manage compile without issues while first project having tons of parse issue errors unless insert #include "zlib.h" inside ioapi.h header file (though gives error, see bottom section)
the difference can see ioapi.h written in c while zzconstants.h written in objective-c
so question is.. ios prefix header works objective-c header files , not c's? if there workaround?
the story:
the reason need use prefix header because if insert #include "zlib.h" directly in header files, gives error "include of non-modular header inside framework module" in both cases.. somehow using prefix header won't have issue.
and main reason behind this, i'm trying ssziparchive (a zip library) work in cocoa touch framework. can use in normal swift project without issue using bridging header, somehow cocoa touch framework it's totally different story!
ps: i'm trying use ssziparchive in first project , zipzap in second project. zipzap works not user-friendly.
Comments
Post a Comment