alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
# THIS DOESNT WORK YET: xcbuild openIDEConsole # … then switch to Xcode ➡️
xcbuild showSpecs
xcbuild build <foo.pif> [—target <target>]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Fool'n'Lazy-Proof iOS .crash Symbolication | |
# | |
# Just run this script on a folder with your `.ipa`, the corresponding `.dSYM`, | |
# and (1+) `.crash` files. Will output symbolicated `sym-*.crash`es for you. | |
# | |
# Copyright (c) 2016 Ferran Poveda (@fbeeper) | |
# Provided under MIT License (MIT): http://choosealicense.com/licenses/mit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See http://nshipster.com/key-value-observing/ | |
// Put this code a common utilities header, and use it to have the compiler help check correctness of key paths. | |
// Uses macro stringification to create an Obj-C string literal, plus validation code that the compiler optimizes out. | |
@interface NSObject (KeyPathFakeCategoryForCompilerWarnings) | |
+ (instancetype)__fake_method_for_compiler_warnings__; | |
- (instancetype)__fake_method_for_compiler_warnings__; | |
@end | |
/*! Returns a string for the given keypath, but causes a compiler warning if the keypath is not defined on \c self. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Provides the ability to verify key paths at compile time. | |
If "keyPath" does not exist, a compile-time error will be generated. | |
Example: | |
// Verifies "isFinished" exists on "operation". | |
NSString *key = SQKeyPath(operation, isFinished); | |
// Verifies "isFinished" exists on self. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static Boolean PSPDFCaseInsensitiveEqualCallback(const void *a, const void *b) { | |
id objA = (__bridge id)a, objB = (__bridge id)b; | |
Boolean ret = FALSE; | |
if ([objA isKindOfClass:NSString.class] && [objB isKindOfClass:NSString.class]) { | |
ret = ([objA compare:objB options:NSCaseInsensitiveSearch|NSLiteralSearch] == NSOrderedSame); | |
}else { | |
ret = [objA isEqual:objB]; | |
} | |
return ret; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef enum _UIBackgroundStyle { | |
UIBackgroundStyleDefault, | |
UIBackgroundStyleTransparent, | |
UIBackgroundStyleLightBlur, | |
UIBackgroundStyleDarkBlur, | |
UIBackgroundStyleDarkTranslucent | |
} UIBackgroundStyle; | |
@interface UIApplication (UIBackgroundStyle) | |
-(void)_setBackgroundStyle:(UIBackgroundStyle)style; |
Generate the list yourself:
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./* | \
sed 's/NS_AVAILABLE_IOS(.*)//g' | \
sed 's/NS_DEPRECATED_IOS(.*)//g' | \
sed 's/API_AVAILABLE(.*)//g' | \
sed 's/API_UNAVAILABLE(.*)//g' | \
sed 's/UI_APPEARANCE_SELECTOR//g' | \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Property Nonatomic Strong | |
// Platform: All | |
// Completion Scopes: ClassInterfaceMethods | |
@property (nonatomic, strong) <# class_name #> *<# variable_name #>; |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
NewerOlder