Skip to content

Instantly share code, notes, and snippets.

View alexkent's full-sized avatar

alex kent alexkent

  • Bontouch
  • Östersund
View GitHub Profile
var iExist:String?
var s:[String:Any] = [String:Any]()
s["thing"] = 2
if let x = s["thing"] {
iExist = x
}
// explicit cast x
workspace 'Everything.xcworkspace'
platform :ios, "7.0"
xcodeproj './App/My App.xcodeproj'
xcodeproj './Framework1/Framework1.xcodeproj'
xcodeproj './Framework2/Framework2.xcodeproj'
#### Application
@alexkent
alexkent / trivialCertValidator
Last active August 29, 2015 14:04
This is probably a bad idea, but I am not sure why: SSL pinning by comparing certificate data.
- (id)initWithCertificatePath:(NSString *)path
{
self = [super init];
if (self) {
_certData = [NSData dataWithContentsOfFile:path];
}
return self;
}
- (void)validateChallenge:(NSURLAuthenticationChallenge *)challenge {