Latest 1.5.0
Homepage https://github.com/taka0125/TAKUUID
License MIT
Platforms ios 6.0, requires ARC
Authors

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

Latest podspec

{
    "name": "TAKUUID",
    "version": "1.5.0",
    "license": "MIT",
    "summary": "create UUID and store to Keychain library",
    "homepage": "https://github.com/taka0125/TAKUUID",
    "authors": {
        "Takahiro Ooishi": "[email protected]"
    },
    "source": {
        "git": "https://github.com/taka0125/TAKUUID.git",
        "tag": "1.5.0"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "6.0"
    },
    "ios": {
        "frameworks": "Security"
    },
    "public_header_files": "Classes/*.h",
    "source_files": "Classes/*.{h,m}"
}

Pin It on Pinterest

Share This