This file contains hidden or 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
| @interface CrashManager:NSObject | |
| /** | |
| * Generates live crash report, without triggering an actual crash condition. | |
| * | |
| * Works only if the vendor SDK is built using PLCrashReporter v 1.1 atleast. | |
| * We are using runtime magic to call generateLiveReportAndReturnError: method on PLCrashReporter instance without changing vendor sdk (QuincyKit, HockeyApp, others) | |
| */ | |
| - (void)generateLiveReport; | |
| @end |
This file contains hidden or 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
| #import "PLCrashReporterConfig.h" | |
| #import "PLCrashReporter.h" | |
| #import "PLCrashReport.h" | |
| #import "PLCrashReportTextFormatter.h" | |
| - (void)watchdog | |
| { | |
| NSTimeInterval pingInterval = 1.0/60.0; | |
| NSTimeInterval watchdogInterval = 1.0/30.0; |
This file contains hidden or 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
| expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) ) |
This file contains hidden or 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
| AFJSONRequestOperation *operationJSON = [AFJSONRequestOperation | |
| JSONRequestOperationWithRequest:requestJSON | |
| success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { | |
| NSMutableArray *results = [JSON valueForKey:@"results"]; | |
| // UPDATED CODE | |
| for (id obj in [results valueForKey:@"value"]) { | |
| if (![items containsObject:obj]) { | |
| [items addObject:obj]; |
This file contains hidden or 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
| // | |
| // CCamera.h | |
| // CCamera | |
| // | |
| // Created by Jonathan Wight on 7/12/12. | |
| // Copyright (c) 2012 Jonathan Wight. All rights reserved. | |
| // | |
| #import <Foundation/Foundation.h> |
This file contains hidden or 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
| UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"Alert Message" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; | |
| alert.alertViewStyle = UIAlertViewStylePlainTextInput; | |
| [alert textFieldAtIndex:0].borderStyle = UITextBorderStyleRoundedRect; | |
| [alert show]; |
This file contains hidden or 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
| #import <Foundation/Foundation.h> | |
| @interface NSNotificationCenter (ObserverAdditions) | |
| - (void)registerObserver:(id)observer | |
| forName:(NSString *)name | |
| object:(id)obj | |
| queue:(NSOperationQueue *)queue | |
| usingBlock:(void (^)(NSNotification *note))block; |
This file contains hidden or 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
| @interface DownloadOperation : NSOperation | |
| { | |
| NSURLRequest *request; | |
| NSURLConnection *connection; | |
| NSMutableData *receivedData; | |
| } | |
| @property(readonly) BOOL isExecuting; | |
| @property(readonly) BOOL isFinished; |
This file contains hidden or 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
| - (void)setValue:(NSString *)aValue | |
| { | |
| if (value != aValue) | |
| { | |
| [value release]; | |
| value = [aValue retain]; | |
| } | |
| } |