Reputation:
I tired to follow these instructions here https://github.com/MailCore/mailcore2/blob/master/build-mac/README.md but I didnt understand or dont know how to implement it in my swift app. I know how to set up the session etc but how to install mailcore2 library onto my app is what im having problems with.
Upvotes: 3
Views: 1324
Reputation: 511
One of the things that worked for me without pods nor carthage was to download the mailcore2 library and copy the whole mailcore2 folder to the project folder. then follow this steps:
Go to Build Phases from your build target, and under 'Link Binary With Libraries',
Set 'Other Linker Flags' under Build Settings: -lctemplate-ios -letpan-ios -lxml2 -lsasl2 -liconv -ltidy -lz -lc++ -lresolv -stdlib=libc++ -ObjC
Make sure to use LLVM C++ standard library. Open Build Settings, scroll down to 'C++ Standard Library', and select libc++.
In Build Phases, add a Target Dependency of static mailcore2 ios.
For Swift - If you are using Mailcore in a Swift project you also need to complete the following steps: * Create a new header file in your project and name it Project-Name-Bridging-Header.h. * Remove any template code from the file and add #import * In your target settings search for Objective-c Bridging Header and add a link to your bridging header. (Project-Name-Bridging-Header.h) * You do not need to import Mailcore in any of your classes as the bridging header takes care of this automatically.
Upvotes: 1