UI for helping out with APK upgrades

This commit is contained in:
Theodore Dubois
2021-10-26 23:34:23 -07:00
parent 33279d5e38
commit 0a5b10b6ba
14 changed files with 581 additions and 165 deletions
+34 -5
View File
@@ -5,10 +5,12 @@
// Created by Theodore Dubois on 9/23/18.
//
#import "UIApplication+OpenURL.h"
#import "AboutViewController.h"
#import "UserPreferences.h"
#import "AppDelegate.h"
#import "CurrentRoot.h"
#import "AppGroup.h"
#import "UserPreferences.h"
#import "UIApplication+OpenURL.h"
#import "NSObject+SaneKVO.h"
@interface AboutViewController ()
@@ -23,6 +25,9 @@
@property (weak, nonatomic) IBOutlet UITableViewCell *openTwitter;
@property (weak, nonatomic) IBOutlet UITableViewCell *openDiscord;
@property (weak, nonatomic) IBOutlet UITableViewCell *upgradeApkCell;
@property (weak, nonatomic) IBOutlet UILabel *upgradeApkLabel;
@property (weak, nonatomic) IBOutlet UIView *upgradeApkBadge;
@property (weak, nonatomic) IBOutlet UITableViewCell *exportContainerCell;
@property (weak, nonatomic) IBOutlet UILabel *versionLabel;
@@ -33,7 +38,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self _updatePreferenceUI];
[self _updateUI];
if (self.recoveryMode) {
self.includeDebugPanel = YES;
self.navigationItem.title = @"Recovery Mode";
@@ -49,8 +54,14 @@
[UserPreferences.shared observe:@[@"capsLockMapping", @"fontSize", @"launchCommand", @"bootCommand"]
options:0 owner:self usingBlock:^(typeof(self) self) {
[self _updatePreferenceUI];
[self _updateUI];
}];
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(_updateUI) name:FsUpdatedNotification object:nil];
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self _updateUI];
}
- (IBAction)dismiss:(id)sender {
@@ -62,12 +73,17 @@
exit(0);
}
- (void)_updatePreferenceUI {
- (void)_updateUI {
UserPreferences *prefs = UserPreferences.shared;
self.themeCell.detailTextLabel.text = prefs.theme.presetName;
self.disableDimmingSwitch.on = UserPreferences.shared.shouldDisableDimming;
self.launchCommandField.text = [UserPreferences.shared.launchCommand componentsJoinedByString:@" "];
self.bootCommandField.text = [UserPreferences.shared.bootCommand componentsJoinedByString:@" "];
self.upgradeApkCell.userInteractionEnabled = FsNeedsRepositoryUpdate();
self.upgradeApkLabel.enabled = FsNeedsRepositoryUpdate();
self.upgradeApkBadge.hidden = !FsNeedsRepositoryUpdate();
[self.tableView reloadData];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -92,6 +108,19 @@
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section {
if (section == 1) { // filesystems / upgrade
if (!FsIsManaged()) {
return @"The current filesystem is not managed by iSH.";
} else if (!FsNeedsRepositoryUpdate()) {
return [NSString stringWithFormat:@"The current filesystem is using %s, which is the latest version.", NEWEST_APK_VERSION];
} else {
return [NSString stringWithFormat:@"An upgrade to %s is available.", NEWEST_APK_VERSION];
}
}
return [super tableView:tableView titleForFooterInSection:section];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
NSInteger sections = [super numberOfSectionsInTableView:tableView];
if (!self.includeDebugPanel)
+1
View File
@@ -25,3 +25,4 @@ extern NSString *const ProcessExitedNotification;
#else
extern NSString *const KernelPanicNotification;
#endif
+3 -40
View File
@@ -12,6 +12,7 @@
#import "AboutViewController.h"
#import "AppDelegate.h"
#import "AppGroup.h"
#import "CurrentRoot.h"
#import "iOSFS.h"
#import "SceneDelegate.h"
#import "PasteboardDevice.h"
@@ -70,7 +71,6 @@ void ReportPanic(const char *message, void (^completion)(void)) {
#endif
static int bootError;
static int fs_ish_version;
static NSString *const kSkipStartupMessage = @"Skip Startup Message";
@implementation AppDelegate
@@ -91,44 +91,7 @@ static NSString *const kSkipStartupMessage = @"Skip Startup Message";
if (err < 0)
return err;
// /ish/version is the last ish version that opened this root. Used to migrate the filesystem.
struct fd *ish_version_fd = generic_open("/ish/version", O_RDONLY_, 0);
if (!IS_ERR(ish_version_fd)) {
char buf[100];
ssize_t n = ish_version_fd->ops->read(ish_version_fd, buf, sizeof(buf));
if (n < 0)
return (int) n;
NSString *version = [[NSString alloc] initWithBytesNoCopy:buf length:n encoding:NSUTF8StringEncoding freeWhenDone:NO];
version = [version stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
fs_ish_version = version.intValue;
fd_close(ish_version_fd);
NSURL *repositories = [NSBundle.mainBundle URLForResource:@"repositories" withExtension:@"txt"];
if (repositories != nil) {
NSMutableData *repositoriesData = [@"# This file contains pinned repositories managed by iSH. If the /ish directory\n"
@"# exists, iSH uses the metadata stored in it to keep this file up to date (by\n"
@"# overwriting the contents on boot.)\n" dataUsingEncoding:NSUTF8StringEncoding].mutableCopy;
[repositoriesData appendData:[NSData dataWithContentsOfURL:repositories]];
struct fd *repositories_fd = generic_open("/etc/apk/repositories", O_WRONLY_|O_TRUNC_, 0);
if (!IS_ERR(repositories_fd)) {
repositories_fd->ops->write(repositories_fd, repositoriesData.bytes, repositoriesData.length);
fd_close(repositories_fd);
}
}
generic_rmdirat(AT_PWD, "/ish/apk");
NSString *currentVersion = NSBundle.mainBundle.infoDictionary[(__bridge NSString *) kCFBundleVersionKey];
if (currentVersion.intValue > fs_ish_version) {
fs_ish_version = currentVersion.intValue;
ish_version_fd = generic_open("/ish/version", O_WRONLY_|O_TRUNC_, 0644);
if (!IS_ERR(ish_version_fd)) {
NSString *file = [NSString stringWithFormat:@"%@\n", currentVersion];
ish_version_fd->ops->write(ish_version_fd, file.UTF8String, [file lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);
fd_close(ish_version_fd);
}
}
}
FsInitialize();
// create some device nodes
// this will do nothing if they already exist
@@ -257,7 +220,7 @@ static NSString *const kSkipStartupMessage = @"Skip Startup Message";
+ (void)maybePresentStartupMessageOnViewController:(UIViewController *)vc {
if ([NSUserDefaults.standardUserDefaults integerForKey:kSkipStartupMessage] >= 1)
return;
if (fs_ish_version == 0) {
if (!FsIsManaged()) {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Install iSHs built-in APK?"
message:@"iSH now includes the APK package manager, but it must be manually activated."
preferredStyle:UIAlertControllerStyleAlert];
+154 -75
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="0yy-Uo-cZb">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="0yy-Uo-cZb">
<device id="retina4_0" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="collection view cell content view" minToolsVersion="11.0"/>
@@ -19,7 +19,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<label key="tableFooterView" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="iSH unknown (Build unknown)" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Xil-tm-WGD" userLabel="versionLabel">
<rect key="frame" x="0.0" y="785" width="320" height="44"/>
<rect key="frame" x="0.0" y="801.5" width="320" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
@@ -29,14 +29,14 @@
<tableViewSection headerTitle="Settings" id="tuR-Og-SE8">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="1Co-nG-Sij" style="IBUITableViewCellStyleDefault" id="dqn-Cd-cNm" userLabel="Theme">
<rect key="frame" x="0.0" y="55.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="49.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="dqn-Cd-cNm" id="i9s-qj-CxN">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Appearance" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1Co-nG-Sij">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<rect key="frame" x="16" y="0.0" width="270.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -49,14 +49,14 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="xvW-ah-hsy" style="IBUITableViewCellStyleDefault" id="31N-0g-RhF" userLabel="External Keyboard">
<rect key="frame" x="0.0" y="99.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="93" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="31N-0g-RhF" id="VWO-ke-dtY">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="External Keyboard" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xvW-ah-hsy">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<rect key="frame" x="16" y="0.0" width="270.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -69,14 +69,14 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="6Qv-kp-ISr" style="IBUITableViewCellStyleDefault" id="LVQ-SX-dAA" userLabel="Caps Lock">
<rect key="frame" x="0.0" y="143.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="136.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LVQ-SX-dAA" id="plU-fp-Ybd">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="App Icon" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6Qv-kp-ISr">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<rect key="frame" x="16" y="0.0" width="270.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -89,10 +89,10 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="3CC-Gj-X6f" userLabel="Disable Dimming">
<rect key="frame" x="0.0" y="187.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="180" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="3CC-Gj-X6f" id="6Sy-Y9-UdH">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Disable Screen Dimming" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Iov-xn-a0L">
@@ -122,14 +122,14 @@
<tableViewSection id="u3N-3a-97w">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="dVs-7k-zeJ" style="IBUITableViewCellStyleDefault" id="HHU-Ju-BtM">
<rect key="frame" x="0.0" y="267.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="259.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="HHU-Ju-BtM" id="CqF-qp-HgQ">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Filesystems" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="dVs-7k-zeJ">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<rect key="frame" x="16" y="0.0" width="270.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -141,19 +141,57 @@
<segue destination="gsu-Hv-LDC" kind="show" id="tif-za-oNY"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" id="Huf-xT-ejJ">
<rect key="frame" x="0.0" y="303" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Huf-xT-ejJ" id="44W-gn-26V">
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Upgrade Repositories" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L09-wA-jCg">
<rect key="frame" x="16" y="11.5" width="165" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="l5o-Y7-j4W">
<rect key="frame" x="270.5" y="14" width="16" height="16"/>
<color key="backgroundColor" systemColor="systemRedColor"/>
<constraints>
<constraint firstAttribute="height" constant="16" id="28W-HE-QpJ"/>
<constraint firstAttribute="width" constant="16" id="iaA-gZ-0Pn"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstItem="L09-wA-jCg" firstAttribute="centerY" secondItem="44W-gn-26V" secondAttribute="centerY" id="4He-R9-ToQ"/>
<constraint firstAttribute="trailingMargin" secondItem="l5o-Y7-j4W" secondAttribute="trailing" id="8b0-UB-r6d"/>
<constraint firstItem="L09-wA-jCg" firstAttribute="leading" secondItem="44W-gn-26V" secondAttribute="leadingMargin" id="l0q-Rr-W6r"/>
<constraint firstItem="l5o-Y7-j4W" firstAttribute="centerY" secondItem="44W-gn-26V" secondAttribute="centerY" id="ppV-Dx-99y"/>
</constraints>
</tableViewCellContentView>
<connections>
<segue destination="9eV-Jd-Xng" kind="show" id="R7o-uj-fFN"/>
</connections>
</tableViewCell>
</cells>
</tableViewSection>
<tableViewSection footerTitle="" id="DVR-sH-TdL">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="g6W-FX-yYa" style="IBUITableViewCellStyleDefault" id="gMm-4C-5X3">
<rect key="frame" x="0.0" y="347.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="382.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="gMm-4C-5X3" id="mVT-2h-5kM">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Send Feedback" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="g6W-FX-yYa">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<rect key="frame" x="16" y="0.0" width="270.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -163,14 +201,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Fe5-tr-fWm" style="IBUITableViewCellStyleDefault" id="F4i-eC-hQ6">
<rect key="frame" x="0.0" y="391.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="426" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="F4i-eC-hQ6" id="gU6-0E-hOf">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="iSH on GitHub" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Fe5-tr-fWm">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<rect key="frame" x="16" y="0.0" width="270.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -180,14 +218,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="xMw-wC-igF" style="IBUITableViewCellStyleDefault" id="K5r-jy-Dzl">
<rect key="frame" x="0.0" y="435.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="469.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="K5r-jy-Dzl" id="UIr-IB-yu1">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="iSH Discord Server" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="xMw-wC-igF">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<rect key="frame" x="16" y="0.0" width="270.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -197,14 +235,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="wyO-AY-ccm" style="IBUITableViewCellStyleDefault" id="bge-GA-6p8">
<rect key="frame" x="0.0" y="479.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="513" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="bge-GA-6p8" id="JXA-Ff-hkB">
<rect key="frame" x="0.0" y="0.0" width="293" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="@tblodt on Twitter" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wyO-AY-ccm">
<rect key="frame" x="16" y="0.0" width="269" height="44"/>
<rect key="frame" x="16" y="0.0" width="270.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -218,20 +256,20 @@
<tableViewSection headerTitle="Secret Advanced Debugging Options" footerTitle="Warning: Changing these can break everything! If that happens, there's a reset switch in the Settings app." id="d0T-DL-SuP">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="RKb-ed-FOs" userLabel="Init Command">
<rect key="frame" x="0.0" y="591" width="320" height="44"/>
<rect key="frame" x="0.0" y="615" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="RKb-ed-FOs" id="I4F-81-mWS">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" horizontalHuggingPriority="1000" insetsLayoutMarginsFromSafeArea="NO" text="Launch cmd" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="G8D-8d-aOp">
<rect key="frame" x="8" y="11.5" width="94" height="21"/>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" horizontalHuggingPriority="1000" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="Launch cmd" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="G8D-8d-aOp">
<rect key="frame" x="16" y="11.5" width="94" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="/bin/login -f root" adjustsFontSizeToFit="NO" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gDx-hv-hhV">
<rect key="frame" x="114" y="13" width="198" height="18"/>
<textField opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="/bin/login -f root" adjustsFontSizeToFit="NO" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="gDx-hv-hhV">
<rect key="frame" x="122" y="13" width="182" height="18"/>
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="alphabet" returnKeyType="done" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/>
<connections>
@@ -250,19 +288,19 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="Xc7-9V-RXm" userLabel="Boot Command">
<rect key="frame" x="0.0" y="635" width="320" height="44"/>
<rect key="frame" x="0.0" y="659" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Xc7-9V-RXm" id="IEt-PC-8fZ">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" horizontalHuggingPriority="1000" insetsLayoutMarginsFromSafeArea="NO" text="Boot cmd" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ivg-bB-NKL">
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" horizontalHuggingPriority="1000" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="Boot cmd" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ivg-bB-NKL">
<rect key="frame" x="8" y="11.5" width="74" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="/bin/login -f root" adjustsFontSizeToFit="NO" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bKw-tV-nX1">
<textField opaque="NO" contentMode="scaleToFill" ambiguous="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="/bin/login -f root" adjustsFontSizeToFit="NO" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bKw-tV-nX1">
<rect key="frame" x="94" y="13" width="218" height="18"/>
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="14"/>
<textInputTraits key="textInputTraits" autocorrectionType="no" spellCheckingType="no" keyboardType="alphabet" returnKeyType="done" smartDashesType="no" smartInsertDeleteType="no" smartQuotesType="no"/>
@@ -282,14 +320,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="blue" indentationWidth="10" textLabel="83j-2z-XRR" style="IBUITableViewCellStyleDefault" id="OIE-9g-Btx" userLabel="Export">
<rect key="frame" x="0.0" y="679" width="320" height="44"/>
<rect key="frame" x="0.0" y="703" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="OIE-9g-Btx" id="uY3-tT-dwz">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Export container" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="83j-2z-XRR">
<rect key="frame" x="15" y="0.0" width="297" height="44"/>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" ambiguous="YES" insetsLayoutMarginsFromSafeArea="NO" text="Export container" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="83j-2z-XRR">
<rect key="frame" x="8" y="0.0" width="304" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -324,6 +362,9 @@
<outlet property="openTwitter" destination="bge-GA-6p8" id="r0A-lN-0e0"/>
<outlet property="sendFeedback" destination="gMm-4C-5X3" id="nhX-ZH-zyP"/>
<outlet property="themeCell" destination="dqn-Cd-cNm" id="dfh-et-0o7"/>
<outlet property="upgradeApkBadge" destination="l5o-Y7-j4W" id="AI2-IM-NVw"/>
<outlet property="upgradeApkCell" destination="Huf-xT-ejJ" id="CBX-wc-11e"/>
<outlet property="upgradeApkLabel" destination="L09-wA-jCg" id="wMj-ht-DsI"/>
<outlet property="versionLabel" destination="Xil-tm-WGD" id="ZzC-E6-VER"/>
</connections>
</tableViewController>
@@ -343,14 +384,14 @@
<tableViewSection headerTitle="Map Caps Lock" id="oTd-4i-TSa">
<cells>
<tableViewCell clipsSubviews="YES" tag="1" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="zuo-ZW-n37" style="IBUITableViewCellStyleDefault" id="8ZS-Wp-1TX">
<rect key="frame" x="0.0" y="55.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="49.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8ZS-Wp-1TX" id="GMp-XT-GYq">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Control" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="zuo-ZW-n37">
<rect key="frame" x="16" y="0.0" width="288" height="44"/>
<rect key="frame" x="16" y="0.0" width="288" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -360,14 +401,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" tag="2" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="NR7-h5-BZD" style="IBUITableViewCellStyleDefault" id="IMH-6g-rLD">
<rect key="frame" x="0.0" y="99.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="93" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="IMH-6g-rLD" id="Qea-lO-LfG">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Escape" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NR7-h5-BZD">
<rect key="frame" x="16" y="0.0" width="288" height="44"/>
<rect key="frame" x="16" y="0.0" width="288" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -377,14 +418,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="CXm-1h-hy1" style="IBUITableViewCellStyleDefault" id="zqH-hq-4Oi">
<rect key="frame" x="0.0" y="143.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="136.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zqH-hq-4Oi" id="Wpu-8A-Fbd">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="None" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="CXm-1h-hy1">
<rect key="frame" x="16" y="0.0" width="288" height="44"/>
<rect key="frame" x="16" y="0.0" width="288" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -398,10 +439,10 @@
<tableViewSection id="zbj-zP-Xeq">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="cA4-62-G0Z" userLabel="Option to Meta">
<rect key="frame" x="0.0" y="223.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="216" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="cA4-62-G0Z" id="ZYe-JS-rbD">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Option → Meta" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qax-I0-tqo">
@@ -427,10 +468,10 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="NQy-68-Suu" userLabel="Backtick to Escape">
<rect key="frame" x="0.0" y="267.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="259.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="NQy-68-Suu" id="9xb-BP-fQ4">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Backtick → Escape" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zWx-Iz-vdm">
@@ -460,10 +501,10 @@
<tableViewSection footerTitle="If this is off, ctrl-space switches keyboard layouts." id="Ucf-cb-qkd">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="9gO-wR-cmz" userLabel="Backtick to Escape">
<rect key="frame" x="0.0" y="347.5" width="320" height="44"/>
<rect key="frame" x="0.0" y="339" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="9gO-wR-cmz" id="v3f-Ht-Vrg">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Send ctrl-space to terminal" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KvX-Y2-vlm">
@@ -493,10 +534,10 @@
<tableViewSection headerTitle="Extra keys" footerTitle="When extra keys are hidden, Settings can be opened with the ⌘, shortcut" id="Kaj-9x-pfF">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" id="TM9-T2-EDa" userLabel="Backtick to Escape">
<rect key="frame" x="0.0" y="483" width="320" height="44"/>
<rect key="frame" x="0.0" y="448.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="TM9-T2-EDa" id="K8q-us-D80">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Hide with external keyboard" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PWB-d9-Zhd">
@@ -539,7 +580,7 @@
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="XlH-jX-0dL" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1058" y="430"/>
<point key="canvasLocation" x="1057.5" y="429.92957746478874"/>
</scene>
<!--App Icon-->
<scene sceneID="jc8-Gv-xpK">
@@ -563,10 +604,10 @@
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="icon" id="S3m-Be-XtT" customClass="AltIconCell">
<rect key="frame" x="30" y="30" width="120" height="147"/>
<rect key="frame" x="30" y="30" width="120" height="146"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="IWa-a1-skf">
<rect key="frame" x="0.0" y="0.0" width="120" height="147"/>
<rect key="frame" x="0.0" y="0.0" width="120" height="146"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon.png" translatesAutoresizingMaskIntoConstraints="NO" id="9aw-Kk-k95">
@@ -584,7 +625,7 @@
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WNa-qg-ZN5">
<rect key="frame" x="0.0" y="120" width="120" height="27"/>
<rect key="frame" x="0.0" y="120" width="120" height="26"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/>
<state key="normal" title="by @author"/>
<connections>
@@ -612,7 +653,7 @@
</collectionViewCell>
</cells>
<collectionReusableView key="sectionFooterView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="footer" id="lNw-1e-UqP">
<rect key="frame" x="0.0" y="207" width="320" height="50"/>
<rect key="frame" x="0.0" y="206" width="320" height="50"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L98-Nf-4Wv">
@@ -670,6 +711,47 @@
</objects>
<point key="canvasLocation" x="1057.5" y="1132.3943661971832"/>
</scene>
<!--Upgrade-->
<scene sceneID="D8q-Fv-Sfr">
<objects>
<viewController title="Upgrade" id="9eV-Jd-Xng" customClass="UpgradeRootViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="GV8-4O-0fU">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6OQ-mF-Mur" customClass="TerminalView">
<rect key="frame" x="0.0" y="44" width="320" height="524"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="canBecomeFirstResponder" value="NO"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="1GV-qG-uh7"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="1GV-qG-uh7" firstAttribute="trailing" secondItem="6OQ-mF-Mur" secondAttribute="trailing" id="ZCA-Q1-Odv"/>
<constraint firstItem="6OQ-mF-Mur" firstAttribute="leading" secondItem="1GV-qG-uh7" secondAttribute="leading" id="gbg-DM-mLG"/>
<constraint firstItem="6OQ-mF-Mur" firstAttribute="top" secondItem="1GV-qG-uh7" secondAttribute="top" id="jGK-vN-hUm"/>
<constraint firstItem="1GV-qG-uh7" firstAttribute="bottom" secondItem="6OQ-mF-Mur" secondAttribute="bottom" id="mK6-ba-K1i"/>
</constraints>
</view>
<navigationItem key="navigationItem" title="Upgrade" id="uXA-OB-CN7">
<barButtonItem key="rightBarButtonItem" title="Start" style="done" id="R2f-RB-uga">
<connections>
<action selector="upgrade:" destination="9eV-Jd-Xng" id="LNT-XH-Qvi"/>
</connections>
</barButtonItem>
</navigationItem>
<connections>
<outlet property="terminalView" destination="6OQ-mF-Mur" id="mGv-Yc-HQL"/>
<outlet property="upgradeButton" destination="R2f-RB-uga" id="n2L-Vs-nDF"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ncd-Qn-RO3" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1057.5" y="1810.5633802816901"/>
</scene>
<!--Appearance-->
<scene sceneID="Sh1-9Z-h4V">
<objects>
@@ -680,7 +762,7 @@
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Theme Name" textLabel="BTx-K8-Swn" style="IBUITableViewCellStyleDefault" id="o12-92-dg0">
<rect key="frame" x="0.0" y="55.5" width="320" height="43.5"/>
<rect key="frame" x="0.0" y="49.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="o12-92-dg0" id="ld4-rN-33g">
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
@@ -714,10 +796,10 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="Font" textLabel="gtJ-eb-DvQ" detailTextLabel="5wC-O1-dx3" style="IBUITableViewCellStyleValue1" id="qEy-gj-mmp">
<rect key="frame" x="0.0" y="99" width="320" height="43.5"/>
<rect key="frame" x="0.0" y="136.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qEy-gj-mmp" id="lIf-2w-14C">
<rect key="frame" x="0.0" y="0.0" width="293" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="294.5" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Font" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="gtJ-eb-DvQ">
@@ -728,7 +810,7 @@
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Menlo" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="5wC-O1-dx3">
<rect key="frame" x="238" y="12" width="47" height="20.5"/>
<rect key="frame" x="239.5" y="12" width="47" height="20.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" systemColor="secondaryLabelColor"/>
@@ -738,7 +820,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="Font Size" id="CTf-zd-xjl">
<rect key="frame" x="0.0" y="142.5" width="320" height="43.5"/>
<rect key="frame" x="0.0" y="180" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="CTf-zd-xjl" id="udT-7d-Xzj">
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
@@ -776,7 +858,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Preview" id="X0d-0Q-g9Z">
<rect key="frame" x="0.0" y="186" width="320" height="43.5"/>
<rect key="frame" x="0.0" y="223.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="X0d-0Q-g9Z" id="vGk-di-wEa">
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
@@ -804,7 +886,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="Font" textLabel="hLA-gT-NrL" style="IBUITableViewCellStyleDefault" id="CzI-Ye-AQO">
<rect key="frame" x="0.0" y="28" width="320" height="43.5"/>
<rect key="frame" x="0.0" y="44.5" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="CzI-Ye-AQO" id="6lJ-UP-joy">
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
@@ -867,17 +949,14 @@
<systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="secondaryLabelColor">
<color red="0.23529411764705882" green="0.23529411764705882" blue="0.2627450980392157" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
+50 -15
View File
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -19,6 +20,9 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FQi-r8-odu" customClass="TerminalView">
<rect key="frame" x="0.0" y="44" width="414" height="852"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="boolean" keyPath="canBecomeFirstResponder" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="controlKey" destination="W9v-cj-FWz" id="HgQ-u7-5IL"/>
<outlet property="inputAccessoryView" destination="GyN-ob-WFz" id="rBB-FQ-HiM"/>
@@ -49,15 +53,16 @@
<outlet property="hideKeyboardButton" destination="7qw-ie-p4d" id="n5f-XX-i98"/>
<outlet property="infoButton" destination="5dl-UV-6qh" id="jaF-Xd-IYp"/>
<outlet property="pasteButton" destination="hmm-tv-z35" id="mgi-xs-C8r"/>
<outlet property="settingsBadge" destination="QyP-z0-o0M" id="B0a-GT-d21"/>
<outlet property="tabKey" destination="cJt-oG-BnW" id="YaE-o4-lKm"/>
<outlet property="termView" destination="FQi-r8-odu" id="QIa-yI-fmG"/>
<outletCollection property="barButtons" destination="cJt-oG-BnW" id="Yjx-uz-RbI"/>
<outletCollection property="barButtons" destination="W9v-cj-FWz" id="OFf-FH-2Xy"/>
<outletCollection property="barButtons" destination="IPm-l0-f25" id="dHH-gh-Tzq"/>
<outletCollection property="barButtons" destination="VCr-TW-PIZ" id="NlS-hh-ara"/>
<outletCollection property="barControls" destination="5dl-UV-6qh" id="ocU-st-RdO"/>
<outletCollection property="barControls" destination="7qw-ie-p4d" id="fDV-Yg-Dec"/>
<outletCollection property="barControls" destination="hmm-tv-z35" id="EEv-5m-po5"/>
<outletCollection property="barControls" destination="5dl-UV-6qh" id="ocU-st-RdO"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
@@ -131,21 +136,48 @@
<view contentMode="scaleToFill" horizontalHuggingPriority="100" translatesAutoresizingMaskIntoConstraints="NO" id="qmg-M1-7W8" userLabel="Spacer">
<rect key="frame" x="148" y="0.0" width="229" height="43"/>
</view>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="infoLight" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5dl-UV-6qh" userLabel="Info">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QqP-xI-1vv">
<rect key="frame" x="383" y="0.0" width="31" height="43"/>
<accessibility key="accessibilityConfiguration" label="Settings"/>
<subviews>
<button contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="infoLight" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5dl-UV-6qh" userLabel="Info">
<rect key="frame" x="0.0" y="0.0" width="31" height="43"/>
<accessibility key="accessibilityConfiguration" label="Settings"/>
<constraints>
<constraint firstAttribute="width" constant="31" id="1Ax-5U-2CI"/>
</constraints>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal">
<color key="titleColor" systemColor="darkTextColor"/>
</state>
<connections>
<action selector="showAbout:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="xbI-EN-avC"/>
<outletCollection property="gestureRecognizers" destination="reB-As-gYu" appends="YES" id="ehk-hz-UIY"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QyP-z0-o0M" userLabel="Badge">
<rect key="frame" x="20" y="4.6666666666666661" width="12" height="11.999999999999998"/>
<color key="backgroundColor" systemColor="systemRedColor"/>
<constraints>
<constraint firstAttribute="width" constant="12" id="BA0-yo-Kjp"/>
<constraint firstAttribute="height" constant="12" id="omS-5z-6nP"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="6"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
</subviews>
<constraints>
<constraint firstAttribute="width" constant="31" id="1Ax-5U-2CI"/>
<constraint firstItem="5dl-UV-6qh" firstAttribute="top" secondItem="QqP-xI-1vv" secondAttribute="top" id="Bmc-yy-8n3"/>
<constraint firstAttribute="bottom" secondItem="5dl-UV-6qh" secondAttribute="bottom" id="HF9-Df-jMg"/>
<constraint firstAttribute="trailing" secondItem="5dl-UV-6qh" secondAttribute="trailing" id="V23-Wf-LRF"/>
<constraint firstAttribute="trailing" secondItem="QyP-z0-o0M" secondAttribute="trailing" constant="-1" id="bKG-3n-DTG"/>
<constraint firstItem="5dl-UV-6qh" firstAttribute="leading" secondItem="QqP-xI-1vv" secondAttribute="leading" id="cU3-kZ-7ce"/>
<constraint firstAttribute="width" constant="31" id="jE7-Z3-L7t"/>
<constraint firstItem="QyP-z0-o0M" firstAttribute="centerY" secondItem="QqP-xI-1vv" secondAttribute="centerY" multiplier="0.5" id="o5C-lE-of0"/>
</constraints>
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal">
<color key="titleColor" systemColor="darkTextColor"/>
</state>
<connections>
<action selector="showAbout:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="xbI-EN-avC"/>
<outletCollection property="gestureRecognizers" destination="reB-As-gYu" appends="YES" id="ehk-hz-UIY"/>
</connections>
</button>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hmm-tv-z35" userLabel="Paste">
<rect key="frame" x="420" y="0.0" width="31" height="43"/>
<accessibility key="accessibilityConfiguration" label="Paste"/>
@@ -205,5 +237,8 @@
<systemColor name="darkTextColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemRedColor">
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
+27
View File
@@ -0,0 +1,27 @@
//
// CurrentRoot.h
// iSH
//
// Created by Theodore Dubois on 11/4/21.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
extern int fs_ish_version;
extern int fs_ish_apk_version;
void FsInitialize(void);
bool FsIsManaged(void);
bool FsNeedsRepositoryUpdate(void);
void FsUpdateOnlyRepositoriesFile(void);
void FsUpdateRepositories(void);
/// The smallest value for /ish/apk-version for which updating /etc/apk/repositories does not require running /sbin/apk upgrade, given that every update to /etc/apk/repositories is followed by copying /ish/version to /ish/apk-version.
#define COMPATIBLE_APK_VERSION 296
#define NEWEST_APK_VERSION "Alpine v3.14"
extern NSString *const FsUpdatedNotification;
NS_ASSUME_NONNULL_END
+110
View File
@@ -0,0 +1,110 @@
//
// CurrentRoot.m
// iSH
//
// Created by Theodore Dubois on 11/4/21.
//
#import "CurrentRoot.h"
#include "kernel/calls.h"
#include "fs/path.h"
int fs_ish_version;
int fs_ish_apk_version;
#if !ISH_LINUX
static ssize_t read_file(const char *path, char *buf, size_t size) {
struct fd *fd = generic_open(path, O_RDONLY_, 0);
if (IS_ERR(fd))
return PTR_ERR(fd);
ssize_t n = fd->ops->read(fd, buf, size);
fd_close(fd);
if (n == size)
return _ENAMETOOLONG;
return n;
}
static ssize_t write_file(const char *path, const char *buf, size_t size) {
struct fd *fd = generic_open(path, O_WRONLY_|O_CREAT_|O_TRUNC_, 0644);
if (IS_ERR(fd))
return PTR_ERR(fd);
ssize_t n = fd->ops->write(fd, buf, size);
fd_close(fd);
return n;
}
static int remove_directory(const char *path) {
return generic_rmdirat(AT_PWD, path);
}
#else
static ssize_t read_file(const char *path, char *buf, size_t size) {
return _ENOSYS;
}
static ssize_t write_file(const char *path, const char *buf, size_t size) {
return _ENOSYS;
}
static int remove_directory(const char *path) {
return _ENOSYS;
}
#endif
void FsInitialize() {
// /ish/version is the last ish version that opened this root. Used to migrate the filesystem.
char buf[1000];
ssize_t n = read_file("/ish/version", buf, sizeof(buf));
if (n >= 0) {
NSString *currentVersion = NSBundle.mainBundle.infoDictionary[(__bridge NSString *) kCFBundleVersionKey];
NSString *currentVersionFile = [NSString stringWithFormat:@"%@\n", currentVersion];
NSString *version = [[NSString alloc] initWithBytesNoCopy:buf length:n encoding:NSUTF8StringEncoding freeWhenDone:NO];
version = [version stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
fs_ish_version = version.intValue;
version = nil;
n = read_file("/ish/apk-version", buf, sizeof(buf));
if (n >= 0) {
NSString *version = [[NSString alloc] initWithBytesNoCopy:buf length:n encoding:NSUTF8StringEncoding freeWhenDone:NO];
version = [version stringByTrimmingCharactersInSet:NSCharacterSet.whitespaceAndNewlineCharacterSet];
fs_ish_apk_version = version.intValue;
}
if (fs_ish_apk_version > COMPATIBLE_APK_VERSION)
FsUpdateRepositories();
if (currentVersion.intValue > fs_ish_version) {
fs_ish_version = currentVersion.intValue;
write_file("/ish/version", currentVersionFile.UTF8String, [currentVersionFile lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);
}
}
}
bool FsIsManaged() {
return fs_ish_version != 0;
}
bool FsNeedsRepositoryUpdate() {
return FsIsManaged() && fs_ish_apk_version < COMPATIBLE_APK_VERSION;
}
void FsUpdateOnlyRepositoriesFile() {
NSURL *repositories = [NSBundle.mainBundle URLForResource:@"repositories" withExtension:@"txt"];
if (repositories != nil) {
NSMutableData *repositoriesData = [@"# This file contains pinned repositories managed by iSH. If the /ish directory\n"
@"# exists, iSH uses the metadata stored in it to keep this file up to date (by\n"
@"# overwriting the contents on boot.)\n" dataUsingEncoding:NSUTF8StringEncoding].mutableCopy;
[repositoriesData appendData:[NSData dataWithContentsOfURL:repositories]];
write_file("/etc/apk/repositories", repositoriesData.bytes, repositoriesData.length);
}
}
void FsUpdateRepositories() {
NSString *currentVersion = NSBundle.mainBundle.infoDictionary[(__bridge NSString *) kCFBundleVersionKey];
NSString *currentVersionFile = [NSString stringWithFormat:@"%@\n", currentVersion];
FsUpdateOnlyRepositoriesFile();
fs_ish_apk_version = currentVersion.intValue;
write_file("/ish/apk-version", currentVersionFile.UTF8String, [currentVersionFile lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);
remove_directory("/ish/apk");
[NSNotificationCenter.defaultCenter postNotificationName:FsUpdatedNotification object:nil];
}
NSString *const FsUpdatedNotification = @"FsUpdatedNotification";
+23 -26
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="6Vk-68-e3U">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="6Vk-68-e3U">
<device id="retina5_5" orientation="landscape" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17505"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -19,14 +19,14 @@
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="Root" textLabel="Mwz-4l-jfY" style="IBUITableViewCellStyleDefault" id="qSD-L1-cEX">
<rect key="frame" x="0.0" y="55.333332061767578" width="736" height="43.666667938232422"/>
<rect key="frame" x="0.0" y="49" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="qSD-L1-cEX" id="7y5-yu-imS">
<rect key="frame" x="0.0" y="0.0" width="704.66666666666663" height="43.666667938232422"/>
<rect key="frame" x="0.0" y="0.0" width="706.33333333333337" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Mwz-4l-jfY">
<rect key="frame" x="20" y="0.0" width="676.66666666666663" height="43.666667938232422"/>
<rect key="frame" x="20" y="0.0" width="678.33333333333337" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
@@ -39,10 +39,10 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="Default Root" textLabel="c8w-0c-rgD" detailTextLabel="s1e-Wg-AtO" style="IBUITableViewCellStyleSubtitle" id="o8d-j7-u1g">
<rect key="frame" x="0.0" y="99" width="736" height="55.666667938232422"/>
<rect key="frame" x="0.0" y="92.666667938232422" width="736" height="55.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="o8d-j7-u1g" id="lIx-1n-IVb">
<rect key="frame" x="0.0" y="0.0" width="704.66666666666663" height="55.666667938232422"/>
<rect key="frame" x="0.0" y="0.0" width="706.33333333333337" height="55.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="c8w-0c-rgD">
@@ -97,21 +97,21 @@
<tableViewSection id="npR-Ok-6YD">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" textLabel="get-up-pHQ" style="IBUITableViewCellStyleDefault" id="hgx-e8-jKW">
<rect key="frame" x="0.0" y="18" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="18" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hgx-e8-jKW" id="2I1-Zq-g1z">
<rect key="frame" x="0.0" y="0.0" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="get-up-pHQ">
<rect key="frame" x="20" y="0.0" width="696" height="43.5"/>
<rect key="frame" x="20" y="0.0" width="696" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="right" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="W3r-9O-obS">
<rect key="frame" x="95" y="4" width="621" height="36"/>
<rect key="frame" x="95" y="4" width="621" height="35.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" returnKeyType="done"/>
<connections>
@@ -129,14 +129,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="wKw-Vo-Xko" style="IBUITableViewCellStyleDefault" id="ukW-Tg-Uaz">
<rect key="frame" x="0.0" y="61.5" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="61.666667938232422" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ukW-Tg-Uaz" id="Inz-2O-tLV">
<rect key="frame" x="0.0" y="0.0" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Browse Files" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="wKw-Vo-Xko">
<rect key="frame" x="20" y="0.0" width="696" height="43.5"/>
<rect key="frame" x="20" y="0.0" width="696" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" systemColor="systemBlueColor"/>
@@ -146,14 +146,14 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="k5h-m7-MM6" style="IBUITableViewCellStyleDefault" id="pGO-Lo-Iqh">
<rect key="frame" x="0.0" y="105" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="105.33333587646484" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="pGO-Lo-Iqh" id="UzY-uU-GCw">
<rect key="frame" x="0.0" y="0.0" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Export" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="k5h-m7-MM6">
<rect key="frame" x="20" y="0.0" width="696" height="43.5"/>
<rect key="frame" x="20" y="0.0" width="696" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" systemColor="systemBlueColor"/>
@@ -167,14 +167,14 @@
<tableViewSection footerTitle="This will restart the app." id="uz7-5p-jKp">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="jVu-zc-iaY" style="IBUITableViewCellStyleDefault" id="rs6-db-M98">
<rect key="frame" x="0.0" y="184.5" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="185.00000381469729" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="rs6-db-M98" id="gOc-8S-WPH">
<rect key="frame" x="0.0" y="0.0" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Boot From This Filesystem" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="jVu-zc-iaY">
<rect key="frame" x="20" y="0.0" width="696" height="43.5"/>
<rect key="frame" x="20" y="0.0" width="696" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" systemColor="systemBlueColor"/>
@@ -188,14 +188,14 @@
<tableViewSection id="Xdw-Qu-Lzh">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="Afx-pj-PW3" style="IBUITableViewCellStyleDefault" id="8i7-Yk-j16">
<rect key="frame" x="0.0" y="276" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="273.0000057220459" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8i7-Yk-j16" id="xR2-MO-1Ck">
<rect key="frame" x="0.0" y="0.0" width="736" height="43.5"/>
<rect key="frame" x="0.0" y="0.0" width="736" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Delete Filesystem" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Afx-pj-PW3">
<rect key="frame" x="20" y="0.0" width="696" height="43.5"/>
<rect key="frame" x="20" y="0.0" width="696" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" systemColor="systemRedColor"/>
@@ -321,9 +321,6 @@
<segue reference="21q-u2-n5O"/>
</inferredMetricsTieBreakers>
<resources>
<systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="groupTableViewBackgroundColor">
<color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
+2
View File
@@ -10,6 +10,8 @@
@interface TerminalView : UIView <UITextInput, WKScriptMessageHandler, UIScrollViewDelegate>
@property IBInspectable BOOL canBecomeFirstResponder;
@property (nonatomic) CGFloat overrideFontSize;
@property (readonly) CGFloat effectiveFontSize;
+1 -4
View File
@@ -36,6 +36,7 @@ struct rowcol {
@implementation TerminalView
@synthesize inputDelegate;
@synthesize tokenizer;
@synthesize canBecomeFirstResponder;
- (void)awakeFromNib {
[super awakeFromNib];
@@ -172,10 +173,6 @@ static NSString *const HANDLERS[] = {@"syncFocus", @"focus", @"newScrollHeight",
#pragma mark Focus and scrolling
- (BOOL)canBecomeFirstResponder {
return YES;
}
- (void)setTerminalFocused:(BOOL)terminalFocused {
_terminalFocused = terminalFocused;
NSString *script = terminalFocused ? @"exports.setFocused(true)" : @"exports.setFocused(false)";
+12
View File
@@ -12,6 +12,7 @@
#import "ArrowBarButton.h"
#import "UserPreferences.h"
#import "AboutViewController.h"
#import "CurrentRoot.h"
#import "NSObject+SaneKVO.h"
#include "kernel/init.h"
#include "kernel/task.h"
@@ -37,6 +38,7 @@
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *barLeading;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *barTrailing;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *barButtonWidth;
@property (weak, nonatomic) IBOutlet UIView *settingsBadge;
@property (weak, nonatomic) IBOutlet UIButton *infoButton;
@property (weak, nonatomic) IBOutlet UIButton *pasteButton;
@@ -79,6 +81,11 @@
selector:@selector(keyboardDidSomething:)
name:UIKeyboardDidChangeFrameNotification
object:nil];
[center addObserver:self
selector:@selector(_updateBadge)
name:FsUpdatedNotification
object:nil];
[self _updateStyleFromPreferences:NO];
@@ -113,6 +120,7 @@
options:0 owner:self usingBlock:^(typeof(self) self) {
[self _updateStyleFromPreferences:YES];
}];
[self _updateBadge];
}
- (void)awakeFromNib {
@@ -267,6 +275,10 @@
[self _updateStyleFromPreferences:YES];
}
- (void)_updateBadge {
self.settingsBadge.hidden = !FsNeedsRepositoryUpdate();
}
- (UIStatusBarStyle)preferredStatusBarStyle {
return UserPreferences.shared.theme.statusBarStyle;
}
+16
View File
@@ -0,0 +1,16 @@
//
// UpgradeRootViewController.h
// iSH
//
// Created by Theodore Dubois on 11/27/21.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface UpgradeRootViewController : UIViewController
@end
NS_ASSUME_NONNULL_END
+136
View File
@@ -0,0 +1,136 @@
//
// UpgradeRootViewController.m
// iSH
//
// Created by Theodore Dubois on 11/27/21.
//
#import "UpgradeRootViewController.h"
#import "AppDelegate.h"
#import "TerminalView.h"
#import "CurrentRoot.h"
#include "kernel/calls.h"
#include "kernel/init.h"
#include "fs/devices.h"
@interface UpgradeRootViewController ()
@property (weak, nonatomic) IBOutlet TerminalView *terminalView;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *upgradeButton;
@property (nonatomic) Terminal *terminal;
@property (nonatomic) struct tty *tty;
@property (nonatomic) int upgradePid;
@end
@implementation UpgradeRootViewController
- (void)viewDidLoad {
[super viewDidLoad];
#if !ISH_LINUX
[NSNotificationCenter.defaultCenter addObserver:self selector:@selector(processExited:) name:ProcessExitedNotification object:nil];
lock(&pids_lock);
current = pid_get_task(1); // pray
unlock(&pids_lock);
self.terminal = [Terminal createPseudoTerminal:&self->_tty];
current = NULL;
self.terminalView.terminal = self.terminal;
#endif
self.upgradeButton.enabled = NO;
if (FsNeedsRepositoryUpdate()) {
self.upgradeButton.enabled = YES;
[self printToTerminal:@"# /sbin/apk upgrade"];
} else {
[self showAlertWithTitle:@"fuck" message:@"No update needed. If you're seeing this message, there's a bug."];
}
}
- (void)printToTerminal:(NSString *)message, ... {
va_list args;
va_start(args, message);
message = [[NSString alloc] initWithFormat:message arguments:args];
[self.terminal sendOutput:message.UTF8String length:(int)[message lengthOfBytesUsingEncoding:NSUTF8StringEncoding]];
}
- (void)showAlertWithTitle:(NSString *)title message:(NSString *)message, ... {
va_list args;
va_start(args, message);
message = [[NSString alloc] initWithFormat:message arguments:args];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alert animated:YES completion:nil];
}
#if !ISH_LINUX
- (void)processExited:(NSNotification *)notif {
int pid = [notif.userInfo[@"pid"] intValue];
if (pid != self.upgradePid)
return;
self.upgradePid = 0;
[self setDismissable:YES];
int code = [notif.userInfo[@"code"] intValue];
if (code != 0) {
[self printToTerminal:@"Upgrade failed! exit status %d\r\n", code];
} else {
lock(&pids_lock);
current = pid_get_task(1); // pray
unlock(&pids_lock);
FsUpdateRepositories();
current = NULL;
}
[self.terminal destroy];
self.terminal = nil;
}
#endif
- (int)startUpgrade {
if (self.upgradePid != 0)
return -EEXIST;
#if !ISH_LINUX
int err = become_new_init_child();
if (err < 0)
return err;
FsUpdateOnlyRepositoriesFile();
NSString *stdioFile = [NSString stringWithFormat:@"/dev/pts/%d", self.tty->num];
err = create_stdio(stdioFile.fileSystemRepresentation, TTY_PSEUDO_SLAVE_MAJOR, self.tty->num);
if (err < 0)
return err;
err = do_execve("/sbin/apk", 2, "/sbin/apk\0upgrade\0", "TERM=xterm-256color\0");
if (err < 0)
return err;
self.upgradePid = current->pid;
task_start(current);
current = NULL;
return 0;
#else
return -ENOSYS;
#endif
}
- (IBAction)upgrade:(id)sender {
self.upgradeButton.enabled = NO;
[self setDismissable:NO];
[self printToTerminal:@"\r\n"];
int err = [self startUpgrade];
if (err < 0) {
[self showAlertWithTitle:@"Failed to start upgrade" message:@"error %d", err];
}
}
- (void)setDismissable:(BOOL)dismissable {
[self.navigationItem setHidesBackButton:!dismissable animated:YES];
self.navigationController.interactivePopGestureRecognizer.enabled = dismissable;
if (@available(iOS 13, *)) {
self.modalInPresentation = !dismissable;
}
}
- (void)dealloc {
[self.terminal destroy];
if (self.tty != NULL)
tty_release(self.tty);
}
@end
+12
View File
@@ -169,6 +169,8 @@
BBBD741426B7BE2E00321AC5 /* libfakefs.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BB21A16F2689041500BD19B4 /* libfakefs.a */; };
BBBF7B5C2415CDBB00EC4C14 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = BBBF7B5B2415CDBB00EC4C14 /* Settings.bundle */; };
BBBFE94921C5CFF100509DD5 /* NSError+ISHErrno.m in Sources */ = {isa = PBXBuildFile; fileRef = BB13F4DD21C5770000343E17 /* NSError+ISHErrno.m */; };
BBC3863E276817A900CC8C2E /* UpgradeRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BBA5D87D27536E7600B39D77 /* UpgradeRootViewController.m */; };
BBC3863F276817AD00CC8C2E /* CurrentRoot.m in Sources */ = {isa = PBXBuildFile; fileRef = BB565EA32734F1FB00C93EAE /* CurrentRoot.m */; };
BBC8297E24EDAC11009D042C /* idollarhash.png in Resources */ = {isa = PBXBuildFile; fileRef = BBC8297D24EDAC11009D042C /* idollarhash.png */; };
BBC8298124EDACBB009D042C /* iinhash.png in Resources */ = {isa = PBXBuildFile; fileRef = BBC8298024EDACBB009D042C /* iinhash.png */; };
BBC8298724EE5853009D042C /* metal.png in Resources */ = {isa = PBXBuildFile; fileRef = BBC8298624EE5853009D042C /* metal.png */; };
@@ -590,6 +592,8 @@
BB4A922D24EDA461002F5A96 /* icon1337.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon1337.png; sourceTree = "<group>"; };
BB4A922F24EDA55C002F5A96 /* colontildehash.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = colontildehash.png; sourceTree = "<group>"; };
BB4A923124EDA560002F5A96 /* 3d.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3d.png; sourceTree = "<group>"; };
BB565EA32734F1FB00C93EAE /* CurrentRoot.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CurrentRoot.m; sourceTree = "<group>"; };
BB565EA52734F22D00C93EAE /* CurrentRoot.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CurrentRoot.h; sourceTree = "<group>"; };
BB60F55021573FCA003A4E52 /* BarButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BarButton.h; sourceTree = "<group>"; };
BB60F55121573FCA003A4E52 /* BarButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BarButton.m; sourceTree = "<group>"; };
BB6DB260216435330047A611 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
@@ -625,6 +629,8 @@
BB9C7B84240A240E00F5D4F0 /* AppGroup.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppGroup.m; sourceTree = "<group>"; };
BB9C7B86240A29DE00F5D4F0 /* AppGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppGroup.h; sourceTree = "<group>"; };
BB9C7B88240A343400F5D4F0 /* iSH.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = iSH.xcconfig; path = app/iSH.xcconfig; sourceTree = "<group>"; };
BBA5D87C27536E7600B39D77 /* UpgradeRootViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UpgradeRootViewController.h; sourceTree = "<group>"; };
BBA5D87D27536E7600B39D77 /* UpgradeRootViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UpgradeRootViewController.m; sourceTree = "<group>"; };
BBA8E2C0236FF5EA00515F76 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
BBAEE338249B58E80069EBB5 /* libbz2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libbz2.tbd; path = usr/lib/libbz2.tbd; sourceTree = SDKROOT; };
BBAEE33A249BDADC0069EBB5 /* ProgressReportViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProgressReportViewController.h; sourceTree = "<group>"; };
@@ -955,6 +961,8 @@
children = (
BB792B531F96D90D00FFB7A4 /* AppDelegate.h */,
BB792B541F96D90D00FFB7A4 /* AppDelegate.m */,
BB565EA52734F22D00C93EAE /* CurrentRoot.h */,
BB565EA32734F1FB00C93EAE /* CurrentRoot.m */,
BBCC9D942365430800424C83 /* SceneDelegate.h */,
BBCC9D952365430800424C83 /* SceneDelegate.m */,
BB792B561F96D90D00FFB7A4 /* TerminalViewController.h */,
@@ -1224,6 +1232,8 @@
BB82A7FC21B4C2E8006AA5FD /* AboutExternalKeyboardViewController.m */,
BB267FA423A48F1500ED7CAF /* AltIconViewController.h */,
BB267FA523A48F1500ED7CAF /* AltIconViewController.m */,
BBA5D87C27536E7600B39D77 /* UpgradeRootViewController.h */,
BBA5D87D27536E7600B39D77 /* UpgradeRootViewController.m */,
);
name = About;
sourceTree = "<group>";
@@ -2017,6 +2027,7 @@
BB28C79426896B1F00BDC834 /* AboutNavigationController.m in Sources */,
BB28C79526896B1F00BDC834 /* TerminalViewController.m in Sources */,
BB123ACE26C9F13500419CDA /* IOSCalls.m in Sources */,
BBC3863F276817AD00CC8C2E /* CurrentRoot.m in Sources */,
BB28C79626896B1F00BDC834 /* ProgressReportViewController.m in Sources */,
BB28C79726896B1F00BDC834 /* TerminalView.m in Sources */,
BB28C79826896B1F00BDC834 /* ScrollbarView.m in Sources */,
@@ -2024,6 +2035,7 @@
BB28C7BF2689799800BDC834 /* Roots.m in Sources */,
BB28C79A26896B1F00BDC834 /* Terminal.m in Sources */,
BB28C79B26896B1F00BDC834 /* FontPickerViewController.m in Sources */,
BBC3863E276817A900CC8C2E /* UpgradeRootViewController.m in Sources */,
BB28C79D26896B1F00BDC834 /* SceneDelegate.m in Sources */,
BB28C79E26896B1F00BDC834 /* AboutExternalKeyboardViewController.m in Sources */,
BB28C79F26896B1F00BDC834 /* PassthroughView.m in Sources */,