Skip to content

Instantly share code, notes, and snippets.


Delord Kévin kevindelord

View GitHub Profile
kevindelord /
Created Sep 7, 2015
Build, archive and push a new iOS app version
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)
kevindelord / etag
Last active Jun 10, 2020
How to integrate Etag in Swift
View etag
let API_HEADER_FIELD_NONE_MATCH : String = "If-None-Match"
let API_HEADER_FIELD_ETAG : String = "Etag"
func ETagForURL(urlString: String) -> String? {
// return the saved ETag value for the given URL
return NSUserDefaults.standardUserDefaults().objectForKey(urlString) as String?
View How_To_SwiftyJSON
// 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
kevindelord / UIImage+Autoresize.h
Last active Jun 6, 2016
UIImage extension to automatically generate a valid UIImage on iPhone using an asset corresponding to the actual device screen size. If needed, this code will add the following image suffix: @2x, -568h@2x, -667h@2x, @3x.
View UIImage+Autoresize.h
// 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:
#ifndef UIImage_Autoresize_h__
You can’t perform that action at this time.