Skip to content

Instantly share code, notes, and snippets.

View daveverwer's full-sized avatar

Dave Verwer daveverwer

View GitHub Profile
@daveverwer
daveverwer / torn.txt
Created December 12, 2012 18:06
I'm torn...
I'm torn…
Whether to add features to a shipping app as a result of customer
feature requests is always an interesting one. I am certainly not a
fan of blindly adding every requested feature to an application but
I am definitely not one to completely ignore feedback from our wise
(and attractive) users.
You might have guessed that this is not a theoretical problem I am
talking about so let's talk specifics.
@daveverwer
daveverwer / build.rb
Created September 7, 2011 14:10
Ruby script to replace an iOS settings bundle depending on the DEBUG/RELEASE build configuration flag.
configuration = ENV["CONFIGURATION"]
project_dir = ENV["PROJECT_DIR"]
settings_bundle = "#{project_dir}/Resources/Settings.bundle"
plist_location = "#{project_dir}/Resources/SettingPlists"
release_or_debug = ENV["CONFIGURATION"] == "Debug" ? "Debug" : "Release"
settings_plist = "#{plist_location}/SettingsRoot#{release_or_debug}.plist"
system("cp #{settings_plist} #{settings_bundle}/Root.plist");
system("touch #{settings_bundle}/Root.plist");
- (void)saveScreenshotToDocumentsDirectory
{
CGSize imageSize = [[UIScreen mainScreen] bounds].size;
if (NULL != UIGraphicsBeginImageContextWithOptions)
UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0);
else UIGraphicsBeginImageContext(imageSize);
CGContextRef context = UIGraphicsGetCurrentContext();
for (UIWindow *window in [[UIApplication sharedApplication] windows]) {
if (![window respondsToSelector:@selector(screen)] || [window screen] == [UIScreen mainScreen]) {
@daveverwer
daveverwer / method.m
Created October 24, 2011 10:52 — forked from richardjkeys/method.m
Block Method Call Example
- (void) buyFeature:(NSString*) featureId onComplete:(void (^)(NSString*)) completionBlock onCancelled:(void (^)(void)) cancelBlock;
//method call
[[MKStoreKit sharedManager] buyFeature:[product objectForKey:@"identifier"]
onComplete:^ (NSString *something) {
NSLog(@"Transaction Complete");
} onCancelled:^ {
NSLog(@"Purchase Cancelled");
}];
@daveverwer
daveverwer / keybase.md
Created June 25, 2014 12:48
Keybase Verification

Keybase proof

I hereby claim:

  • I am daveverwer on github.
  • I am daveverwer (https://keybase.io/daveverwer) on keybase.
  • I have a public key whose fingerprint is 3B13 E451 D093 9EF4 AAE8 4268 2CD5 B6EE 2BB8 CEFC

To claim this, I am signing this object: