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
$ sudo pip install jsonpretty | |
Downloading/unpacking jsonpretty | |
Downloading JSONPretty-1.0.0.tar.gz | |
Running setup.py egg_info for package jsonpretty | |
Requirement already satisfied (use --upgrade to upgrade): simplejson in /Library/Python/2.7/site-packages (from jsonpretty) | |
Installing collected packages: jsonpretty | |
Running setup.py install for jsonpretty | |
Installing jsonpretty script to /usr/local/bin |
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
__block BOOL done = NO; | |
[userService updateUser:user | |
completionHandler:^(NSError* error) { | |
STAssertNil( error, @"error: %@", error ); | |
done = YES; | |
}]; | |
TEST_WAIT_UNTIL_TRUE(done); |
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
[exportSession exportAsynchronouslyWithCompletionHandler:^{ | |
NSLog( @"exported to %@", [exportSession.outputURL path] ); | |
}]; | |
TEST_WAIT_UNTIL_TRUE( (exportSession.status == AVAssetExportSessionStatusCancelled || | |
exportSession.status == AVAssetExportSessionStatusFailed || | |
exportSession.status == AVAssetExportSessionStatusCompleted) ); | |
STAssertTrue( exportSession.status == AVAssetExportSessionStatusCompleted, @"export failed" ); |
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
dispatch_async(_renderQueue, ^{ | |
[exportSession exportAsynchronouslyWithCompletionHandler:^{ | |
LOG_DEBUG( @"exported to %@", [exportSession.outputURL path] ); | |
}]; | |
}); | |
TEST_WAIT_UNTIL_TRUE( (exportSession.status == AVAssetExportSessionStatusCancelled || | |
exportSession.status == AVAssetExportSessionStatusFailed || | |
exportSession.status == AVAssetExportSessionStatusCompleted) ); |
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
#define TEST_WAIT_UNTIL_TRUE_SLEEP_SECONDS (0.25) | |
#define TEST_WAIT_UNTIL_TRUE(expr) \ | |
while( (expr) == NO ) [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:TEST_WAIT_UNTIL_TRUE_SLEEP_SECONDS]]; |
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
// don't do this | |
deviceToken = [[[[deviceToken description] | |
stringByReplacingOccurrencesOfString: @"<" withString: @""] | |
stringByReplacingOccurrencesOfString: @">" withString: @""] | |
stringByReplacingOccurrencesOfString: @" " withString: @""]; | |
// do this | |
NSString* deviceTokenStr = [[[[deviceToken description] | |
stringByReplacingOccurrencesOfString: @"<" withString: @""] | |
stringByReplacingOccurrencesOfString: @">" withString: @""] |
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
#define SYNTHESIZE_DUMMY_CLASS(C) \ | |
@interface Dummy_##C : NSObject \ | |
@end \ | |
@implementation Dummy_##C : NSObject \ | |
@end |
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
PUBLIC_HEADERS_FOLDER_PATH = include/$(PROJECT_NAME) | |
INSTALL_PATH = /../BuildProductsPath/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/ | |
OTHER_LDFLAGS = -ObjC |
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
scheduledTimerWithTimeInterval |
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
rights |