One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
ACTION | |
AD_HOC_CODE_SIGNING_ALLOWED | |
ALTERNATE_GROUP | |
ALTERNATE_MODE | |
ALTERNATE_OWNER | |
ALWAYS_SEARCH_USER_PATHS | |
ALWAYS_USE_SEPARATE_HEADERMAPS | |
APPLE_INTERNAL_DEVELOPER_DIR | |
APPLE_INTERNAL_DIR | |
APPLE_INTERNAL_DOCUMENTATION_DIR |
#!/usr/bin/env python | |
import ssl | |
import json | |
import socket | |
import struct | |
import binascii | |
def send_push_message(token, payload): | |
# the certificate file generated from Provisioning Portal |
# include <sys/types.h> | |
# include <sys/socket.h> | |
# include <ifaddrs.h> | |
# include <arpa/inet.h> | |
# include <netinet/in.h> | |
// Bad dirty quick functions written by hot fingers: | |
char* ipToStr(sockaddr* addr) { | |
static char ip[32]; |
1. Open Terminal | |
2. cd to your Xcode project | |
3. Execute the following when inside your target project: | |
find . -name "*.swift" -print0 | xargs -0 wc -l |
let API_HEADER_FIELD_NONE_MATCH : String = "If-None-Match" | |
let API_HEADER_FIELD_ETAG : String = "Etag" | |
let API_REQUEST_SUCCESS : Int = 200 | |
func ETagForURL(urlString: String) -> String? { | |
// return the saved ETag value for the given URL | |
return NSUserDefaults.standardUserDefaults().objectForKey(urlString) as String? | |
} | |
// UIWebView | |
{ | |
UIWebView *webView = [[UIWebView alloc] init]; | |
[webView loadHTMLString:@"<html></html>" baseURL:nil]; | |
NSString *appName = [webView stringByEvaluatingJavaScriptFromString:@"navigator.appName"]; | |
NSLog(@"%@", appName); | |
// Netscape | |
NSString *userAgent = [webView stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"]; |
import Cocoa | |
@objc | |
class SomeTextStorage: NSTextStorage { | |
private var storage: NSMutableAttributedString | |
override init() { | |
storage = NSMutableAttributedString(string: "", attributes: nil) | |
super.init() |
import Foundation | |
extension NSDate { | |
class func dateFromISO8601String(string: String?) -> NSDate? { | |
guard let string = string else { | |
return nil | |
} | |
var tm = Darwin.tm() |