s-aska / keyclip Goto Github PK
View Code? Open in Web Editor NEWKeyClip is yet another Keychain library written in Swift.
License: MIT License
KeyClip is yet another Keychain library written in Swift.
License: MIT License
Hello, i was trying to implement this wrapper for keychain, but i definitely got some problem working with swift 3 on the new Xcode 8, when trying to reading a key from the keychain.
The problem is related to the (simple) class func load, which gets just the key to perform loading)
In terms of code:
//This line produces the error Ambiguous use of 'load(_:failure:)'
KeyClip.load("my_key")
Just to let you know, i will try to use the load with closure, as it does not produce any error
Thank you for the attention.
Running Carthage 0.8.0 and xcode 6.3.2
I'm constantly running into issues with Keyclip for some reason
The following build commands failed:
CompileSwift normal x86_64 /Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:211:31: error: consecutive statements on a line must be separated by ';'
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:216:15: error: expected 'while' in 'do-while' loop
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:216:31: error: consecutive statements on a line must be separated by ';'
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:216:32: error: expected expression
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:216:43: error: braced block of statements is an unused closure
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:252:46: error: consecutive statements on a line must be separated by ';'
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:257:19: error: expected 'while' in 'do-while' loop
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:257:35: error: consecutive statements on a line must be separated by ';'
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:257:36: error: expected expression
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:257:47: error: braced block of statements is an unused closure
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:301:27: warning: 'failure failure' can be expressed more succinctly as '#failure'
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:322:30: warning: 'status status' can be expressed more succinctly as '#status'
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:327:30: warning: 'error error' can be expressed more succinctly as '#error'
private func failure(error error: NSError, function: String = __FUNCTION__, line: Int = __LINE__, failure: ((NSError) -> Void)?) {
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:216:25: error: type annotation missing in pattern
/Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift:257:29: error: type annotation missing in pattern
A shell task failed with exit code 65:
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 /Users/localstackpro/Github/getclink-ios/Carthage/Checkouts/KeyClip/KeyClip/KeyClip.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
In the 1.3.4 and 1.4 tags, the podspec still has 1.3.3. This is confusing cocoapods when switching between a Swift 2.2 and Swift 3.0 branch.
I'm having problems building KeyClip, and I also can't get it to save any data. When running:
carthage update --platform iOS --no-use-binaries KeyClip
I get:
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/Developer/Library/Frameworks'
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/Developer/Library/Frameworks'
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk/Developer/Library/Frameworks'
ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.0.sdk/Developer/Library/Frameworks'
Cartfile:
github "s-aska/KeyClip" == 1.4.0
I have the following code to produce a Dictionary for KeyClip:
var serialized: [String: String] {
var dict = [
"username": self.username,
"password": self.password
]
if let accessToken = self.accessToken {
dict["accessToken"] = accessToken
}
if let refreshToken = self.refreshToken {
dict["refreshToken"] = refreshToken
}
return dict
}
I use the following to get KeyClip to save the data:
KeyClip.save("fb-account", dictionary: account.serialized as NSDictionary)
I receive the following error:
[KeyClip] function:save(_:data:failure:) line:77 Error Domain=pw.aska.KeyClip Code=-34018 "Refer to SecBase.h for description (status:-34018)" UserInfo={NSLocalizedDescription=Refer to SecBase.h for description (status:-34018)}
This code used to work fine before Xcode 8, and KeyClip 1.4.0
. I was using KeyClip 1.3.4
. This occurs running on Simulator iPhone 6 with both iOS 9.0 and 10.0.
Do you have any idea of what is happening?
Hello. Thanks for KeyClip - it's a great library.
I've just upgraded to Xcode 8 and a bunch of other libraries I use are still working on Swift 3 support, so I'm trying the Swift 2.3 route. However, this library doesn't seem to compile while targeting Swift 2.3.
Cartfile:
github "s-aska/KeyClip" == 1.4.0
Carthage command:
carthage update --platform iOS --toolchain com.apple.dt.toolchain.Swift_2_3 KeyClip
Fails citing a bunch of syntax errors (because it's Swift 3 syntax).
And then:
Cartfile:
github "s-aska/KeyClip" == 1.3.4
Carthage command:
carthage update --platform iOS --toolchain com.apple.dt.toolchain.Swift_2_3 KeyClip
Fails citing ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/Developer/Library/Frameworks'
.
Would you consider a 1.3.5
with support for Swift 2.3 and Xcode 8?
It would be really great if a Podspec was added to take advantage of the package management system Cocoapods. I would be happy to help with a PR, but in the end you will have to register the plugin (which I can walk you through)
I saw that you have a branch for this but it does not compile on Xcode 8 GM
depending on the provisioning profile I use, sometimes this line crashes
https://github.com/s-aska/KeyClip/blob/master/KeyClip/KeyClip.swift#L158
Not sure what I'm doing wrong
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.