Skip to content

Instantly share code, notes, and snippets.

import UIKit
let appDelegateClass: AnyClass? = NSClassFromString("TEST_TARGET.TestingAppDelegate") ? AppDelegate.self
let args = UnsafeMutableRawPointer(CommandLine.unsafeArgv).bindMemory(to: UnsafeMutablePointer<Int8>.self, capacity: Int(CommandLine.argc))
UIApplicationMain(CommandLine.argc, args, nil, NSStringFromClass(appDelegateClass!))
stage('ios') {
}
# Created by https://www.gitignore.io/api/xcode
### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
fastlane_version "2.49.0"
default_platform :ios
platform :ios do
before_all do
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
end
# =========== Setup Git Hooks ==========
ln -s ./Hooks/prepare-commit-msg ../.git/hooks/prepare-commit-msg
ln -s ./Hooks/pre-commit ../.git/hooks/pre-commit
chmod +x ./Hooks/*
#!/bin/bash
LINT=$(which swiftlint)
if [[ -e "${LINT}" ]]; then
echo "SwiftLint Start..."
else
echo "SwiftLint does not exist, download from https://github.com/realm/SwiftLint"
exit 1
fi
$LINT lint --quiet
#!/bin/bash
#
# Automatically adds branch name to every commit message.
#
value=`cat $1`
type="$( cut -d ':' -f 1 <<< "$value" )"
contains=$(echo ${typeList[@]} | grep -o type | wc -w)
if [ contains -eq 0 ]; then
return 1
fi
+ (void)load {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSError *error;
BOOL result = [[self class] jr_swizzleMethod:@selector(text) withMethod:@selector(swizzleName) error:&error];
if (!result || error) {
NSLog(@"Can't swizzle methods - %@", [error description]);
}
});
}
#import <kiwi.h>
#import <SomeClass.h>
SPEC_BEGIN(SomeClass)
describe(@"The SomeClass", ^{
__block Someclass *sut;
beforeAll(^{
//Nothing to do here
});
cask_args appdir: "/Applications"
tap "caskroom/cask"
brew "mas"
brew "openssl"
tap "sublime"
tap "chrome"
tap "sourcetree"
mas "Xcode", id: 497799835