Skip to content

Instantly share code, notes, and snippets.

@nicked
nicked / TypeEncoding.h
Created July 5, 2020 15:22
Wrapper for Objective-C type encodings
@import Foundation;
typedef NS_ENUM(unichar, EncodedType) {
TypeChar = 'c',
TypeInt = 'i',
TypeShort = 's',
TypeLong = 'l', // note long encodes to q on 64 bit
TypeLongLong = 'q',
TypeUnsignedChar = 'C',
TypeUnsignedInt = 'I',
@nicked
nicked / ClassProperty.h
Last active May 22, 2020 06:56
Wrapper for Objective-C runtime property functions
@import Foundation;
@import ObjectiveC.runtime;
typedef NS_ENUM(char, SetterType) {
Assign, Strong, Weak, Copy
};
@interface ClassProperty : NSObject
@nicked
nicked / makepass.php
Created June 13, 2012 08:30
A PHP script for packaging up an iOS 6 Passbook file
<?
DEFINE('BASE_PATH', '.');
//relative to where you are running this script from. All paths below are relative to this
DEFINE('P12_FILE', 'My Certificate.p12');
//your Pass Certificate, exported from Keychain Access as a P12 file
DEFINE('P12_PASSWORD', '');
//if you exported your P12 with a password, enter it here