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/python | |
import sys | |
import argparse | |
import os | |
import subprocess | |
parser = argparse.ArgumentParser(description='Build, archive and push a new iOS app version!') | |
parser.add_argument('-w','--workspace', help='Path to workspace', required=True, default=None) | |
parser.add_argument('-s','--scheme', help='Scheme name to build', required=True, default=None) |
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
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? | |
} | |
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
// This very useful code parses a `.json` file using the library SwiftyJSON. | |
// Add this in a class, maybe in your Data Manager: | |
class func addDefaultEntities() { | |
if let file = NSBundle(forClass:AppDelegate.self).pathForResource(JSON.Constants.FileName, ofType: JSON.Constants.Type) { | |
if let data = NSData(contentsOfFile: file) { | |
for (index: String, bookJSON: JSON) in JSON(data:data) { | |
let dict = bookJSON.dictionaryObject | |
// do something with the dictionary | |
} |
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
// | |
// UIImage+Autoresize.h | |
// UIImage+Autoresize | |
// | |
// Created by kevin delord on 24/04/14. | |
// Copyright (c) 2014 Kevin Delord. All rights reserved. | |
// | |
// Full library and documentation here: https://github.com/kevindelord/UIImage-Autoresize | |
// | |
#ifndef UIImage_Autoresize_h__ |