soffes / SAMKeychain

Simple Objective-C wrapper for the keychain that works on Mac and iOS
MIT License
5.4k stars 956 forks source link

Cannot compile as framework #104

Closed warpling closed 9 years ago

warpling commented 9 years ago

When using the Cocoapod flag use_frameworks! SSKeychain generates couple redefinition/duplicate errors and won't compile. I don't have a good idea of what's going on but need to use this flag so I can use a swift framework in my project :(

(Thank you so much for this library!)

calebd commented 9 years ago

@soffes It should be pretty simple to just switch this to a framework project. We can kill a couple :bird:s with that stone. Want me to give it a shot?

calebd commented 9 years ago

Nevermind, it already has framework targets. In that case, @warpling can you provide any additional information?

warpling commented 9 years ago

I'm using SSKeychain 1.2.3, I import the headers once via #import "SSKeychain.h", and am getting the following errors when compiling:

calebd commented 9 years ago

First off, you should use a framework or module import with all frameworks. @import SSKeychain;, import SSKeychain, or #import <SSKeychain/SSKeychain.h>

calebd commented 9 years ago

Second, I bet CocoaPods is doing something stupid with their custom module and umbrella header generation. Ugh.

warpling commented 9 years ago

You're right! I had blindly followed the warnings to switch my angled includes to quotes after adding use_frameworks!. That's what I get for not fully understanding objective-c imports.