Swiftpack.co - taka0125/TAKUUID as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by taka0125.
taka0125/TAKUUID 1.6.0
create UUID and store to Keychain library
⭐️ 18
🕓 2 weeks ago
.package(url: "https://github.com/taka0125/TAKUUID.git", from: "1.6.0")

TAKUUID

Generate UUID and save to KeyChain.

Build Status

master

Build Status

How to use

Podfile

pod 'TAKUUID'

or

pod 'TAKUUID', :git => 'https://github.com/taka0125/TAKUUID.git'

Carthage

github "taka0125/TAKUUID"

Project Setting

  • "Keychain Sharing" on

http://stackoverflow.com/questions/20344255/secitemadd-and-secitemcopymatching-returns-error-code-34018-errsecmissingentit/31421742#31421742

Usage

Keychain access group (Optional)

First of all, set keychain access group. Then call findOrCreate.

  • Objective-C
[TAKUUIDStorage sharedInstance].accessGroup = @"12ABCD3E4F.shared";
  • Swift
TAKUUIDStorage.sharedInstance().accessGroup = "12ABCD3E4F.shared"

migrate

after set keychain access group, call migrate method.

  • Objective-C
[[TAKUUIDStorage sharedInstance] migrate];
  • Swift
TAKUUIDStorage.sharedInstance().migrate()

findOrCreate

If UUID already created, return it. If not creating UUID yet, create and return it.

  • Objective-C
NSString *UUID = [[TAKUUIDStorage sharedInstance] findOrCreate];
  • Swift
let UUID = TAKUUIDStorage.sharedInstance().findOrCreate()

renew

renew UUID.

  • Objective-C
NSString *UUID = [[TAKUUIDStorage sharedInstance] renew];
  • Swift
let UUID = TAKUUIDStorage.sharedInstance().renew()

remove

remove UUID from Keychain.

  • Objective-C
BOOL isSuccess = [[TAKUUIDStorage sharedInstance] remove];
  • Swift
let isSuccess = TAKUUIDStorage.sharedInstance().remove()

last error

get last error.

  • Objective-C
OSStatus status = [TAKUUIDStorage sharedInstance].lastErrorStatus;
  • Swift
let status = TAKUUIDStorage.sharedInstance().lastErrorStatus

show error detail from code

$ macerror CODE

GitHub

link
Stars: 18
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Support Swift Package Manager
2 weeks ago

What's Changed

New Contributors

Full Changelog: https://github.com/taka0125/TAKUUID/compare/1.5.0...1.6.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics