Skip to content

Commit

Permalink
Merge pull request #13 from jacobcxdev/dev/v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobcxdev authored Jul 5, 2020
2 parents 5139508 + 34f6af8 commit fe6f1e4
Show file tree
Hide file tree
Showing 61 changed files with 419 additions and 152 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ INSTALL_TARGET_PROCESSES = SpringBoard imagent tccd
include $(THEOS)/makefiles/common.mk

TWEAK_NAME = Iris
Iris_FILES = $(wildcard Objective-C/**/*.x) $(wildcard Objective-C/**/*.m) $(wildcard Swift/**/*.*)
Iris_SWIFT_BRIDGING_HEADER = Objective-C/Iris-Bridging-Header.h
Iris_FILES = $(wildcard src/Objective-C/**/*.x) $(wildcard src/Objective-C/*m) $(wildcard src/Objective-C/**/*.m) $(wildcard src/Swift/**/*.*)
Iris_SWIFT_BRIDGING_HEADER = src/Objective-C/Iris-Bridging-Header.h
Iris_EXTRA_FRAMEWORKS = libJCX Alderis
Iris_CFLAGS = -fobjc-arc

include $(THEOS_MAKE_PATH)/tweak.mk

SUBPROJECTS = irispreferences
SUBPROJECTS = Preferences
include $(THEOS_MAKE_PATH)/aggregate.mk
Binary file modified Media/10-Mockup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Media/3-Mockup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Media/5-Mockup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Media/8-Mockup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Media/9-Mockup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media/Banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions Preferences/Iris-Bridging-Header.h
14 changes: 14 additions & 0 deletions Preferences/IrisFlagTagSelectionViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#import <UIKit/UIKit.h>
#import "IrisPreferences-Swift.h"

@interface IrisFlagTagSelectionViewController : UITableViewController<UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, retain) NSMutableArray<IrisFlagTagButtonModel *> * _Nonnull list;
@property (nonatomic, retain) NSString * _Nonnull defaults;
@property (nonatomic, retain) NSString * _Nullable navBarTitle;
@property (nonatomic, retain) NSString * _Nullable selectedTagUUID;
@property (nonatomic) IrisConversationFlag selectedFlag;
+ (instancetype _Nonnull)controllerWithTitle:(NSString * _Nullable)title defaults:(NSString * _Nonnull)defaults;
- (instancetype _Nonnull)initWithTitle:(NSString * _Nullable)title defaults:(NSString * _Nonnull)defaults;
- (void)loadList;
- (void)saveList;
@end
59 changes: 59 additions & 0 deletions Preferences/IrisFlagTagSelectionViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#import "IrisFlagTagSelectionViewController.h"
#import <libJCX/Utilities.h>
#import "src/Objective-C/Globals.h"

@implementation IrisFlagTagSelectionViewController
+ (instancetype _Nonnull)controllerWithTitle:(NSString * _Nullable)title defaults:(NSString * _Nonnull)defaults {
return [[self alloc] initWithTitle:title defaults:defaults];
}
- (instancetype _Nonnull)initWithTitle:(NSString * _Nullable)title defaults:(NSString * _Nonnull)defaults {
if (self = [super initWithStyle:UITableViewStyleGrouped]) {
_navBarTitle = title;
_defaults = defaults;
[self loadList];
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = _navBarTitle;
}
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[self saveList];
}
- (void)loadList {
NSUserDefaults *userDefaults = [[NSUserDefaults alloc] initWithSuiteName:_defaults];
NSData *tagsArrayData = [userDefaults dataForKey:tagsArrayKey];
NSMutableArray *tagsArray = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithArray:@[[NSMutableArray class], [IrisConversationTag class], [NSUUID class], [NSString class], [UIColor class]]] fromData:tagsArrayData error:nil];
_list = tagsArray ? generateButtonModelsWithTags(tagsArray, false, false) : [NSMutableArray new];
_selectedFlag = [userDefaults objectForKey:defaultFlagKey] ? [[userDefaults objectForKey:defaultFlagKey] unsignedIntegerValue] : Shown;
_selectedTagUUID = [userDefaults stringForKey:defaultTagUUIDKey];
}
- (void)saveList {
NSUserDefaults *userDefaults = [[NSUserDefaults alloc] initWithSuiteName:_defaults];
[userDefaults setObject:@(_selectedFlag) forKey:defaultFlagKey];
[userDefaults setObject:_selectedTagUUID forKey:defaultTagUUIDKey];
[[JCXNotificationCentre centre] postNotificationWithName:userDefaultsDidUpdateNotificationName to:[NSDistributedNotificationCenter defaultCenter]];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return _list.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"entryCell"];
IrisFlagTagButtonModel *buttonModel = _list[indexPath.row];
cell.textLabel.text = buttonModel.name;
cell.imageView.image = buttonModel.image;
cell.imageView.tintColor = buttonModel.tintColour;
cell.accessoryType = buttonModel.conversationFlag == _selectedFlag && ((!buttonModel.conversationTag && !_selectedTagUUID) || [buttonModel.conversationTag.uuid.UUIDString isEqualToString:_selectedTagUUID]) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:true];
IrisFlagTagButtonModel *buttonModel = _list[indexPath.row];
_selectedFlag = buttonModel.conversationFlag;
_selectedTagUUID = buttonModel.conversationTag.uuid.UUIDString;
[tableView reloadData];
[self saveList];
}
@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

@interface IrisRootListController : JCXRootListController
- (void)killall;
- (void)pushFlagTagSelectionViewController;
@end
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#import "IrisRootListController.h"
#import "IrisFlagTagSelectionViewController.h"
#import "src/Objective-C/Globals.h"

@implementation IrisRootListController
- (void)viewDidLoad {
Expand All @@ -20,4 +22,8 @@ - (void)killall {
[killallSpringBoard setArguments:@[@"-9", @"SpringBoard"]];
[killallSpringBoard launch];
}
- (void)pushFlagTagSelectionViewController {
IrisFlagTagSelectionViewController *viewController = [IrisFlagTagSelectionViewController controllerWithTitle:@"Select Default List" defaults:@"com.apple.MobileSMS"];
[self.navigationController pushViewController:viewController animated:true];
}
@end
6 changes: 3 additions & 3 deletions irispreferences/Makefile → Preferences/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include $(THEOS)/makefiles/common.mk

BUNDLE_NAME = IrisPreferences
IrisPreferences_FILES = $(wildcard *.m)
IrisPreferences_FILES = $(wildcard *.m) $(wildcard src/Swift/Model/*ButtonModel.swift) src/Objective-C/Model/IrisConversationTag.m src/Objective-C/Globals.m
IrisPreferences_SWIFT_BRIDGING_HEADER = src/Objective-C/Iris-Bridging-Header.h
IrisPreferences_INSTALL_PATH = /Library/PreferenceBundles
IrisPreferences_FRAMEWORKS = UIKit
IrisPreferences_PRIVATE_FRAMEWORKS = Preferences
IrisPreferences_EXTRA_FRAMEWORKS += libJCX
IrisPreferences_CFLAGS = -fobjc-arc
IrisPreferences_CFLAGS = -fobjc-arc -DIS_PREFS

include $(THEOS_MAKE_PATH)/bundle.mk

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,40 @@
<key>label</key>
<string>Enabled</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Default List Preferences</string>
<key>footerText</key>
<string>Choose the default conversation list.</string>
</dict>
<dict>
<key>cellClass</key>
<string>JCXDisclosureCell</string>
<key>action</key>
<string>pushFlagTagSelectionViewController</string>
<key>label</key>
<string>Default List</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>footerText</key>
<string>Show the default conversation list (instead of the previously shown conversation list) when you launch the Messages application.</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.jacobcxdev.iris</string>
<key>key</key>
<string>shouldOpenWithDefaults</string>
<key>label</key>
<string>Open with Default List</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
Expand All @@ -78,7 +112,7 @@
<key>cell</key>
<string>PSGroupCell</string>
<key>footerText</key>
<string>Toggle between the shown and hidden conversation lists by shaking your device.</string>
<string>Toggle between the default and hidden conversation lists by shaking your device.</string>
</dict>
<dict>
<key>cell</key>
Expand All @@ -96,7 +130,7 @@
<key>cell</key>
<string>PSGroupCell</string>
<key>footerText</key>
<string>Toggle between the shown and hidden conversation lists by pressing both volume buttons simultaneously.</string>
<string>Toggle between the default and hidden conversation lists by pressing both volume buttons simultaneously.</string>
</dict>
<dict>
<key>cell</key>
Expand All @@ -114,7 +148,7 @@
<key>cell</key>
<string>PSGroupCell</string>
<key>footerText</key>
<string>Toggle between the shown and hidden conversation lists by toggling your device's ringer switch 3 times.</string>
<string>Toggle between the default and hidden conversation lists by toggling your device's ringer switch 3 times.</string>
</dict>
<dict>
<key>cell</key>
Expand Down Expand Up @@ -168,6 +202,24 @@
<key>label</key>
<string>Hide Badges from Hidden Conversations</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>footerText</key>
<string>Allow muted conversations to contribute to badge counts.</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.jacobcxdev.iris</string>
<key>key</key>
<string>shouldShowMutedUnreadCountInBadges</string>
<key>label</key>
<string>Show Badges from Muted Conversations</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
Expand Down Expand Up @@ -260,6 +312,27 @@
<key>label</key>
<string>Hide Swipe Actions</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Quick Switch Preferences</string>
<key>footerText</key>
<string>Enable quick switching between pinned conversations from the Messages plugin switcher.
For Quick Switch to work, please navigate to Settings > Messages > Show Contact Photos, and ensure the toggle is enabled.</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.jacobcxdev.iris</string>
<key>key</key>
<string>isQuickSwitchEnabled</string>
<key>label</key>
<string>Enable Quick Switch</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
1 change: 1 addition & 0 deletions Preferences/src
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Banner](https://user-images.githubusercontent.com/27970288/83982217-c8b98000-a91c-11ea-8ca3-3e6609b66309.png)
![Banner](https://user-images.githubusercontent.com/27970288/86540852-c4728980-beff-11ea-94d3-f3cc5f5d0b5d.png)

# [Iris](https://en.wikipedia.org/wiki/Iris_(mythology))
> #### *(/ˈaɪrɪs/; Greek: Ίρις Ancient Greek: [îːris])*
Expand All @@ -20,6 +20,7 @@ Watch [here](https://youtu.be/OwSOB6Do9Yk).
* 3D/Haptic Touch on a conversation to tag
* Secure the hidden conversation list with Face ID, Touch ID, or passcode
* Switch between different lists with either the Iris button or activation actions
* View all conversations with unread messages in a separate list
* Automatically hide conversations from unknown senders
* Automatically sync all lists to iCloud
* Quick switch between conversations
Expand All @@ -30,6 +31,10 @@ Watch [here](https://youtu.be/OwSOB6Do9Yk).
### Main Preferences
* Enabled

### Default List Preferences
* Default List
* Open with Default List

### Activation Preferences
* Show Iris Button
* Toggle with Shake
Expand All @@ -41,6 +46,7 @@ Watch [here](https://youtu.be/OwSOB6Do9Yk).

### Badge Preferences
* Hide Badges from Hidden Conversations
* Show Badges from Muted Conversations
* Hide Iris Button Badge

### Security Preferences
Expand All @@ -49,18 +55,21 @@ Watch [here](https://youtu.be/OwSOB6Do9Yk).
* Auto-Hide Hidden Conversation List
* Hide Swipe Actions

### Quick Switch Preferences
* Enable Quick Switch

## [Donate](https://paypal.me/jacobcxdev)
If you would like to donate to me, please donate [via PayPal](https://paypal.me/jacobcxdev) — it really helps!

## Screenshots
*Tip: If the screenshots are too large, zoom out by pressing `ctrl + -` / `command + -`. Press `ctrl + 0` / `command + 0` to return to the default zoom level.*
![1-Mockup](https://user-images.githubusercontent.com/27970288/83982004-bf2f1880-a91a-11ea-84a5-c8a86f8c65a1.png)
![2-Mockup](https://user-images.githubusercontent.com/27970288/83982007-c524f980-a91a-11ea-818f-a6cb6470a69b.png)
![3-Mockup](https://user-images.githubusercontent.com/27970288/83982009-c7875380-a91a-11ea-8d6e-5ef1bb821d39.png)
![3-Mockup](https://user-images.githubusercontent.com/27970288/86540817-8aa18300-beff-11ea-91ee-774b7ff841f6.png)
![4-Mockup](https://user-images.githubusercontent.com/27970288/83982011-c9511700-a91a-11ea-965f-42c89bd05f6a.png)
![5-Mockup](https://user-images.githubusercontent.com/27970288/83982014-cb1ada80-a91a-11ea-8447-c057f0ac6d01.png)
![5-Mockup](https://user-images.githubusercontent.com/27970288/86541082-e967fc00-bf01-11ea-9766-0f519d0c008e.png)
![6-Mockup](https://user-images.githubusercontent.com/27970288/83982015-cce49e00-a91a-11ea-9ba6-8a535a937e92.png)
![7-Mockup](https://user-images.githubusercontent.com/27970288/83982016-ce15cb00-a91a-11ea-9762-d6f4e4ecb389.png)
![8-Mockup](https://user-images.githubusercontent.com/27970288/83982017-cf46f800-a91a-11ea-91a4-da125ca5fced.png)
![9-Mockup](https://user-images.githubusercontent.com/27970288/83982019-d1a95200-a91a-11ea-9cb4-f80abcb3bf55.png)
![10-Mockup](https://user-images.githubusercontent.com/27970288/83982021-d2da7f00-a91a-11ea-8424-00e82b385252.png)
![8-Mockup](https://user-images.githubusercontent.com/27970288/86540822-8d03dd00-beff-11ea-91ef-f490cd309dde.png)
![9-Mockup](https://user-images.githubusercontent.com/27970288/86540837-942aeb00-beff-11ea-882b-b34cc670b123.png)
![10-Mockup](https://user-images.githubusercontent.com/27970288/86540842-98ef9f00-beff-11ea-9682-95f14cccf74b.png)
2 changes: 1 addition & 1 deletion layout/DEBIAN/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description: Put the sparkle back in 'i'Message!
Maintainer: JacobCXDev <[email protected]>
Author: JacobCXDev <[email protected]>
Section: Tweaks
Version: 1.0.1
Version: 1.1.0
Tag: cydia::commercial, compatible::ios13
Icon: https://chariz.com/cdn/icon/iris/[email protected]
Depiction: https://repo.chariz.com/package/com.jacobcxdev.iris/
6 changes: 6 additions & 0 deletions layout/DEBIAN/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ killall -9 imagent
echo "Killing tccd"
killall -9 tccd

echo "Restarting imagent"
launchctl start com.apple.imagent

echo "Restarting tccd"
launchctl start com.apple.tccd

exit 0
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
- (void)didSelectButton:(IrisButtonModel * _Nonnull)buttonModel {
self.selectedButtonModel = buttonModel;
if (self.textFields.count > 0) {
((UITextField *)self.textFields[0]).placeholder = [buttonModel isKindOfClass:[IrisFlagTagButtonModel class]] && ((IrisFlagTagButtonModel *)buttonModel).conversationTag ? ((IrisFlagTagButtonModel *)buttonModel).conversationTag.name : self.originalTag ? self.originalTag.name : @"Other";
((UITextField *)self.textFields[0]).placeholder = self.originalTag.name ?: [buttonModel isKindOfClass:[IrisFlagTagButtonModel class]] && ((IrisFlagTagButtonModel *)buttonModel).conversationTag ? ((IrisFlagTagButtonModel *)buttonModel).conversationTag.name : @"Other";
}
if (buttonModel.tag == 1 && UIApplication.sharedApplication.connectedScenes.count > 0) {
UIWindowScene *windowScene = nil;
Expand Down
Loading

0 comments on commit fe6f1e4

Please sign in to comment.