Skip to content

Instantly share code, notes, and snippets.

@kzim44
kzim44 / alternate_main.m
Created July 3, 2014 00:54
Alternate AppDelegate for XCTest
//I had a need to use a different app delegate in Convene’s XCTest suite today, so I took the time to figure out how to do it.  Quite simple really:
//Switch your main.m to:
@autoreleasepool {
BOOL runningTests = NSClassFromString(@"XCTestCase") != nil;
if (!runningTests) {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([CVNAppDelegate class]));
} else {
return UIApplicationMain(argc, argv, nil, @"CVNTestAppDelegate");
@amitsaxena
amitsaxena / gist:8601424
Last active October 18, 2019 21:51
CustomURL: Launch app if app is installed, else open an alternate URL (iOS all browsers)
<script type="text/javascript">
var timer;
var heartbeat;
var lastInterval;
function clearTimers() {
clearTimeout(timer);
clearTimeout(heartbeat);
}
@lucashungaro
lucashungaro / links.textile
Created August 14, 2010 16:36
Links de referência utilizados em minha palestra