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
https://developer.apple.com/wwdc/videos/ | |
* 100 - Keynote | |
* 101 - Platforms State of the Union | |
* 102 - Apple Design Awards | |
* 109 - Painting the Future (MARI on OS X) | |
* 200 - Accessibility in OS X | |
* 201 - Building User Interfaces for iOS 7 | |
* 202 - Accessibility in iOS | |
* 203 - What's New in Cocoa Touch |
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
- (UIView *)findKeyboard | |
{ | |
// Locate non-UIWindow. | |
UIWindow *keyboardWindow = nil; | |
for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) { | |
if (![[testWindow class] isEqual:[UIWindow class]]) { | |
keyboardWindow = testWindow; | |
break; | |
} | |
} |
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
#!/usr/bin/env ruby | |
# crashlytics.rb | |
# | |
# Created by Ben Chatelain on 5/13/14. | |
# Alternate values make much of this script testable from outside Xcode | |
if ARGV.length > 0 | |
args = ARGV.join(" ") | |
else |
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
tmpdir=/tmp/phatblat-images | |
subdir=images/ | |
remote_git=git://github.com/phatblat/phatblat.github.io.git | |
remote_https=https://github.com/phatblat/phatblat.github.io.git | |
mkdir $tmpdir | |
cd $tmpdir | |
git init | |
git remote add -f origin $remote_git || \ | |
git remote set-url origin $remote_https && \ |
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
Pod::Spec.new do |s| | |
s.name = 'POD_NAME' | |
s.version = '1.0.0' | |
s.license = { :type => 'MIT', :file => 'LICENSE' } | |
s.summary = 'Example of pod which installs a run script into the Xcode project (first target)' | |
s.homepage = 'https://github.com/phatblat/POD_NAME' | |
s.authors = { 'Ben Chatelain' => 'benchatelain@gmail.com' } | |
s.source = { :git => 'https://github.com/phatblat/POD_NAME.git', :tag => s.version.to_s } | |
s.ios.deployment_target = '6.0' |
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
size_t size; | |
sysctlbyname("hw.machine", NULL, &size, NULL, 0); | |
char *machine = calloc(1, size); | |
if (machine) { | |
sysctlbyname("hw.machine", machine, &size, NULL, 0); | |
NSLog(@"modelIdentifier: %@", @(machine)); | |
free(machine); | |
} |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Fabric</key> | |
<dict> | |
<key>APIKey</key> | |
<string>xxxxxxxxxxxx</string> | |
<key>Kits</key> | |
<array> |
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
#import <git2/common.h> | |
NSString *const CACertificateFile_DigiCert = @"DigiCert High Assurance EV Root CA.pem"; | |
NSString *const certFilePath = [[NSBundle mainBundle].bundlePath stringByAppendingPathComponent:CACertificateFile_DigiCert]; | |
NSLog(@"Loading certificate: %@", certFilePath); | |
const char *file = certFilePath.UTF8String; | |
const char *path = NULL; | |
int returnValue = git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, file, path); |
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
NSBundle *bundle = [NSBundle mainBundle]; | |
if ([[bundle.bundleURL pathExtension] isEqualToString:@"appex"]) { | |
// Peel off two directory levels - MY_APP.app/PlugIns/MY_APP_EXTENSION.appex | |
bundle = [NSBundle bundleWithURL:[[bundle.bundleURL URLByDeletingLastPathComponent] URLByDeletingLastPathComponent]]; | |
} | |
NSURL *url = [bundle URLForResource:... withExtension:...]; |
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
#pragma mark - App Singleton | |
- (instancetype)init { | |
... | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(userDefaultsDidChange:) name:NSUserDefaultsDidChangeNotification object:nil]; | |
... | |
} | |
- (void)dealloc { | |
[[NSNotificationCenter defaultCenter] removeObserver:self]; |