This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Motivation: | |
// http://chris.eidhof.nl/post/lenses-in-swift/ | |
// https://www.youtube.com/watch?v=ofjehH9f-CU&feature=youtu.be | |
protocol Changeable { | |
func changed<A>(changes: [KeyPath<Self, A>: A]) -> Self | |
} | |
extension Changeable { | |
func changed<A>(changes: [KeyPath<Self, A>: A]) -> Self { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I was referring to this code: | |
// This is of the form: TEAMID.mSSO | |
#define kmSSOKeychainGroup @"3Q4M6DQ9WM.mSSO" | |
which is used here: | |
[keychainSearch setObject:kmSSOKeychainGroup forKey:(id)kSecAttrAccessGroup]; // inform the search that we're using the shared keychain | |
The use case I was talking about: I want to create a static library with the keychain stuff for two customers with team ids: TEAMID1 and TEAMID2. | |
I would have to somehow read the appropriate TEAMID from within the app which contains the static library. One option could be to have the customer define the TEAMID in a .plist file or something. But, it would be nice if I could just read the TEAMID during runtime. |