Code Monkey home page Code Monkey logo

fcuuid's Introduction

FCUUID Pod version

iOS UUID library as alternative to the old good UDID and identifierForVendor.

This library provides the simplest API to obtain universally unique identifiers with different persistency levels.
All methods can be called as static methods or via the shared instance.

It's possible to retrieve the UUIDs created for all devices of the same user, in this way with a little bit of server-side help it's possible manage guest accounts across multiple devices easily.

##Requirements & dependencies

  • iOS >= 5.0
  • ARC enabled
  • Key-value storage enabled (target / Capabilities / iCloud / Key-value storage)
  • Security.framework
  • UICKeyChainStore
  • (optional) KeyChain sharing enabled if you need to share the same uuidForDevice / uuidsOfUserDevices values accross multiple apps.

##Installation

####CocoaPods: pod 'FCUUID'

####Manual install:

##Usage setup

  • Add an observer to the FCUUIDsOfUserDevicesDidChangeNotification to be notified about user devices changes.
  • Call [FCUUID sharedInstance] or any other method in applicationDidFinishLaunchingWithOptions to start iCloud sync.

##API All the following methods (excluding the last one) return a different Universally Unique Identifier, each one with its own persistency level.

//changes each time (no persistent)
+(NSString *)uuid;

//changes each time the app gets launched (persistent to session)
+(NSString *)uuidForSession;

//changes each time the app gets installed (persistent to installation)
+(NSString *)uuidForInstallation;

//changes each time all the apps of the same vendor are uninstalled (this works exactly as identifierForVendor)
+(NSString *)uuidForVendor;

//changes only on system reset, this is the best replacement to the good old udid (persistent to device)
+(NSString *)uuidForDevice;

//returns the list of all uuidForDevice of the same user
//in this way it's possible manage guest accounts across multiple devices easily.
+(NSArray *)uuidsOfUserDevices;

Enjoy :)

fcuuid's People

Contributors

fabiocaccamo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.