Skip to content

Instantly share code, notes, and snippets.

-(void)speciferPerformedAction:(PSSpecifier*)spec
{
SBDeviceLockController *x = [objc_getClass("SBDeviceLockController") sharedController];
if( [x isPasswordProtected] )
{
PSSpecifier *s = [self specifierForID:@"id_force_mode_enabled"];
[self setPreferenceValue:[NSNumber numberWithBool:NO] specifier:s];
[self reloadSpecifier:s];
[[NSUserDefaults standardUserDefaults] synchronize];
}
~/tweaks/pianopasscode (testOverridePasscode) $ make package install
/Users/macbook/tweaks/pianopasscode/theos/makefiles/targets/Darwin/iphone.mk:41: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.
Making all for tweak Pianopasscode...
make[2]: Nothing to be done for `internal-library-compile'.
Making all in pianoprefs...
Making all for bundle PianoPrefs...
Copying resource directories into the bundle wrapper...
make[3]: Nothing to be done for `internal-bundle-compile'.
Making stage for tweak Pianopasscode...
Making stage in pianoprefs...
-(void)setToggle:(BOOL)arg
{
...
[toggleButton removeFromSuperview];
toggleButton = Nil;
if(arg)
{
...
%hook SBUIController
@interface SBIconController : NSObject
+(id)sharedInstance;
@end
@interface SBIconListView : UIView
@end
@interface SBIconListModel : NSObject
include theos/makefiles/common.mk
BUNDLE_NAME = PianoPrefs
PianoPrefs_FILES = PianoPrefs.mm PINSet.mm CustomCell.mm
PianoPrefs_INSTALL_PATH = /Library/PreferenceBundles
PianoPrefs_FRAMEWORKS = UIKit
PianoPrefs_PRIVATE_FRAMEWORKS = Preferences
include $(THEOS_MAKE_PATH)/bundle.mk
#include "Preferences/Preferences.h"
@interface PSTableCell ()
- (id)initWithSpecifier:(PSSpecifier *)specifier;
- (id)initWithStyle:(UITableViewCellStyle)x reuseIdentifier:(id)y specifier:(id)z;
@end
@interface CustomCell : PSTableCell {//<PreferencesTableCustomView> {
UILabel *_label;
}
#import <AudioToolbox/AudioToolbox.h>
#import <AVFoundation/AVFoundation.h>
@interface JWLPiano : UIView <UIGestureRecognizerDelegate>
{
NSString *PIN;
int PINLength;
static UIView *pianoView;
static int count = 0;
static NSString* PIN = @"";
static int PINLength;
@interface key : UIView <UIGestureRecognizerDelegate>
{
UIView *touches;
}
0 CoreFoundation 0x33c98fec __CFStringAppendFormatCore + 2196
1 CoreFoundation 0x33c125e2 _CFStringCreateWithFormatAndArgumentsAux + 70
2 Foundation 0x34521710 +[NSString stringWithFormat:] + 56
3 UIKit 0x35ad6d96 _UICacheNameForImageAtPath + 106
4 UIKit 0x35ad6bc2 _UIImageAtPath + 46
5 ScrollingBoard.dylib 0x019c0dda 0x19bb000 + 24026
6 UIKit 0x35d35a14 -[UIPageControl setNumberOfPages:] + 252
7 ScrollingBoard.dylib 0x019c13be 0x19bb000 + 25534
8 SpringBoard 0x00121d94 0x5000 + 1166740
9 SpringBoard 0x00125cba 0x5000 + 1182906
@jontelang
jontelang / Tweak.xm
Created March 21, 2013 15:19
kill pid
if( [a isRunning] )
{
int pid = [a pid];
NSLog(@"pid: %i", pid);
NSString *cmd = [NSString stringWithFormat:@"kill %i",pid];
NSLog(@"%@",cmd);
const char *command = [cmd UTF8String];
NSLog(@"%s",command);