Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <Foundation/Foundation.h>
- #import "generated-headers/SwiftTweak-Swift.h"
- @interface Cask (Cask)
- -(void)initPrefs;
- -(void)loadPrefs;
- @end
- Cask * cas = nil;
- void loadPrefs() {
- cas = [[objc_getClass("Cask") alloc] init];
- [cas loadPrefs];
- }
- %ctor{
- CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, (CFNotificationCallback)loadPrefs, CFSTR("com.ryannair05.caskprefs/prefsupdated"), NULL, CFNotificationSuspensionBehaviorCoalesce);
- cas = [[objc_getClass("Cask") alloc] init];
- [cas initPrefs];
- loadPrefs();
- [AutoHookImplementor swiftInit];
- }
Advertisement
Add Comment
Please, Sign In to add comment