This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//AppDelegate: | |
func application(application: UIApplication, supportedInterfaceOrientationsForWindow window: UIWindow?) -> Int { | |
var presentedVC = application.keyWindow?.rootViewController | |
while let pVC = presentedVC?.presentedViewController | |
{ | |
presentedVC = pVC | |
} | |
if let pVC = presentedVC | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
volumeName="sdextend" | |
volume=`mount | grep "$volumeName" | sed 's/.*\(disk[0-9]s.\).*/\1/'` | |
if [ -n "$volume" ]; then | |
# force quit apps here | |
/usr/sbin/diskutil unmount force $volume | |
/usr/sbin/diskutil eject $volume |