Skip to content

Instantly share code, notes, and snippets.

View ksuther's full-sized avatar

Kent Sutherland ksuther

View GitHub Profile
//
// Copyright (c) 2012-2013 Cédric Luthi / @0xced. All rights reserved.
//
#if TARGET_IPHONE_SIMULATOR
static const char *fakeCarrier;
static const char *fakeTime;
static int fakeCellSignalStrength = -1;
@ksuther
ksuther / remove_duplicate_profiles.swift
Created April 7, 2016 16:34
Remove duplicate provisioning profiles from MobileDevice
#!/usr/bin/env xcrun swift
// Remove duplicated provisioning profiles in ~/Library/MobileDevice/Provisioning Profiles
// The most recently created profile is kept
// Usage: xcrun swift remove_duplicate_profiles.swift
import Foundation
import Security
let profilesURL = NSURL.fileURLWithPath(("~/Library/MobileDevice/Provisioning Profiles" as NSString).stringByExpandingTildeInPath);