I'am finalising an Open Source C coded CometD library, i thought it would be a good idea to open it to OSX/iOS users, like myself.
In order to ease up the work for OSX/iOS developers i wanted to switch from a static C library to a Xcode iOS Framework. So i followed advices found on the net, and generated a static iOS compatible library from Xcode before wrapping it in a iOS FrameWork.
I made sure that "Architectures" is "Standard armv7 armv64" and the "Base SDK" is put to "Latest iOS" then i compiled, some warnings popped out but library generated successfully and gave me a Product.a .
The problem is that i can't include it in any other iOS project. As soon as i put the library and the headers in any iOS project i found a sea of error telling me :
ignoring file * * *.a, file was built for archive which is not the architecture being linked (i386): * * *.a Undefined symbols for architecture i386:
...
- barely all c functions
...
But it has compiled as a compatible iOS static library ? Why yelling at me for a i386 architecture ? Mind Blowing !
I fetched the interweb but no real answer was found.
So my question is, is it possible to make such a thing (C library inside iOS FrameWork) ? If yes (hopefully), how to avoid the errors and make it actually compile and produce a product ?
Any Answer would be much appreciated, Thank you for reading.