Skip to content

Instantly share code, notes, and snippets.

@onlyyoujack
onlyyoujack / Xcode4TestFlightintegration.sh
Created April 9, 2012 05:51 — forked from martijnthe/Xcode4TestFlightintegration.sh
ReWrite of "Xcode 4 scheme Archive step Post-script for automatic TestFlight build uploading. See the blog post here: http://developmentseed.org/blog/2011/sep/02/automating-development-uploads-testflight-xcode"
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
# Inspired by original script by incanus:
# https://gist.github.com/1186990
#
# Rewritten by martijnthe:
# https://gist.github.com/1379127
#
/* Copied, Pasted and summarized from ps' source code.
You can use sysctl to get other process' argv.
*/
#include <sys/sysctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define pid_of(pproc) pproc->kp_proc.p_pid
@onlyyoujack
onlyyoujack / gist:1689218
Created January 27, 2012 15:11 — forked from AdamSwinden/gist:1358867
Using URL scheme to open Settings.app
// Turn on Location Services?
[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]];
// Set up Twitter?
[NSURL URLWithString:@"prefs:root=TWITTER"]];
// Hook up a Bluetooth device?
[NSURL URLWithString:@"prefs:root=General&path=Bluetooth"]];
// Change app settings