Skip to content

Instantly share code, notes, and snippets.

iOS Keychain - iTunes backup vs iCloud sync

Helper guide to help understand when data gets backedup/synced

My use case: Switching from [UIDevice uniqeIdentifier] to a UUID + Keychain approach.

  • Apple no longer supports [UIDevice uniqueIdentifier] and does not allow app submission to the App store. My requirements are 1) UUID is to persist on the device ONLY 2) UUID is not to be synced or backed up across devices. 3) Works on iOS6 and up

UDID alternative availability

|Availability|iOS 2|iOS 3|iOS 4|iOS 5|iOS 6|iOS 7|iOS 8|

@Valar-Morghulis
Valar-Morghulis / PSPDFUIKitMainThreadGuard.m
Created April 17, 2016 09:15 — forked from steipete/PSPDFUIKitMainThreadGuard.m
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
#import <objc/runtime.h>
#import <objc/message.h>
// Compile-time selector checks.