Comment: | Update iOS app to ObjFW changes |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
3eecffa2af1b183b334ba3153d923b42 |
User & Date: | js on 2023-04-01 17:20:07 |
Other Links: | manifest | tags |
2024-08-04
| ||
13:34 | Add meson.build check-in: 0992287dbb user: js tags: trunk | |
2023-04-01
| ||
17:20 | Update iOS app to ObjFW changes check-in: 3eecffa2af user: js tags: trunk | |
2022-11-15
| ||
22:54 | Adjust to ObjFW changes check-in: 7b7392ad32 user: js tags: trunk | |
Modified CryptoPassphrase.h from [0e13d0ba93] to [f6eb515e78].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified CryptoPassphrase.m from [909b4ca41c] to [14ff1e3fb0].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified LegacyPasswordGenerator.h from [d37bc95a02] to [f1d95b109f].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified LegacyPasswordGenerator.m from [1a1bc2ad1c] to [78aa455a3f].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified NewPasswordGenerator.h from [57676e1f36] to [ca49f3edff].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified NewPasswordGenerator.m from [64379f8a80] to [1b39ddb3e5].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified PasswordGenerator.h from [efd22fce50] to [8ccbdb0a5d].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/AboutController.swift from [a26d6d700c] to [e8c640fd90].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/AddSiteController.swift from [bae2881b2b] to [b0f513918e].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/AppDelegate.swift from [1c9e2fc8dc] to [cf4200926a].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/Base.lproj/LaunchScreen.storyboard from [9b62e30aa9] to [6c77d95da3].
1 | <?xml version="1.0" encoding="UTF-8"?> | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | <?xml version="1.0" encoding="UTF-8"?> <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"/> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> <!--View Controller--> <scene sceneID="EHf-IW-A2E"> <objects> <viewController id="01J-lp-oVM" sceneMemberID="viewController"> <layoutGuides> <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> </layoutGuides> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <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"> <rect key="frame" x="0.0" y="20" width="375" height="610"/> <fontDescription key="fontDescription" type="system" weight="black" pointSize="32"/> <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> <nil key="highlightedColor"/> <color key="shadowColor" red="0.23921568627450979" green="0.396078431372549" blue="0.54509803921568623" alpha="1" colorSpace="calibratedRGB"/> <size key="shadowOffset" width="2" height="2"/> </label> <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"/> <constraints> <constraint firstAttribute="height" constant="21" id="n2V-4D-npg"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="14"/> <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/> <nil key="highlightedColor"/> |
︙ | ︙ |
Modified iOS/HTTPServerDelegate.swift from [75606dc4b2] to [2e38a624c6].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/MainViewController.swift from [5428673e3a] to [3dc7751593].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/SelectKeyFileController.swift from [db56ffe460] to [a3228c886a].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/ShowDetailsController.swift from [cfd55e8cf6] to [ed04d2ce29].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/SiteStorage.swift from [e4b689e0a1] to [9f3b8af52a].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ | |||
24 25 26 27 28 29 30 | import ObjFWBridge class SiteStorage: OFObject { private static let lengthField = NSNumber(value: 0) private static let legacyField = NSNumber(value: 1) private static let keyFileField = NSNumber(value: 2) | | | | | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | import ObjFWBridge class SiteStorage: OFObject { private static let lengthField = NSNumber(value: 0) private static let legacyField = NSNumber(value: 1) private static let keyFileField = NSNumber(value: 2) private var IRI: OFIRI private var storage: [String: [NSNumber: AnyObject]] private var sites: [String] override init() { let fileManager = OFFileManager.default let userDataIRI = OFSystemInfo.userDataIRI! if !fileManager.directoryExists(at: userDataIRI) { fileManager.createDirectory(at: userDataIRI) } let IRI = userDataIRI.appendingPathComponent( OFString(utf8String: "sites.msgpack")) var storage: [String: [NSNumber: AnyObject]]? = nil OFException.try({ let decoded = (OFData(contentsOf: IRI).objectByParsingMessagePack) as? OFDictionary<OFString, OFDictionary<OFNumber, AnyObject>> storage = (decoded?.nsObject as? [String: [NSNumber: AnyObject]]) ?? [:] }, catch: { (OFException) in storage = [:] }) self.IRI = IRI self.storage = storage! self.sites = self.storage.keys.sorted() } func sites(withFilter filter: String?) -> [String] { return storage.keys.sorted().filter({ (name) in if filter == nil || filter!.isEmpty { |
︙ | ︙ | |||
111 112 113 114 115 116 117 | storage[name] = nil self.update() } private func update() { let ofStorage = (storage as NSDictionary).ofObject | | | 111 112 113 114 115 116 117 118 119 120 121 | storage[name] = nil self.update() } private func update() { let ofStorage = (storage as NSDictionary).ofObject ofStorage.messagePackRepresentation.write(to: IRI) sites = storage.keys.sorted() } } |
Modified iOS/bridge.h from [d758789aeb] to [cae74c114e].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ |
Modified iOS/main.m from [2375183c78] to [a16da4c6f5].
1 | /* | | | 1 2 3 4 5 6 7 8 9 | /* * Copyright (c) 2016 - 2023 Jonathan Schleifer <js@nil.im> * * https://fossil.nil.im/cryptopassphrase * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * |
︙ | ︙ | |||
28 29 30 31 32 33 34 | @interface OFAppDelegate: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE(OFAppDelegate) @implementation OFAppDelegate | | | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | @interface OFAppDelegate: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE(OFAppDelegate) @implementation OFAppDelegate - (void)applicationDidFinishLaunching: (OFNotification *)notification { int *argc; char ***argv; int status; [[OFApplication sharedApplication] getArgumentCount: &argc |
︙ | ︙ |