fix for modern times
This commit is contained in:
parent
aa6faf605e
commit
945ecccc89
|
@ -1,3 +1,6 @@
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
@interface AAAppIconCell: UITableViewCell
|
@interface AAAppIconCell: UITableViewCell
|
||||||
|
|
||||||
@property (nonatomic, retain) UIImageView *appIconImageView;
|
@property (nonatomic, retain) UIImageView *appIconImageView;
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#import "AAConfigurationViewControllerDelegate.h"
|
#import "AAConfigurationViewControllerDelegate.h"
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
@interface AAConfigurationViewController: UIViewController
|
@interface AAConfigurationViewController: UIViewController
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@protocol AAConfigurationViewControllerDelegate <NSObject>
|
@protocol AAConfigurationViewControllerDelegate <NSObject>
|
||||||
|
|
||||||
-(void)saveAndRunAction:(int)action;
|
-(void)saveAndRunAction:(int)action;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#import "AACoreDataStack.h"
|
#import "AACoreDataStack.h"
|
||||||
#import <CoreData/CoreData.h>
|
#import <CoreData/CoreData.h>
|
||||||
|
#import <rootless.h>
|
||||||
|
|
||||||
@interface AACoreDataStack ()
|
@interface AACoreDataStack ()
|
||||||
|
|
||||||
|
@ -16,11 +17,11 @@
|
||||||
|
|
||||||
-(id)init {
|
-(id)init {
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
NSURL *url = [NSURL fileURLWithPath:@"/Library/PreferenceBundles/AutoAlertsPreferences.bundle/AutoAlerts.momd"];
|
NSURL *url = [NSURL fileURLWithPath:ROOT_PATH_NS(@"/Library/PreferenceBundles/AutoAlertsPreferences.bundle/AutoAlerts.momd")];
|
||||||
|
|
||||||
NSManagedObjectModel *model = [[[NSManagedObjectModel alloc] initWithContentsOfURL:url] autorelease];
|
NSManagedObjectModel *model = [[[NSManagedObjectModel alloc] initWithContentsOfURL:url] autorelease];
|
||||||
|
|
||||||
NSString *dir = @"/var/mobile/Library/Preferences/AutoAlerts/";
|
NSString *dir = ROOT_PATH_NS(@"/var/mobile/Library/Preferences/AutoAlerts/");
|
||||||
|
|
||||||
BOOL isSpringBoard = [[NSBundle mainBundle].bundleIdentifier isEqual:@"com.apple.springboard"];
|
BOOL isSpringBoard = [[NSBundle mainBundle].bundleIdentifier isEqual:@"com.apple.springboard"];
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#import "Model/AAAlertInfo.h"
|
#import "Model/AAAlertInfo.h"
|
||||||
#import "AAConfigurationViewControllerDelegate.h"
|
#import "AAConfigurationViewControllerDelegate.h"
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
@interface UIAlertController () <AAConfigurationViewControllerDelegate>
|
@interface UIAlertController () <AAConfigurationViewControllerDelegate>
|
||||||
|
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -1,6 +1,10 @@
|
||||||
include $(THEOS)/makefiles/common.mk
|
export THEOS_PACKAGE_SCHEME = rootless
|
||||||
|
export ARCHS = arm64 arm64e
|
||||||
|
export TARGET = iphone:14.5:14.0
|
||||||
|
export GO_EASY_ON_ME = 1
|
||||||
|
export COPYFILE_DISABLE=1
|
||||||
|
|
||||||
ARCHS = arm64 arm64e
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|
||||||
TWEAK_NAME = AutoAlerts
|
TWEAK_NAME = AutoAlerts
|
||||||
AutoAlerts_FILES = Tweak.xm AAConfigurationViewController.xm AAAppIconCell.m Model/AAAlertInfo.m AACoreDataStack.m AAAlertManager.m
|
AutoAlerts_FILES = Tweak.xm AAConfigurationViewController.xm AAAppIconCell.m Model/AAAlertInfo.m AACoreDataStack.m AAAlertManager.m
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
@interface AAAlertInfo: NSObject
|
@interface AAAlertInfo: NSObject
|
||||||
|
|
||||||
@property (nonatomic, retain) NSArray<NSString *> *actions;
|
@property (nonatomic, retain) NSArray<NSString *> *actions;
|
||||||
|
|
12
Tweak.xm
12
Tweak.xm
|
@ -1,6 +1,7 @@
|
||||||
#import "AutoAlerts.h"
|
#import "AutoAlerts.h"
|
||||||
#import "AAConfigurationViewController.h"
|
#import "AAConfigurationViewController.h"
|
||||||
#import "AAAlertManager.h"
|
#import "AAAlertManager.h"
|
||||||
|
#import <rootless.h>
|
||||||
|
|
||||||
extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void);
|
extern "C" CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void);
|
||||||
|
|
||||||
|
@ -292,15 +293,8 @@ static void *sbObserver = NULL;
|
||||||
%ctor {
|
%ctor {
|
||||||
BOOL isSpringBoard = [[NSBundle mainBundle].bundleIdentifier isEqual:@"com.apple.springboard"];
|
BOOL isSpringBoard = [[NSBundle mainBundle].bundleIdentifier isEqual:@"com.apple.springboard"];
|
||||||
|
|
||||||
if (isSpringBoard) {
|
NSDictionary *prefsDict = [NSDictionary dictionaryWithContentsOfFile:ROOT_PATH_NS(@"/var/mobile/Library/Preferences/com.shiftcmdk.autoalertspreferences.plist")];
|
||||||
NSUserDefaults *defaults = [[[NSUserDefaults alloc] initWithSuiteName:@"com.shiftcmdk.autoalertspreferences"] autorelease];
|
autoAlertsEnabled = !prefsDict || [prefsDict objectForKey:@"enabled"] == nil || [[prefsDict objectForKey:@"enabled"] boolValue];
|
||||||
|
|
||||||
autoAlertsEnabled = [defaults objectForKey:@"enabled"] == nil || [defaults boolForKey:@"enabled"];
|
|
||||||
} else {
|
|
||||||
NSDictionary *prefsDict = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.shiftcmdk.autoalertspreferences.plist"];
|
|
||||||
|
|
||||||
autoAlertsEnabled = !prefsDict || [prefsDict objectForKey:@"enabled"] == nil || [[prefsDict objectForKey:@"enabled"] boolValue];
|
|
||||||
}
|
|
||||||
|
|
||||||
[[AAAlertManager sharedManager] initialize];
|
[[AAAlertManager sharedManager] initialize];
|
||||||
|
|
||||||
|
|
4
control
4
control
|
@ -1,10 +1,10 @@
|
||||||
Package: com.shiftcmdk.autoalerts
|
Package: com.shiftcmdk.autoalerts
|
||||||
Name: AutoAlerts
|
Name: AutoAlerts
|
||||||
Depends: mobilesubstrate
|
Depends: mobilesubstrate
|
||||||
Version: 1.0.2
|
Version: 1.0.2-fix
|
||||||
Architecture: iphoneos-arm
|
Architecture: iphoneos-arm
|
||||||
Description: Automate alert actions.
|
Description: Automate alert actions.
|
||||||
Maintainer: shiftcmdk
|
Maintainer: mostm
|
||||||
Author: shiftcmdk
|
Author: shiftcmdk
|
||||||
Section: Tweaks
|
Section: Tweaks
|
||||||
Depiction: https://shiftcmdk.github.io/repo/depictions/?p=com.shiftcmdk.autoalerts
|
Depiction: https://shiftcmdk.github.io/repo/depictions/?p=com.shiftcmdk.autoalerts
|
||||||
|
|
Loading…
Reference in New Issue