Skip to content

Instantly share code, notes, and snippets.

@denniszxxc
denniszxxc / Fastfile
Created February 27, 2020 14:41
Fastlane setup for creating a xcode simulator build (*.app) in a zip
# Fastlane setup for creating a xcode simulator build (*.app) in a zip
# Assume we have
# 1. a `Test_Sim_Build.xcworkspace`
# 2. which contains a `Test_Sim_Build` scheme
# 3. which will output a `Test_Sim_Build.app` file in derived data path `simulator_build_folder`
default_platform(:ios)
platform :ios do
desc "Description of what the lane does"
#!/bin/bash
# Simple bash script to copy current timestamp to clipboard.
TIMESTAMP="$(date +%s)"
echo -n $TIMESTAMP | pbcopy
echo "$TIMESTAMP <- is copied to clipboard"
@denniszxxc
denniszxxc / UIViewController+Instantiate.h
Created November 1, 2016 08:01
Clean way to instantiate UIViewController from UIStoryboard.
#import <UIKit/UIKit.h>
typedef enum : NSUInteger {
XXStoryboardMain,
XXStoryboardDetail,
} XXStoryboardName;
@interface UIViewController (Instantiate)
+ (instancetype)instantiateFromStoryboard:(XXStoryboardName)storyboard;