Update iOS app to ObjFW changes
FossilOrigin-Name: 3eecffa2af1b183b334ba3153d923b423a4dff8ad4b27fc25630b1987eef00ad
This commit is contained in:
parent
a1ec666ced
commit
ee5c908943
18 changed files with 30 additions and 30 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<scenes>
|
<scenes>
|
||||||
|
@ -20,14 +20,14 @@
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CryptoPassphrase" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GvW-cV-5uf">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CryptoPassphrase" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GvW-cV-5uf">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="630"/>
|
<rect key="frame" x="0.0" y="20" width="375" height="610"/>
|
||||||
<fontDescription key="fontDescription" type="system" weight="black" pointSize="32"/>
|
<fontDescription key="fontDescription" type="system" weight="black" pointSize="32"/>
|
||||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
<color key="shadowColor" red="0.23921568627450979" green="0.396078431372549" blue="0.54509803921568623" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="shadowColor" red="0.23921568627450979" green="0.396078431372549" blue="0.54509803921568623" alpha="1" colorSpace="calibratedRGB"/>
|
||||||
<size key="shadowOffset" width="2" height="2"/>
|
<size key="shadowOffset" width="2" height="2"/>
|
||||||
</label>
|
</label>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Copyright © 2016 - 2021 Jonathan Schleifer" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8gr-rl-2PJ">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Copyright © 2016 - 2023 Jonathan Schleifer" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8gr-rl-2PJ">
|
||||||
<rect key="frame" x="0.0" y="638" width="375" height="21"/>
|
<rect key="frame" x="0.0" y="638" width="375" height="21"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstAttribute="height" constant="21" id="n2V-4D-npg"/>
|
<constraint firstAttribute="height" constant="21" id="n2V-4D-npg"/>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
@ -28,24 +28,24 @@ class SiteStorage: OFObject {
|
||||||
private static let legacyField = NSNumber(value: 1)
|
private static let legacyField = NSNumber(value: 1)
|
||||||
private static let keyFileField = NSNumber(value: 2)
|
private static let keyFileField = NSNumber(value: 2)
|
||||||
|
|
||||||
private var path: OFString
|
private var IRI: OFIRI
|
||||||
private var storage: [String: [NSNumber: AnyObject]]
|
private var storage: [String: [NSNumber: AnyObject]]
|
||||||
private var sites: [String]
|
private var sites: [String]
|
||||||
|
|
||||||
override init() {
|
override init() {
|
||||||
let fileManager = OFFileManager.default
|
let fileManager = OFFileManager.default
|
||||||
let userDataURL = OFSystemInfo.userDataURL!
|
let userDataIRI = OFSystemInfo.userDataIRI!
|
||||||
|
|
||||||
if !fileManager.directoryExists(at: userDataURL) {
|
if !fileManager.directoryExists(at: userDataIRI) {
|
||||||
fileManager.createDirectory(at: userDataURL)
|
fileManager.createDirectory(at: userDataIRI)
|
||||||
}
|
}
|
||||||
|
|
||||||
let URL = userDataURL.appendingPathComponent(
|
let IRI = userDataIRI.appendingPathComponent(
|
||||||
OFString(utf8String: "sites.msgpack"))
|
OFString(utf8String: "sites.msgpack"))
|
||||||
|
|
||||||
var storage: [String: [NSNumber: AnyObject]]? = nil
|
var storage: [String: [NSNumber: AnyObject]]? = nil
|
||||||
OFException.try({
|
OFException.try({
|
||||||
let decoded = (OFData(contentsOf: URL).objectByParsingMessagePack)
|
let decoded = (OFData(contentsOf: IRI).objectByParsingMessagePack)
|
||||||
as? OFDictionary<OFString, OFDictionary<OFNumber, AnyObject>>
|
as? OFDictionary<OFString, OFDictionary<OFNumber, AnyObject>>
|
||||||
storage =
|
storage =
|
||||||
(decoded?.nsObject as? [String: [NSNumber: AnyObject]]) ?? [:]
|
(decoded?.nsObject as? [String: [NSNumber: AnyObject]]) ?? [:]
|
||||||
|
@ -53,7 +53,7 @@ class SiteStorage: OFObject {
|
||||||
storage = [:]
|
storage = [:]
|
||||||
})
|
})
|
||||||
|
|
||||||
self.path = URL.fileSystemRepresentation!
|
self.IRI = IRI
|
||||||
self.storage = storage!
|
self.storage = storage!
|
||||||
self.sites = self.storage.keys.sorted()
|
self.sites = self.storage.keys.sorted()
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ class SiteStorage: OFObject {
|
||||||
private func update() {
|
private func update() {
|
||||||
let ofStorage = (storage as NSDictionary).ofObject
|
let ofStorage = (storage as NSDictionary).ofObject
|
||||||
|
|
||||||
ofStorage.messagePackRepresentation.write(toFile: path)
|
ofStorage.messagePackRepresentation.write(to: IRI)
|
||||||
sites = storage.keys.sorted()
|
sites = storage.keys.sorted()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2016 - 2021 Jonathan Schleifer <js@nil.im>
|
* Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im>
|
||||||
*
|
*
|
||||||
* https://fossil.nil.im/cryptopassphrase
|
* https://fossil.nil.im/cryptopassphrase
|
||||||
*
|
*
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
OF_APPLICATION_DELEGATE(OFAppDelegate)
|
OF_APPLICATION_DELEGATE(OFAppDelegate)
|
||||||
|
|
||||||
@implementation OFAppDelegate
|
@implementation OFAppDelegate
|
||||||
- (void)applicationDidFinishLaunching
|
- (void)applicationDidFinishLaunching: (OFNotification *)notification
|
||||||
{
|
{
|
||||||
int *argc;
|
int *argc;
|
||||||
char ***argv;
|
char ***argv;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue