[release] RyukGram v1.2.0

### Features
- **Open Instagram links in app (Safari extension)** — bundled Safari web extension (sideload IPA only). Enable in Safari → Extensions; instagram.com links open in the app.
- **Localization** — every user-facing string flows through a central translation layer. Globe button in Settings; missing keys fall back to English. Ships English only — see the "Translating RyukGram" section in the README to add more.
- **Action buttons** — context-aware menus on feed, reels, and stories (expand, repost, download, copy caption, etc.) with per-context default tap action and carousel/multi-story bulk download
- **Enhanced HD downloads** — up to 1080p via DASH + FFmpegKit with quality picker, preview playback, encoding-speed options, and 720p fallback
- **Repost**, **media viewer**, **media zoom** (long-press), **download pill** (frosted glass, stacks concurrent downloads)
- **Fake location** — overrides CoreLocation app-wide, map picker + saved presets, optional quick-toggle button on the Friends Map
- **Messages-only mode** — strips every tab except DM inbox + profile
- **Launch tab** — pick which tab the app opens to
- Full last active date in DMs — show full date instead of "Active 2h ago"
- Custom date format — 12 formats with per-surface toggles (feed, notes/comments/stories, DMs)
- Send files in DMs (experimental)
- View story mentions
- Hide suggested stories
- Story tray long-press actions — view HD profile picture from the tray menu
- Advance on story reply — auto-skip to next story after sending a reply or reaction
- Mark story as seen on reply or emoji reaction
- Hide metrics (likes, comments, shares counts)
- Hide messages tab
- Hide voice/video call buttons in DM thread header (independent toggles)
- Disable app haptics
- Disable reels tab refresh
- Disable disappearing messages mode in DMs
- Follow indicator — shows whether the profile user follows you
- Copy note text on long press
- Zoom profile photo — long press opens full-screen viewer
- Notes actions — copy text, download GIF/audio from notes long-press menu
- Confirm unfollow
- Feed refresh controls — disable background refresh, home button refresh, and home button scroll

### Improvements
- Default tap action: added copy URL, repost, and view mentions options; dynamic menu generation per context
- Settings pages reordered: General → Feed → Stories → Reels → Messages → Profile → Navigation → Saving → Confirmations
- Fake location picker: native Apple Maps-style UI (search, long-press to drop pin, current location)
- Liquid glass floating tab bar + dynamic sizing
- Upload audio: FFmpegKit re-encode + trim for any audio/video input
- Settings reorganized with per-context action button config; new Profile page
- Highlight cover: full-screen viewer replaces direct download
- Switched HD encoder to `h264_videotoolbox` (hardware) — no GPL FFmpegKit required
- Legacy long-press download deprecated (off by default), replaced by action buttons

### Fixes
- Hide suggested stories no longer removes followed users' stories on scroll
- Settings search bar transparency with liquid glass off; auto-deactivates on push
- HD download cancel: tapping pill aborts in-flight downloads + FFmpeg sessions cleanly
- Download pill stuck state on background/foreground, progress reset per download
- Disappearing messages mode confirmation not firing on swipe
- Detailed color picker not working on story draw `†`
- DM seen toggle menu not updating after tap
- Reel refresh confirmation appearing on first app launch `†`
- Reels action button displacing profile pictures on photo reels
- Disappearing DM media download (expand, share, save to Photos with progress pill)
- Carousel "Download all" not showing item count in feed
- Encoding speed setting being ignored for HD downloads
- Various upstream SCInsta merges (Meta AI hiding, suggested chats hiding, notes tray) — marked `†`

> `†` Merged from upstream [SCInsta](https://github.com/SoCuul/SCInsta) by SoCuul

### Credits
- Thanks to [@erupts0](https://github.com/erupts0) (John) for testing and feature suggestions
- Thanks to [@euoradan](https://t.me/euoradan) (Radan) for experimental Instagram feature flag research
- Safari extension forked/cleaned from [BillyCurtis/OpenInstagramSafariExtension](https://github.com/BillyCurtis/OpenInstagramSafariExtension)

### Known Issues
- Preserved unsent messages can't be removed via "Delete for you"; pull-to-refresh clears them (warning available in settings)
- "Delete for you" detection uses a ~2s window after the local action — a real unsend landing in that window may be missed (rare)
This commit is contained in:
faroukbmiled
2026-04-16 03:03:30 +01:00
parent 9b2c7dc202
commit 86eaa95019
124 changed files with 11523 additions and 1393 deletions
+115 -13
View File
@@ -1,8 +1,9 @@
#import "SCISettingsViewController.h"
#import "SCISearchBarStyler.h"
static char rowStaticRef[] = "row";
@interface SCISettingsViewController () <UITableViewDataSource, UITableViewDelegate, UISearchResultsUpdating>
@interface SCISettingsViewController () <UITableViewDataSource, UITableViewDelegate, UISearchResultsUpdating, UISearchControllerDelegate>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, copy) NSArray *sections;
@@ -73,18 +74,90 @@ static char rowStaticRef[] = "row";
if (self.isRoot) {
UISearchController *sc = [[UISearchController alloc] initWithSearchResultsController:nil];
sc.searchResultsUpdater = self;
sc.delegate = self;
sc.obscuresBackgroundDuringPresentation = NO;
sc.searchBar.placeholder = @"Search settings";
sc.searchBar.placeholder = SCILocalized(@"settings.search.placeholder");
self.navigationItem.searchController = sc;
self.navigationItem.hidesSearchBarWhenScrolling = NO;
if (![SCIUtils getBoolPref:@"liquid_glass_buttons"]) {
self.definesPresentationContext = YES;
}
self.searchController = sc;
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemClose
target:self action:@selector(sciDismissSettings)];
// Compact globe button — English is the only shipped language for now,
// so the tap shows an info alert instead of a picker. Re-enable the
// menu below once additional translations land.
UIImage *globe = [UIImage systemImageNamed:@"globe"];
UIBarButtonItem *langItem = [[UIBarButtonItem alloc] initWithImage:globe
style:UIBarButtonItemStylePlain
target:self
action:@selector(sciShowLanguageInfo)];
self.navigationItem.rightBarButtonItem = langItem;
}
}
- (void)sciShowLanguageInfo {
UIAlertController *alert = [UIAlertController
alertControllerWithTitle:SCILocalized(@"settings.language.title")
message:SCILocalized(@"settings.language.english_only")
preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:SCILocalized(@"settings.language.ok") style:UIAlertActionStyleCancel handler:nil]];
[alert addAction:[UIAlertAction actionWithTitle:SCILocalized(@"settings.language.help_translate") style:UIAlertActionStyleDefault
handler:^(__unused UIAlertAction *a) {
NSURL *url = [NSURL URLWithString:@"https://github.com/faroukbmiled/RyukGram#translating-ryukgram"];
if (url) [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil];
}]];
[self presentViewController:alert animated:YES completion:nil];
}
- (UIMenu *)sciBuildLanguageMenu {
NSString *current = [[NSUserDefaults standardUserDefaults] stringForKey:SCILanguagePrefKey] ?: @"system";
NSMutableArray<UIAction *> *actions = [NSMutableArray array];
for (NSDictionary<NSString *, NSString *> *lang in SCIAvailableLanguages()) {
NSString *code = lang[@"code"];
NSString *title = [code isEqualToString:@"system"]
? SCILocalized(@"settings.language.system")
: lang[@"native"];
UIAction *action = [UIAction actionWithTitle:title
image:nil
identifier:nil
handler:^(UIAction * _Nonnull a) {
NSString *prev = [[NSUserDefaults standardUserDefaults] stringForKey:SCILanguagePrefKey] ?: @"system";
if ([prev isEqualToString:code]) return;
[[NSUserDefaults standardUserDefaults] setObject:code forKey:SCILanguagePrefKey];
SCILocalizationReset();
[self sciApplyLanguageChange];
// Most IG-side hooks cache their labels at load time, so a full
// restart is the only way to flip every menu/button cleanly.
[SCIUtils showRestartConfirmation];
}];
action.state = [code isEqualToString:current] ? UIMenuElementStateOn : UIMenuElementStateOff;
[actions addObject:action];
}
return [UIMenu menuWithTitle:SCILocalized(@"settings.language.title") children:actions];
}
- (void)sciApplyLanguageChange {
// Root title + search placeholder reflect the new language immediately.
self.title = SCILocalized(@"settings.title");
self.searchController.searchBar.placeholder = SCILocalized(@"settings.search.placeholder");
if (self.navigationItem.rightBarButtonItem.menu) {
self.navigationItem.rightBarButtonItem.menu = [self sciBuildLanguageMenu];
}
[self.tableView reloadData];
// Features watching for runtime label refreshes (IG menu items, overlay
// buttons, toasts) can subscribe to this to re-read their strings.
[[NSNotificationCenter defaultCenter] postNotificationName:@"SCILanguageDidChange" object:nil];
}
- (void)sciDismissSettings {
[self dismissViewControllerAnimated:YES completion:nil];
}
@@ -92,6 +165,17 @@ static char rowStaticRef[] = "row";
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.tableView reloadData];
[self sciStyleSearchBar];
}
- (void)sciStyleSearchBar { [SCISearchBarStyler styleSearchBar:self.searchController.searchBar]; }
- (void)willPresentSearchController:(UISearchController *)searchController { [self sciStyleSearchBar]; }
- (void)didPresentSearchController:(UISearchController *)searchController {
[self sciStyleSearchBar];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self sciStyleSearchBar];
});
}
#pragma mark - Search
@@ -163,13 +247,17 @@ static char rowStaticRef[] = "row";
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
// Without this the search bar strands itself as a floating bar on return.
if (![SCIUtils getBoolPref:@"liquid_glass_buttons"] && self.searchController.isActive) {
self.searchController.active = NO;
}
if (![[[NSUserDefaults standardUserDefaults] objectForKey:@"SCInstaFirstRun"] isEqualToString:SCIVersionString]) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"RyukGram Settings Info"
message:@"In the future: Hold down on the three lines at the top right of your profile page, to re-open RyukGram settings."
UIAlertController *alert = [UIAlertController alertControllerWithTitle:SCILocalized(@"settings.firstrun.title")
message:SCILocalized(@"settings.firstrun.message")
preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"I understand!"
[alert addAction:[UIAlertAction actionWithTitle:SCILocalized(@"settings.firstrun.ok")
style:UIAlertActionStyleDefault
handler:nil]];
@@ -235,15 +323,19 @@ static char rowStaticRef[] = "row";
case SCITableCellSwitch: {
UISwitch *toggle = [UISwitch new];
toggle.on = [[NSUserDefaults standardUserDefaults] boolForKey:row.defaultsKey];
toggle.on = row.disabled ? NO : [[NSUserDefaults standardUserDefaults] boolForKey:row.defaultsKey];
toggle.onTintColor = [SCIUtils SCIColor_Primary];
toggle.enabled = !row.disabled;
objc_setAssociatedObject(toggle, rowStaticRef, row, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
[toggle addTarget:self action:@selector(switchChanged:) forControlEvents:UIControlEventValueChanged];
cell.accessoryView = toggle;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (row.disabled) {
cell.contentView.alpha = 0.4;
}
break;
}
@@ -288,9 +380,13 @@ static char rowStaticRef[] = "row";
menuButton.configuration = config;
[menuButton sizeToFit];
cell.accessoryView = menuButton;
cell.selectionStyle = UITableViewCellSelectionStyleNone;
if (row.disabled) {
menuButton.enabled = NO;
cell.contentView.alpha = 0.4;
}
break;
}
@@ -313,7 +409,9 @@ static char rowStaticRef[] = "row";
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
if ([self isSearching]) {
NSUInteger n = self.searchResults.count;
return n ? [NSString stringWithFormat:@"%lu result%@", (unsigned long)n, n == 1 ? @"" : @"s"] : @"No results";
if (n == 0) return SCILocalized(@"settings.results.none");
NSString *fmt = n == 1 ? SCILocalized(@"settings.results.one") : SCILocalized(@"settings.results.many");
return [NSString stringWithFormat:fmt, (unsigned long)n];
}
return self.sections[section][@"header"];
}
@@ -367,6 +465,10 @@ static char rowStaticRef[] = "row";
if (row.requiresRestart) {
[SCIUtils showRestartConfirmation];
}
if ([row.defaultsKey isEqualToString:@"hide_suggested_stories"]) {
[[NSNotificationCenter defaultCenter] postNotificationName:@"SCISuggestedStoriesReload" object:nil];
}
}
- (void)stepperChanged:(UIStepper *)sender {