Automate alert actions on iOS.
Go to file
Levent Duivel 6eadff4a7e Added update_repo.sh 2024-11-10 05:44:41 +05:00
Model fix for modern times 2024-11-10 05:42:51 +05:00
autoalertspreferences Properly configure action sheets for iPads 2019-08-02 11:36:47 +02:00
.gitignore Initial commit 2019-07-28 18:48:02 +02:00
AAAlertManager.h Initial commit 2019-07-28 18:48:02 +02:00
AAAlertManager.m Initial commit 2019-07-28 18:48:02 +02:00
AAAppIconCell.h fix for modern times 2024-11-10 05:42:51 +05:00
AAAppIconCell.m Add support for dark mode on iOS 13 2020-05-27 21:20:08 +02:00
AAConfigurationViewController.h fix for modern times 2024-11-10 05:42:51 +05:00
AAConfigurationViewController.xm Add support for dark mode on iOS 13 2020-05-27 21:20:08 +02:00
AAConfigurationViewControllerDelegate.h fix for modern times 2024-11-10 05:42:51 +05:00
AACoreDataStack.h Initial commit 2019-07-28 18:48:02 +02:00
AACoreDataStack.m fix for modern times 2024-11-10 05:42:51 +05:00
AADataStore.h Initial commit 2019-07-28 18:48:02 +02:00
AutoAlerts.h fix for modern times 2024-11-10 05:42:51 +05:00
AutoAlerts.plist Initial commit 2019-07-28 18:48:02 +02:00
LICENSE Initial commit 2019-07-28 18:48:02 +02:00
Makefile fix for modern times 2024-11-10 05:42:51 +05:00
README.md Initial commit 2019-07-28 18:48:02 +02:00
Tweak.xm fix for modern times 2024-11-10 05:42:51 +05:00
control fix for modern times 2024-11-10 05:42:51 +05:00
mail_action.PNG Initial commit 2019-07-28 18:48:02 +02:00
mail_alert.PNG Initial commit 2019-07-28 18:48:02 +02:00
settings_action.PNG Initial commit 2019-07-28 18:48:02 +02:00
settings_alert.PNG Initial commit 2019-07-28 18:48:02 +02:00
update_repo.sh Added update_repo.sh 2024-11-10 05:44:41 +05:00

README.md

AutoAlerts

Automate alert actions on iOS.

Inspired by: http://cydia.saurik.com/package/org.thebigboss.automa/

Using Core Data in a tweak

  1. Create your model with Xcode like you normally would in an app (yourmodel.xcdatamodeld).
  2. Use Xcode's managed object model compiler momc on your model.
    /Applications/Xcode.app/Contents/Developer/usr/bin/momc --sdkroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk --iphoneos-deployment-target 10.0 /path/to/yourmodel.xcdatamodeld /path/to/some/folder/yourmodel.momd
    
    Specify the sdk (preferably the latest) for --sdkroot and your minimum deployment target for --iphoneos-deployment-target.
  3. Copy yourmodel.momd to your Resources folder in your tweak (or somewhere else, just make sure it gets copied somewhere so you can access it on device).
  4. Create a NSManagedObjectModel.
    NSURL *url = [NSURL fileURLWithPath:@"/path/to/yourmodel.momd"];
    
    NSManagedObjectModel *model = [[[NSManagedObjectModel alloc] initWithContentsOfURL:url] autorelease];
    
  5. Create a store description and the persistent container.
    NSURL *storeURL = [NSURL fileURLWithPath:@"path/to/some/directory/yourmodel.sqlite"];
    
    NSPersistentStoreDescription *prop = [[[NSPersistentStoreDescription alloc] initWithURL:storeURL] autorelease];
    
    self.container = [[[NSPersistentContainer alloc] initWithName:@"yourmodel" managedObjectModel:model] autorelease];
    self.container.persistentStoreDescriptions = @[prop];
    
  6. Congrats! You can now complete the creation of the Core Data stack with loadPersistentStoresWithCompletionHandler: and create objects from your entities and save them. See AACoreDataStack.m for more details.