mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 06:43:25 +01:00
[AltServer] Turns AltServer into menu bar app
This commit is contained in:
@@ -7,20 +7,203 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
import UserNotifications
|
||||||
|
|
||||||
|
import AltSign
|
||||||
|
|
||||||
@NSApplicationMain
|
@NSApplicationMain
|
||||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
|
|
||||||
|
private var statusItem: NSStatusItem?
|
||||||
|
|
||||||
|
private var connectedDevices = [ALTDevice]()
|
||||||
|
|
||||||
|
private weak var authenticationAlert: NSAlert?
|
||||||
|
|
||||||
|
@IBOutlet private var appMenu: NSMenu!
|
||||||
|
@IBOutlet private var connectedDevicesMenu: NSMenu!
|
||||||
|
|
||||||
|
private weak var authenticationAppleIDTextField: NSTextField?
|
||||||
|
private weak var authenticationPasswordTextField: NSSecureTextField?
|
||||||
|
|
||||||
|
func applicationDidFinishLaunching(_ aNotification: Notification)
|
||||||
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
{
|
||||||
// Insert code here to initialize your application
|
UNUserNotificationCenter.current().delegate = self
|
||||||
|
ConnectionManager.shared.start()
|
||||||
|
|
||||||
|
let item = NSStatusBar.system.statusItem(withLength: -1)
|
||||||
|
guard let button = item.button else { return }
|
||||||
|
|
||||||
|
button.image = NSImage(named: "MenuBarIcon")
|
||||||
|
button.target = self
|
||||||
|
button.action = #selector(AppDelegate.presentMenu)
|
||||||
|
|
||||||
|
self.statusItem = item
|
||||||
|
|
||||||
|
self.connectedDevicesMenu.delegate = self
|
||||||
}
|
}
|
||||||
|
|
||||||
func applicationWillTerminate(_ aNotification: Notification) {
|
func applicationWillTerminate(_ aNotification: Notification)
|
||||||
|
{
|
||||||
// Insert code here to tear down your application
|
// Insert code here to tear down your application
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private extension AppDelegate
|
||||||
|
{
|
||||||
|
@objc func presentMenu()
|
||||||
|
{
|
||||||
|
guard let button = self.statusItem?.button, let superview = button.superview, let window = button.window else { return }
|
||||||
|
|
||||||
|
self.connectedDevices = ALTDeviceManager.shared.connectedDevices
|
||||||
|
|
||||||
|
let x = button.frame.origin.x
|
||||||
|
let y = button.frame.origin.y - 5
|
||||||
|
|
||||||
|
let location = superview.convert(NSMakePoint(x, y), to: nil)
|
||||||
|
|
||||||
|
guard let event = NSEvent.mouseEvent(with: .leftMouseUp, location: location,
|
||||||
|
modifierFlags: [], timestamp: 0, windowNumber: window.windowNumber, context: nil,
|
||||||
|
eventNumber: 0, clickCount: 1, pressure: 0)
|
||||||
|
else { return }
|
||||||
|
|
||||||
|
NSMenu.popUpContextMenu(self.appMenu, with: event, for: button)
|
||||||
|
}
|
||||||
|
|
||||||
|
@objc func installAltStore(_ item: NSMenuItem)
|
||||||
|
{
|
||||||
|
guard case let index = self.connectedDevicesMenu.index(of: item), index != -1 else { return }
|
||||||
|
|
||||||
|
let alert = NSAlert()
|
||||||
|
alert.messageText = NSLocalizedString("Please enter your Apple ID and password.", comment: "")
|
||||||
|
alert.informativeText = NSLocalizedString("Your Apple ID and password are not saved and are only sent to Apple for authentication.", comment: "")
|
||||||
|
|
||||||
|
let textFieldSize = NSSize(width: 300, height: 22)
|
||||||
|
|
||||||
|
let appleIDTextField = NSTextField(frame: NSRect(x: 0, y: 0, width: textFieldSize.width, height: textFieldSize.height))
|
||||||
|
appleIDTextField.delegate = self
|
||||||
|
appleIDTextField.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
appleIDTextField.placeholderString = NSLocalizedString("Apple ID", comment: "")
|
||||||
|
alert.window.initialFirstResponder = appleIDTextField
|
||||||
|
self.authenticationAppleIDTextField = appleIDTextField
|
||||||
|
|
||||||
|
let passwordTextField = NSSecureTextField(frame: NSRect(x: 0, y: 0, width: textFieldSize.width, height: textFieldSize.height))
|
||||||
|
passwordTextField.delegate = self
|
||||||
|
passwordTextField.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
passwordTextField.placeholderString = NSLocalizedString("Password", comment: "")
|
||||||
|
self.authenticationPasswordTextField = passwordTextField
|
||||||
|
|
||||||
|
appleIDTextField.nextKeyView = passwordTextField
|
||||||
|
|
||||||
|
let stackView = NSStackView(frame: NSRect(x: 0, y: 0, width: textFieldSize.width, height: textFieldSize.height * 2))
|
||||||
|
stackView.orientation = .vertical
|
||||||
|
stackView.distribution = .equalSpacing
|
||||||
|
stackView.spacing = 0
|
||||||
|
stackView.addArrangedSubview(appleIDTextField)
|
||||||
|
stackView.addArrangedSubview(passwordTextField)
|
||||||
|
alert.accessoryView = stackView
|
||||||
|
|
||||||
|
alert.addButton(withTitle: NSLocalizedString("Install", comment: ""))
|
||||||
|
alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
|
||||||
|
|
||||||
|
self.authenticationAlert = alert
|
||||||
|
self.validate()
|
||||||
|
|
||||||
|
NSRunningApplication.current.activate(options: .activateIgnoringOtherApps)
|
||||||
|
|
||||||
|
let response = alert.runModal()
|
||||||
|
guard response == .alertFirstButtonReturn else { return }
|
||||||
|
|
||||||
|
let username = appleIDTextField.stringValue
|
||||||
|
let password = passwordTextField.stringValue
|
||||||
|
|
||||||
|
let device = self.connectedDevices[index]
|
||||||
|
ALTDeviceManager.shared.installAltStore(to: device, appleID: username, password: password) { (result) in
|
||||||
|
let content = UNMutableNotificationContent()
|
||||||
|
|
||||||
|
switch result
|
||||||
|
{
|
||||||
|
case .success:
|
||||||
|
content.title = NSLocalizedString("Installation Succeeded", comment: "")
|
||||||
|
content.body = String(format: NSLocalizedString("AltStore was successfully installed on %@.", comment: ""), device.name)
|
||||||
|
|
||||||
|
case .failure(let error):
|
||||||
|
content.title = NSLocalizedString("Installation Failed", comment: "")
|
||||||
|
content.body = error.localizedDescription
|
||||||
|
}
|
||||||
|
|
||||||
|
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: nil)
|
||||||
|
UNUserNotificationCenter.current().add(request)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension AppDelegate: NSMenuDelegate
|
||||||
|
{
|
||||||
|
func numberOfItems(in menu: NSMenu) -> Int
|
||||||
|
{
|
||||||
|
return self.connectedDevices.isEmpty ? 1 : self.connectedDevices.count
|
||||||
|
}
|
||||||
|
|
||||||
|
func menu(_ menu: NSMenu, update item: NSMenuItem, at index: Int, shouldCancel: Bool) -> Bool
|
||||||
|
{
|
||||||
|
if self.connectedDevices.isEmpty
|
||||||
|
{
|
||||||
|
item.title = NSLocalizedString("No Connected Devices", comment: "")
|
||||||
|
item.isEnabled = false
|
||||||
|
item.target = nil
|
||||||
|
item.action = nil
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
let device = self.connectedDevices[index]
|
||||||
|
item.title = device.name
|
||||||
|
item.isEnabled = true
|
||||||
|
item.target = self
|
||||||
|
item.action = #selector(AppDelegate.installAltStore)
|
||||||
|
item.tag = index
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension AppDelegate: NSTextFieldDelegate
|
||||||
|
{
|
||||||
|
func controlTextDidChange(_ obj: Notification)
|
||||||
|
{
|
||||||
|
self.validate()
|
||||||
|
}
|
||||||
|
|
||||||
|
func controlTextDidEndEditing(_ obj: Notification)
|
||||||
|
{
|
||||||
|
self.validate()
|
||||||
|
}
|
||||||
|
|
||||||
|
private func validate()
|
||||||
|
{
|
||||||
|
guard
|
||||||
|
let appleID = self.authenticationAppleIDTextField?.stringValue.trimmingCharacters(in: .whitespacesAndNewlines),
|
||||||
|
let password = self.authenticationPasswordTextField?.stringValue.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
else { return }
|
||||||
|
|
||||||
|
if appleID.isEmpty || password.isEmpty
|
||||||
|
{
|
||||||
|
self.authenticationAlert?.buttons.first?.isEnabled = false
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self.authenticationAlert?.buttons.first?.isEnabled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
self.authenticationAlert?.layout()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension AppDelegate: UNUserNotificationCenterDelegate
|
||||||
|
{
|
||||||
|
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)
|
||||||
|
{
|
||||||
|
completionHandler([.alert, .sound, .badge])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
25
AltServer/Assets.xcassets/MenuBarIcon.imageset/Contents.json
vendored
Normal file
25
AltServer/Assets.xcassets/MenuBarIcon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "MenuBarIcon.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "MenuBarIcon@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
},
|
||||||
|
"properties" : {
|
||||||
|
"template-rendering-intent" : "template"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
AltServer/Assets.xcassets/MenuBarIcon.imageset/MenuBarIcon.png
vendored
Normal file
BIN
AltServer/Assets.xcassets/MenuBarIcon.imageset/MenuBarIcon.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
BIN
AltServer/Assets.xcassets/MenuBarIcon.imageset/MenuBarIcon@2x.png
vendored
Normal file
BIN
AltServer/Assets.xcassets/MenuBarIcon.imageset/MenuBarIcon@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
@@ -8,6 +8,61 @@
|
|||||||
<!--Application-->
|
<!--Application-->
|
||||||
<scene sceneID="JPo-4y-FX3">
|
<scene sceneID="JPo-4y-FX3">
|
||||||
<objects>
|
<objects>
|
||||||
|
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||||
|
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" id="urc-xw-Dhc">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="300" height="48"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="zLd-d8-ghZ">
|
||||||
|
<rect key="frame" x="0.0" y="26" width="300" height="22"/>
|
||||||
|
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="Apple ID" drawsBackground="YES" id="BXa-Re-rs3">
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
</textFieldCell>
|
||||||
|
<connections>
|
||||||
|
<outlet property="delegate" destination="Voe-Tx-rLC" id="QtW-r2-Vuh"/>
|
||||||
|
<outlet property="nextKeyView" destination="9rp-Vx-rvB" id="bQY-qj-Sej"/>
|
||||||
|
</connections>
|
||||||
|
</textField>
|
||||||
|
<secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9rp-Vx-rvB">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="300" height="22"/>
|
||||||
|
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="Password" drawsBackground="YES" usesSingleLineMode="YES" id="xqJ-wt-DlP">
|
||||||
|
<font key="font" metaFont="system"/>
|
||||||
|
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||||
|
<allowedInputSourceLocales>
|
||||||
|
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||||
|
</allowedInputSourceLocales>
|
||||||
|
</secureTextFieldCell>
|
||||||
|
<connections>
|
||||||
|
<outlet property="delegate" destination="Voe-Tx-rLC" id="qav-xj-izy"/>
|
||||||
|
</connections>
|
||||||
|
</secureTextField>
|
||||||
|
</subviews>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="9rp-Vx-rvB" firstAttribute="width" secondItem="urc-xw-Dhc" secondAttribute="width" id="Eht-pU-Gyh"/>
|
||||||
|
<constraint firstItem="zLd-d8-ghZ" firstAttribute="width" secondItem="urc-xw-Dhc" secondAttribute="width" id="mg7-Kq-abL"/>
|
||||||
|
<constraint firstAttribute="width" constant="300" id="zqf-x6-BET"/>
|
||||||
|
</constraints>
|
||||||
|
<visibilityPriorities>
|
||||||
|
<integer value="1000"/>
|
||||||
|
<integer value="1000"/>
|
||||||
|
</visibilityPriorities>
|
||||||
|
<customSpacing>
|
||||||
|
<real value="3.4028234663852886e+38"/>
|
||||||
|
<real value="3.4028234663852886e+38"/>
|
||||||
|
</customSpacing>
|
||||||
|
</stackView>
|
||||||
|
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||||
|
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="AltServer" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="appMenu" destination="uQy-DD-JDr" id="7cY-Ov-AOW"/>
|
||||||
|
<outlet property="authenticationAppleIDTextField" destination="zLd-d8-ghZ" id="wW5-0J-zdq"/>
|
||||||
|
<outlet property="authenticationPasswordTextField" destination="9rp-Vx-rvB" id="ZoC-DI-jzQ"/>
|
||||||
|
<outlet property="connectedDevicesMenu" destination="KJ9-WY-pW1" id="Mcv-64-iFU"/>
|
||||||
|
</connections>
|
||||||
|
</customObject>
|
||||||
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
||||||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||||
<items>
|
<items>
|
||||||
@@ -21,98 +76,27 @@
|
|||||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
|
||||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
|
||||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||||
<menuItem title="Services" id="NMo-om-nkz">
|
<menuItem title="Install AltStore" id="MJ8-Lt-SSV">
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
<menu key="submenu" title="Install AltStore" systemMenu="recentDocuments" id="KJ9-WY-pW1">
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
|
||||||
<menuItem title="Hide AltServer" keyEquivalent="h" id="Olw-nP-bQN">
|
|
||||||
<connections>
|
|
||||||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
|
||||||
<menuItem title="Quit AltServer" keyEquivalent="q" id="4sb-4s-VLi">
|
|
||||||
<connections>
|
|
||||||
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="File" id="dMs-cI-mzQ">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
|
||||||
<items>
|
|
||||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
|
||||||
<connections>
|
|
||||||
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
|
||||||
<connections>
|
|
||||||
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
|
||||||
<items>
|
<items>
|
||||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
<menuItem title="No Connected Devices" id="N5N-3K-XuR">
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
|
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="DKG-yI-Ujv"/>
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
</items>
|
</items>
|
||||||
|
<connections>
|
||||||
|
<outlet property="delegate" destination="Voe-Tx-rLC" id="VYb-BL-Zri"/>
|
||||||
|
</connections>
|
||||||
</menu>
|
</menu>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
<menuItem isSeparatorItem="YES" id="mVM-Nm-Zi9"/>
|
||||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
<menuItem title="Quit AltServer" keyEquivalent="q" id="4sb-4s-VLi">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
|
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
|
||||||
<connections>
|
|
||||||
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
|
||||||
<connections>
|
|
||||||
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
|
|
||||||
<connections>
|
|
||||||
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
|
|
||||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
|
||||||
<connections>
|
|
||||||
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
|
|
||||||
</connections>
|
</connections>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
</items>
|
</items>
|
||||||
@@ -337,325 +321,6 @@
|
|||||||
</items>
|
</items>
|
||||||
</menu>
|
</menu>
|
||||||
</menuItem>
|
</menuItem>
|
||||||
<menuItem title="Format" id="jxT-CU-nIS">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
|
||||||
<connections>
|
|
||||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
|
|
||||||
<connections>
|
|
||||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
|
|
||||||
<connections>
|
|
||||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
|
||||||
<connections>
|
|
||||||
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
|
||||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
|
||||||
<connections>
|
|
||||||
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
|
||||||
<connections>
|
|
||||||
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
|
||||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
|
|
||||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
|
||||||
<connections>
|
|
||||||
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
|
|
||||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Text" id="Fal-I4-PZk">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
|
||||||
<connections>
|
|
||||||
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
|
||||||
<connections>
|
|
||||||
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Justify" id="J5U-5w-g23">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
|
||||||
<connections>
|
|
||||||
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
|
|
||||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="YGs-j5-SAR">
|
|
||||||
<string key="title"> Default</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="Lbh-J2-qVU">
|
|
||||||
<string key="title"> Left to Right</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="jFq-tB-4Kx">
|
|
||||||
<string key="title"> Right to Left</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
|
|
||||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="Nop-cj-93Q">
|
|
||||||
<string key="title"> Default</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="BgM-ve-c93">
|
|
||||||
<string key="title"> Left to Right</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="RB4-Sm-HuC">
|
|
||||||
<string key="title"> Right to Left</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
|
|
||||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="View" id="H8h-7b-M4v">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
|
|
||||||
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Window" id="aUF-d1-5bR">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
|
||||||
<connections>
|
|
||||||
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
|
||||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||||
<modifierMask key="keyEquivalentModifierMask"/>
|
<modifierMask key="keyEquivalentModifierMask"/>
|
||||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||||
@@ -674,170 +339,8 @@
|
|||||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
|
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
|
||||||
</connections>
|
</connections>
|
||||||
</application>
|
</application>
|
||||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="AltServer" customModuleProvider="target"/>
|
|
||||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
|
||||||
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="75" y="0.0"/>
|
<point key="canvasLocation" x="75" y="0.0"/>
|
||||||
</scene>
|
</scene>
|
||||||
<!--Window Controller-->
|
|
||||||
<scene sceneID="R2V-B0-nI4">
|
|
||||||
<objects>
|
|
||||||
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
|
|
||||||
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
|
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
|
||||||
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
|
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
|
||||||
<connections>
|
|
||||||
<outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
|
|
||||||
</connections>
|
|
||||||
</window>
|
|
||||||
<connections>
|
|
||||||
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
|
|
||||||
</connections>
|
|
||||||
</windowController>
|
|
||||||
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="75" y="250"/>
|
|
||||||
</scene>
|
|
||||||
<!--View Controller-->
|
|
||||||
<scene sceneID="hIz-AP-VOD">
|
|
||||||
<objects>
|
|
||||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="AltServer" customModuleProvider="target" sceneMemberID="viewController">
|
|
||||||
<view key="view" id="m2S-Jp-Qdl">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
|
||||||
<subviews>
|
|
||||||
<stackView distribution="fill" orientation="vertical" alignment="centerX" spacing="20" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bO3-CU-R3w">
|
|
||||||
<rect key="frame" x="90" y="49" width="300" height="172"/>
|
|
||||||
<subviews>
|
|
||||||
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="JQK-wm-ZlO">
|
|
||||||
<rect key="frame" x="0.0" y="103" width="300" height="69"/>
|
|
||||||
<subviews>
|
|
||||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gSB-oz-v9o">
|
|
||||||
<rect key="frame" x="-2" y="52" width="56" height="17"/>
|
|
||||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Apple ID" id="9BA-bC-wbL">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
</textFieldCell>
|
|
||||||
</textField>
|
|
||||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="7XQ-t2-tot">
|
|
||||||
<rect key="frame" x="0.0" y="26" width="300" height="22"/>
|
|
||||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="Email Address" drawsBackground="YES" id="BcE-BW-rdX">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
</textFieldCell>
|
|
||||||
</textField>
|
|
||||||
<secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RJ6-Gp-oBs">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="300" height="22"/>
|
|
||||||
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="Password" drawsBackground="YES" usesSingleLineMode="YES" id="Oxo-HS-d2N">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<allowedInputSourceLocales>
|
|
||||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
|
||||||
</allowedInputSourceLocales>
|
|
||||||
</secureTextFieldCell>
|
|
||||||
</secureTextField>
|
|
||||||
</subviews>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="7XQ-t2-tot" firstAttribute="width" secondItem="JQK-wm-ZlO" secondAttribute="width" id="Cvc-T9-R6G"/>
|
|
||||||
<constraint firstAttribute="width" constant="300" id="KPr-Ft-Wmt"/>
|
|
||||||
<constraint firstItem="RJ6-Gp-oBs" firstAttribute="width" secondItem="JQK-wm-ZlO" secondAttribute="width" id="nIJ-OV-uhm"/>
|
|
||||||
</constraints>
|
|
||||||
<visibilityPriorities>
|
|
||||||
<integer value="1000"/>
|
|
||||||
<integer value="1000"/>
|
|
||||||
<integer value="1000"/>
|
|
||||||
</visibilityPriorities>
|
|
||||||
<customSpacing>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
</customSpacing>
|
|
||||||
</stackView>
|
|
||||||
<stackView distribution="fill" orientation="vertical" alignment="leading" spacing="4" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BNl-oy-n0L">
|
|
||||||
<rect key="frame" x="0.0" y="41" width="300" height="42"/>
|
|
||||||
<subviews>
|
|
||||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="VdC-tO-mWt">
|
|
||||||
<rect key="frame" x="-2" y="25" width="46" height="17"/>
|
|
||||||
<textFieldCell key="cell" lineBreakMode="clipping" title="Device" id="kxw-TA-9uT">
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
|
||||||
</textFieldCell>
|
|
||||||
</textField>
|
|
||||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fSQ-0R-QEy">
|
|
||||||
<rect key="frame" x="-2" y="-3" width="305" height="25"/>
|
|
||||||
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="tR5-jT-cUe" id="2ld-VC-nij">
|
|
||||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
|
||||||
<font key="font" metaFont="menu"/>
|
|
||||||
<menu key="menu" id="A1j-uZ-XuR">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Item 1" state="on" id="tR5-jT-cUe"/>
|
|
||||||
<menuItem title="Item 2" id="8GQ-cV-M1u"/>
|
|
||||||
<menuItem title="Item 3" id="pw6-Y7-sH0"/>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</popUpButtonCell>
|
|
||||||
<connections>
|
|
||||||
<action selector="chooseDevice:" target="XfG-lQ-9wD" id="QWe-hT-gGV"/>
|
|
||||||
</connections>
|
|
||||||
</popUpButton>
|
|
||||||
</subviews>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstAttribute="width" constant="300" id="H6n-um-gRo"/>
|
|
||||||
<constraint firstItem="fSQ-0R-QEy" firstAttribute="width" secondItem="BNl-oy-n0L" secondAttribute="width" id="bqm-hA-4Dz"/>
|
|
||||||
</constraints>
|
|
||||||
<visibilityPriorities>
|
|
||||||
<integer value="1000"/>
|
|
||||||
<integer value="1000"/>
|
|
||||||
</visibilityPriorities>
|
|
||||||
<customSpacing>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
</customSpacing>
|
|
||||||
</stackView>
|
|
||||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Lkz-Gl-wBp">
|
|
||||||
<rect key="frame" x="86" y="-7" width="129" height="32"/>
|
|
||||||
<buttonCell key="cell" type="push" title="Install AltStore" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="MKD-1Q-nZx">
|
|
||||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
|
||||||
<font key="font" metaFont="system"/>
|
|
||||||
</buttonCell>
|
|
||||||
<connections>
|
|
||||||
<action selector="installAltStore:" target="XfG-lQ-9wD" id="8N9-fZ-aYR"/>
|
|
||||||
</connections>
|
|
||||||
</button>
|
|
||||||
</subviews>
|
|
||||||
<visibilityPriorities>
|
|
||||||
<integer value="1000"/>
|
|
||||||
<integer value="1000"/>
|
|
||||||
<integer value="1000"/>
|
|
||||||
</visibilityPriorities>
|
|
||||||
<customSpacing>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
<real value="3.4028234663852886e+38"/>
|
|
||||||
</customSpacing>
|
|
||||||
</stackView>
|
|
||||||
</subviews>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="bO3-CU-R3w" firstAttribute="centerY" secondItem="m2S-Jp-Qdl" secondAttribute="centerY" id="H0J-sc-0Mn"/>
|
|
||||||
<constraint firstItem="bO3-CU-R3w" firstAttribute="centerX" secondItem="m2S-Jp-Qdl" secondAttribute="centerX" id="bfU-fD-Ihv"/>
|
|
||||||
</constraints>
|
|
||||||
</view>
|
|
||||||
<connections>
|
|
||||||
<outlet property="devicesButton" destination="fSQ-0R-QEy" id="dNS-Ox-X2J"/>
|
|
||||||
<outlet property="emailAddressTextField" destination="7XQ-t2-tot" id="BYZ-a3-3Je"/>
|
|
||||||
<outlet property="passwordTextField" destination="RJ6-Gp-oBs" id="aae-TM-o3X"/>
|
|
||||||
</connections>
|
|
||||||
</viewController>
|
|
||||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="75" y="655"/>
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
</scenes>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ private extension ConnectionManager
|
|||||||
|
|
||||||
print("Processed app data!")
|
print("Processed app data!")
|
||||||
|
|
||||||
guard ALTDeviceManager.shared.connectedDevices.contains(where: { $0.identifier == request.udid }) else { throw ALTServerError(.deviceNotFound) }
|
guard ALTDeviceManager.shared.availableDevices.contains(where: { $0.identifier == request.udid }) else { throw ALTServerError(.deviceNotFound) }
|
||||||
|
|
||||||
print("Writing app data...")
|
print("Writing app data...")
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
//
|
//
|
||||||
// ViewController.swift
|
// ALTDeviceManager+Installation.swift
|
||||||
// AltServer
|
// AltServer
|
||||||
//
|
//
|
||||||
// Created by Riley Testut on 5/24/19.
|
// Created by Riley Testut on 7/1/19.
|
||||||
// Copyright © 2019 Riley Testut. All rights reserved.
|
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Cocoa
|
import Cocoa
|
||||||
|
import UserNotifications
|
||||||
|
|
||||||
enum InstallError: Error
|
enum InstallError: Error
|
||||||
{
|
{
|
||||||
@@ -26,119 +27,39 @@ enum InstallError: Error
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ViewController: NSViewController
|
extension ALTDeviceManager
|
||||||
{
|
{
|
||||||
@IBOutlet private var emailAddressTextField: NSTextField!
|
func installAltStore(to device: ALTDevice, appleID: String, password: String, completion: @escaping (Result<Void, Error>) -> Void)
|
||||||
@IBOutlet private var passwordTextField: NSSecureTextField!
|
|
||||||
|
|
||||||
@IBOutlet private var devicesButton: NSPopUpButton!
|
|
||||||
|
|
||||||
private var currentDevice: ALTDevice?
|
|
||||||
|
|
||||||
override func viewDidLoad()
|
|
||||||
{
|
|
||||||
super.viewDidLoad()
|
|
||||||
|
|
||||||
ConnectionManager.shared.stateUpdateHandler = { (state) in
|
|
||||||
DispatchQueue.main.async {
|
|
||||||
switch state
|
|
||||||
{
|
|
||||||
case .notRunning: self.view.window?.title = ""
|
|
||||||
case .connecting: self.view.window?.title = "Connecting...."
|
|
||||||
case .running(let service): self.view.window?.title = service.name ?? ""
|
|
||||||
case .failed(let error): self.view.window?.title = error.localizedDescription
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionManager.shared.start()
|
|
||||||
|
|
||||||
self.update()
|
|
||||||
}
|
|
||||||
|
|
||||||
func update()
|
|
||||||
{
|
|
||||||
self.devicesButton.removeAllItems()
|
|
||||||
|
|
||||||
let devices = ALTDeviceManager.shared.connectedDevices
|
|
||||||
|
|
||||||
if devices.isEmpty
|
|
||||||
{
|
|
||||||
self.devicesButton.addItem(withTitle: "No Connected Device")
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for device in devices
|
|
||||||
{
|
|
||||||
self.devicesButton.addItem(withTitle: device.name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if let currentDevice = self.currentDevice, let index = devices.firstIndex(of: currentDevice)
|
|
||||||
{
|
|
||||||
self.devicesButton.selectItem(at: index)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
self.currentDevice = devices.first
|
|
||||||
self.devicesButton.selectItem(at: 0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private extension ViewController
|
|
||||||
{
|
|
||||||
@IBAction func installAltStore(_ sender: NSButton)
|
|
||||||
{
|
|
||||||
guard let device = self.currentDevice else { return }
|
|
||||||
guard !self.emailAddressTextField.stringValue.isEmpty, !self.passwordTextField.stringValue.isEmpty else { return }
|
|
||||||
|
|
||||||
self.installAltStore(to: device)
|
|
||||||
}
|
|
||||||
|
|
||||||
@IBAction func chooseDevice(_ sender: NSPopUpButton)
|
|
||||||
{
|
|
||||||
let devices = ALTDeviceManager.shared.connectedDevices
|
|
||||||
guard !devices.isEmpty else { return }
|
|
||||||
|
|
||||||
let index = sender.indexOfSelectedItem
|
|
||||||
|
|
||||||
let device = devices[index]
|
|
||||||
self.currentDevice = device
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private extension ViewController
|
|
||||||
{
|
|
||||||
func installAltStore(to device: ALTDevice)
|
|
||||||
{
|
{
|
||||||
let destinationDirectoryURL = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString)
|
let destinationDirectoryURL = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString)
|
||||||
|
|
||||||
func finish(_ error: Error?, title: String = "")
|
func finish(_ error: Error?, title: String = "")
|
||||||
{
|
{
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
let alert = NSAlert()
|
|
||||||
|
|
||||||
if let error = error
|
if let error = error
|
||||||
{
|
{
|
||||||
alert.messageText = title
|
completion(.failure(error))
|
||||||
alert.informativeText = error.localizedDescription
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
alert.messageText = NSLocalizedString("Successfully installed AltStore!", comment: "")
|
completion(.success(()))
|
||||||
}
|
}
|
||||||
|
|
||||||
alert.runModal()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try? FileManager.default.removeItem(at: destinationDirectoryURL)
|
try? FileManager.default.removeItem(at: destinationDirectoryURL)
|
||||||
}
|
}
|
||||||
|
|
||||||
self.authenticate() { (result) in
|
self.authenticate(appleID: appleID, password: password) { (result) in
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
let account = try result.get()
|
let account = try result.get()
|
||||||
|
|
||||||
|
let content = UNMutableNotificationContent()
|
||||||
|
content.title = String(format: NSLocalizedString("Installing AltStore to %@...", comment: ""), device.name)
|
||||||
|
|
||||||
|
let request = UNNotificationRequest(identifier: UUID().uuidString, content: content, trigger: nil)
|
||||||
|
UNUserNotificationCenter.current().add(request)
|
||||||
|
|
||||||
self.fetchTeam(for: account) { (result) in
|
self.fetchTeam(for: account) { (result) in
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@@ -253,9 +174,9 @@ private extension ViewController
|
|||||||
downloadTask.resume()
|
downloadTask.resume()
|
||||||
}
|
}
|
||||||
|
|
||||||
func authenticate(completionHandler: @escaping (Result<ALTAccount, Error>) -> Void)
|
func authenticate(appleID: String, password: String, completionHandler: @escaping (Result<ALTAccount, Error>) -> Void)
|
||||||
{
|
{
|
||||||
ALTAppleAPI.shared.authenticate(appleID: self.emailAddressTextField.stringValue, password: self.passwordTextField.stringValue) { (account, error) in
|
ALTAppleAPI.shared.authenticate(appleID: appleID, password: password) { (account, error) in
|
||||||
let result = Result(account, error)
|
let result = Result(account, error)
|
||||||
completionHandler(result)
|
completionHandler(result)
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@property (class, nonatomic, readonly) ALTDeviceManager *sharedManager;
|
@property (class, nonatomic, readonly) ALTDeviceManager *sharedManager;
|
||||||
|
|
||||||
@property (nonatomic, readonly) NSArray<ALTDevice *> *connectedDevices;
|
@property (nonatomic, readonly) NSArray<ALTDevice *> *connectedDevices;
|
||||||
|
@property (nonatomic, readonly) NSArray<ALTDevice *> *availableDevices;
|
||||||
|
|
||||||
- (NSProgress *)installAppAtURL:(NSURL *)fileURL toDeviceWithUDID:(NSString *)udid completionHandler:(void (^)(BOOL success, NSError *_Nullable error))completionHandler;
|
- (NSProgress *)installAppAtURL:(NSURL *)fileURL toDeviceWithUDID:(NSString *)udid completionHandler:(void (^)(BOOL success, NSError *_Nullable error))completionHandler;
|
||||||
|
|
||||||
|
|||||||
@@ -518,7 +518,17 @@ NSErrorDomain const ALTDeviceErrorDomain = @"com.rileytestut.ALTDeviceError";
|
|||||||
|
|
||||||
- (NSArray<ALTDevice *> *)connectedDevices
|
- (NSArray<ALTDevice *> *)connectedDevices
|
||||||
{
|
{
|
||||||
NSMutableArray *connectedDevices = [NSMutableArray array];
|
return [self availableDevicesIncludingNetworkDevices:NO];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSArray<ALTDevice *> *)availableDevices
|
||||||
|
{
|
||||||
|
return [self availableDevicesIncludingNetworkDevices:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSArray<ALTDevice *> *)availableDevicesIncludingNetworkDevices:(BOOL)includingNetworkDevices
|
||||||
|
{
|
||||||
|
NSMutableSet *connectedDevices = [NSMutableSet set];
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
char **udids = NULL;
|
char **udids = NULL;
|
||||||
@@ -533,11 +543,18 @@ NSErrorDomain const ALTDeviceErrorDomain = @"com.rileytestut.ALTDeviceError";
|
|||||||
char *udid = udids[i];
|
char *udid = udids[i];
|
||||||
|
|
||||||
idevice_t device = NULL;
|
idevice_t device = NULL;
|
||||||
idevice_new(&device, udid);
|
|
||||||
|
if (includingNetworkDevices)
|
||||||
|
{
|
||||||
|
idevice_new(&device, udid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
idevice_new_ignore_network(&device, udid);
|
||||||
|
}
|
||||||
|
|
||||||
if (!device)
|
if (!device)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "ERROR: No device with UDID %s attached.\n", udid);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,7 +597,7 @@ NSErrorDomain const ALTDeviceErrorDomain = @"com.rileytestut.ALTDeviceError";
|
|||||||
|
|
||||||
idevice_device_list_free(udids);
|
idevice_device_list_free(udids);
|
||||||
|
|
||||||
return connectedDevices;
|
return connectedDevices.allObjects;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
<string>Copyright © 2019 Riley Testut. All rights reserved.</string>
|
<string>Copyright © 2019 Riley Testut. All rights reserved.</string>
|
||||||
<key>NSMainStoryboardFile</key>
|
<key>NSMainStoryboardFile</key>
|
||||||
<string>Main</string>
|
<string>Main</string>
|
||||||
|
<key>LSUIElement</key>
|
||||||
|
<true/>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
BF1E315A22A0620000370A3C /* NSError+ALTServerError.m in Sources */ = {isa = PBXBuildFile; fileRef = BF1E314922A060F400370A3C /* NSError+ALTServerError.m */; };
|
BF1E315A22A0620000370A3C /* NSError+ALTServerError.m in Sources */ = {isa = PBXBuildFile; fileRef = BF1E314922A060F400370A3C /* NSError+ALTServerError.m */; };
|
||||||
BF1E315F22A0635900370A3C /* libAltKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1E315022A0616100370A3C /* libAltKit.a */; };
|
BF1E315F22A0635900370A3C /* libAltKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1E315022A0616100370A3C /* libAltKit.a */; };
|
||||||
BF1E316022A0636400370A3C /* libAltKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1E315022A0616100370A3C /* libAltKit.a */; };
|
BF1E316022A0636400370A3C /* libAltKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BF1E315022A0616100370A3C /* libAltKit.a */; };
|
||||||
|
BF3F786422CAA41E008FBD20 /* ALTDeviceManager+Installation.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF3F786322CAA41E008FBD20 /* ALTDeviceManager+Installation.swift */; };
|
||||||
BF43002E22A714AF0051E2BC /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF43002D22A714AF0051E2BC /* Keychain.swift */; };
|
BF43002E22A714AF0051E2BC /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF43002D22A714AF0051E2BC /* Keychain.swift */; };
|
||||||
BF43003022A71C960051E2BC /* UserDefaults+AltStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF43002F22A71C960051E2BC /* UserDefaults+AltStore.swift */; };
|
BF43003022A71C960051E2BC /* UserDefaults+AltStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF43002F22A71C960051E2BC /* UserDefaults+AltStore.swift */; };
|
||||||
BF458690229872EA00BD7491 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF45868F229872EA00BD7491 /* AppDelegate.swift */; };
|
BF458690229872EA00BD7491 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF45868F229872EA00BD7491 /* AppDelegate.swift */; };
|
||||||
BF458692229872EA00BD7491 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF458691229872EA00BD7491 /* ViewController.swift */; };
|
|
||||||
BF458694229872EA00BD7491 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF458693229872EA00BD7491 /* Assets.xcassets */; };
|
BF458694229872EA00BD7491 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF458693229872EA00BD7491 /* Assets.xcassets */; };
|
||||||
BF458697229872EA00BD7491 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BF458695229872EA00BD7491 /* Main.storyboard */; };
|
BF458697229872EA00BD7491 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BF458695229872EA00BD7491 /* Main.storyboard */; };
|
||||||
BF4586C52298CDB800BD7491 /* ALTDeviceManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF4586C42298CDB800BD7491 /* ALTDeviceManager.mm */; };
|
BF4586C52298CDB800BD7491 /* ALTDeviceManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF4586C42298CDB800BD7491 /* ALTDeviceManager.mm */; };
|
||||||
@@ -241,11 +241,11 @@
|
|||||||
BF1E314822A060F400370A3C /* NSError+ALTServerError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError+ALTServerError.h"; sourceTree = "<group>"; };
|
BF1E314822A060F400370A3C /* NSError+ALTServerError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSError+ALTServerError.h"; sourceTree = "<group>"; };
|
||||||
BF1E314922A060F400370A3C /* NSError+ALTServerError.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSError+ALTServerError.m"; sourceTree = "<group>"; };
|
BF1E314922A060F400370A3C /* NSError+ALTServerError.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSError+ALTServerError.m"; sourceTree = "<group>"; };
|
||||||
BF1E315022A0616100370A3C /* libAltKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAltKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
BF1E315022A0616100370A3C /* libAltKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libAltKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
BF3F786322CAA41E008FBD20 /* ALTDeviceManager+Installation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ALTDeviceManager+Installation.swift"; sourceTree = "<group>"; };
|
||||||
BF43002D22A714AF0051E2BC /* Keychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = "<group>"; };
|
BF43002D22A714AF0051E2BC /* Keychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = "<group>"; };
|
||||||
BF43002F22A71C960051E2BC /* UserDefaults+AltStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserDefaults+AltStore.swift"; sourceTree = "<group>"; };
|
BF43002F22A71C960051E2BC /* UserDefaults+AltStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserDefaults+AltStore.swift"; sourceTree = "<group>"; };
|
||||||
BF45868D229872EA00BD7491 /* AltServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AltServer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
BF45868D229872EA00BD7491 /* AltServer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AltServer.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
BF45868F229872EA00BD7491 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
BF45868F229872EA00BD7491 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
BF458691229872EA00BD7491 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
|
||||||
BF458693229872EA00BD7491 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
BF458693229872EA00BD7491 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
BF458696229872EA00BD7491 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
BF458696229872EA00BD7491 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
BF458698229872EA00BD7491 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
BF458698229872EA00BD7491 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
@@ -469,7 +469,6 @@
|
|||||||
children = (
|
children = (
|
||||||
BF45868F229872EA00BD7491 /* AppDelegate.swift */,
|
BF45868F229872EA00BD7491 /* AppDelegate.swift */,
|
||||||
BF458695229872EA00BD7491 /* Main.storyboard */,
|
BF458695229872EA00BD7491 /* Main.storyboard */,
|
||||||
BF458691229872EA00BD7491 /* ViewController.swift */,
|
|
||||||
BF703195229F36FF006E110F /* Devices */,
|
BF703195229F36FF006E110F /* Devices */,
|
||||||
BFD52BDC22A0A659000B7ED1 /* Connections */,
|
BFD52BDC22A0A659000B7ED1 /* Connections */,
|
||||||
BF703194229F36F6006E110F /* Resources */,
|
BF703194229F36F6006E110F /* Resources */,
|
||||||
@@ -630,6 +629,7 @@
|
|||||||
children = (
|
children = (
|
||||||
BF4586C32298CDB800BD7491 /* ALTDeviceManager.h */,
|
BF4586C32298CDB800BD7491 /* ALTDeviceManager.h */,
|
||||||
BF4586C42298CDB800BD7491 /* ALTDeviceManager.mm */,
|
BF4586C42298CDB800BD7491 /* ALTDeviceManager.mm */,
|
||||||
|
BF3F786322CAA41E008FBD20 /* ALTDeviceManager+Installation.swift */,
|
||||||
);
|
);
|
||||||
path = Devices;
|
path = Devices;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -1121,7 +1121,7 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
BF458692229872EA00BD7491 /* ViewController.swift in Sources */,
|
BF3F786422CAA41E008FBD20 /* ALTDeviceManager+Installation.swift in Sources */,
|
||||||
BF1E312B229F474900370A3C /* ConnectionManager.swift in Sources */,
|
BF1E312B229F474900370A3C /* ConnectionManager.swift in Sources */,
|
||||||
BF458690229872EA00BD7491 /* AppDelegate.swift in Sources */,
|
BF458690229872EA00BD7491 /* AppDelegate.swift in Sources */,
|
||||||
BF4586C52298CDB800BD7491 /* ALTDeviceManager.mm in Sources */,
|
BF4586C52298CDB800BD7491 /* ALTDeviceManager.mm in Sources */,
|
||||||
|
|||||||
2
Dependencies/libimobiledevice
vendored
2
Dependencies/libimobiledevice
vendored
Submodule Dependencies/libimobiledevice updated: 7dc84af1fb...df4f2b0ac5
Reference in New Issue
Block a user