This file contains hidden or 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
#Pythonista needed | |
import console | |
console.open_in('/System/Library/Caches/com.apple.kernelcaches/kernelcache') | |
print('Done!') |
This file contains hidden or 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
# coding: utf-8 | |
from objutil import * | |
import ui | |
colorpicker = ObjCClass('OMColorPickerViewController').new().autorelease() | |
clview = colorpicker.view() | |
clview.frame = CGRect((0, 0), (512, 512)) | |
view = presentUIView(clview, 'Color Picker', 'sheet') | |
This file contains hidden or 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
# coding: utf-8 | |
from objc_util import NSBundle, ObjCClass, on_main_thread | |
NSBundle.bundleWithPath_('/System/Library/Frameworks/MediaPlayer.framework').load() | |
MPVolumeView = ObjCClass('MPVolumeView') | |
volume_view = MPVolumeView.new().autorelease() | |
@on_main_thread | |
def set_system_volume(value): | |
volume_view.subviews()[0].value = value |
This file contains hidden or 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
# coding: utf-8 | |
from objc_util import * | |
import ui | |
def btnaction(sender): | |
print 'hellah' | |
tabvc=ObjCClass('UIApplication').sharedApplication().keyWindow().rootViewController().childViewControllers()[1] | |
toolbar=tabvc.toolbar() |
This file contains hidden or 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
# coding: utf-8 | |
import os | |
def is_device_jailbroken(): | |
try: | |
os.listdir('/private') | |
except OSError: | |
return False | |
return True |
This file contains hidden or 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
# coding: utf-8 | |
import subprocess | |
jailbroken=True | |
try: | |
subprocess.call(["ls", "-l"]) | |
except OSError: | |
jailbroken=False | |
print 'Is my device jailbroken: '+ str(jailbroken) |
This file contains hidden or 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
# coding: utf-8 | |
from objc_util import * | |
AVAudioSession = ObjCClass('AVAudioSession') | |
shared_session = AVAudioSession.sharedInstance() | |
category_set = shared_session.setCategory_error_('AVAudioSessionCategoryPlayAndRecord', None) | |
settings = ObjCClass('NSMutableDictionary').dictionary() | |
kAudioFormatMPEG4AAC = 1633772320 | |
settings.setObject_forKey_(kAudioFormatMPEG4AAC,'AVFormatIDKey') |
This file contains hidden or 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
# coding: utf-8 | |
from objc_util import * | |
import ctypes | |
import webbrowser | |
def parse_encoding(enc): | |
type_names={'c':'char', | |
'i':'int', | |
's':'short', | |
'l':'long', |
This file contains hidden or 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
# coding: utf-8 | |
from objc_util import * | |
from console import input_alert,hud_alert | |
badgesting = input_alert('App Badge','Not more than 5 charaters') | |
UIApplication.sharedApplication().setApplicationBadgeString_(badgesting[:5]) | |
hud_alert('Badge Set!') |