Comment: | iOS: Migrate to Swift
This is in preparation for moving to SwiftUI at some point. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2c5f88ebb05d766e4572c6a4e3898624 |
User & Date: | js 2019-06-16 05:25:10 |
2019-06-16
| ||
15:51 | Adjust to ObjFW changes check-in: 958a05efc9 user: js tags: trunk | |
05:25 | iOS: Migrate to Swift check-in: 2c5f88ebb0 user: js tags: trunk | |
2019-01-22
| ||
23:42 | [iOS] Do not automatically set the focus check-in: 4a61a3ddab user: js tags: trunk | |
Deleted iOS/AboutController.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted iOS/AboutController.m.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added iOS/AboutController.swift.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import UIKit class AboutController: UIViewController, UIWebViewDelegate { @IBOutlet var webView: UIWebView? override func viewDidLoad() { super.viewDidLoad() self.automaticallyAdjustsScrollViewInsets = false let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] webView?.loadHTMLString( "<html>" + "<head>" + "<style type='text/css'>" + "body {" + " font-family: sans-serif;" + "}" + "" + "#title {" + " font-size: 2.5em;" + " font-weight: bold;" + "}" + "" + "#copyright {" + " font-size: 0.9em;" + " font-weight: bold;" + "}" + "</style>" + "</head>" + "<body>" + "<div id='title'>" + " scrypt-pwgen \(version ?? "")" + "</div>" + "<div id='copyright'>" + " Copyright © 2016 - 2019 Jonathan Schleifer" + "</div>" + "<p name='free_software'>" + " scrypt-pwgen is free software and the source code is available" + " at <a href='https://heap.zone/scrypt-pwgen/'>here</a>." + "</p>" + "<p name='objfw'>" + " It makes use of the" + " <a href='https://heap.zone/objfw/'>ObjFW</a> framework and" + " also uses its scrypt implementation." + "</p>" + "</body>" + "</html>", baseURL: nil) } func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebView.NavigationType) -> Bool { if #available(iOS 10.0, *), navigationType == UIWebView.NavigationType.linkClicked, let url = request.url { UIApplication.shared.open(url) return false } return true } } |
Deleted iOS/AddSiteController.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted iOS/AddSiteController.m.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added iOS/AddSiteController.swift.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import UIKit import ObjFW import ObjFW_Bridge class AddSiteController: UITableViewController { @IBOutlet var nameField: UITextField? @IBOutlet var lengthField: UITextField? @IBOutlet var legacySwitch: UISwitch? public var keyFile: String? @IBOutlet var keyFileLabel: UILabel? public var mainViewController: MainViewController? override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) if indexPath.section == 1 && indexPath.row == 1 { self.performSegue(withIdentifier: "selectKeyFile", sender: self) } } override func tableView( _ tableView: UITableView, willSelectRowAt indexPath: IndexPath ) -> IndexPath? { if indexPath.section == 1 && indexPath.row == 1 { return indexPath } return nil } private func showAlert(controller: UIViewController, title: String, message: String) { let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) alert.addAction( UIAlertAction(title: "OK", style: .default, handler: nil)) controller.present(alert, animated: true, completion: nil) } @IBAction func done(_ sender: Any) { guard let name = nameField?.text?.ofObject else { return } guard let lengthString = lengthField?.text?.ofObject else { return } guard name.length > 0 else { showAlert(controller: self, title: "Name missing", message: "Please enter a name.") return } var lengthValid = true var length: size_t = 0 OFException.try({ length = lengthString.decimalValue if length < 3 || length > 64 { lengthValid = false } }, catch: { (OFException) in lengthValid = false }) guard lengthValid else { showAlert(controller: self, title: "Invalid length", message: "Please enter a number between 3 and 64.") return } guard let siteStorage = mainViewController?.siteStorage else { return } guard !siteStorage.hasSite(name) else { showAlert(controller: self, title: "Site Already Exists", message: "Please pick a name that does not exist yet.") return } let keyFile = self.keyFile?.ofObject siteStorage.setSite(name, length: length, legacy: legacySwitch?.isOn ?? false, keyFile: keyFile) mainViewController?.reset() navigationController?.popViewController(animated: true) } @IBAction func cancel(_ sender: Any) { navigationController?.popViewController(animated: true) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "selectKeyFile" { let controller = segue.destination as? SelectKeyFileController controller?.addSiteController = self } } } |
Deleted iOS/AppDelegate.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted iOS/AppDelegate.m.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added iOS/AppDelegate.swift.
> > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import UIKit @objc class AppDelegate: UIResponder, UIApplicationDelegate { public var window: UIWindow? } |
Changes to iOS/Base.lproj/Main.storyboard.
1 | <?xml version="1.0" encoding="UTF-8"?> | | | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BN3-Y7-zvx"> <device id="retina4_7" orientation="portrait"> <adaptation id="fullscreen"/> </device> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> <!--Navigation Controller--> <scene sceneID="edE-sY-0Cv"> <objects> <navigationController id="BN3-Y7-zvx" sceneMemberID="viewController"> |
︙ | ︙ | |||
28 29 30 31 32 33 34 | </navigationItem> </objects> <point key="canvasLocation" x="262" y="-515"/> </scene> <!--Sites--> <scene sceneID="raj-gx-00d"> <objects> | | | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | </navigationItem> </objects> <point key="canvasLocation" x="262" y="-515"/> </scene> <!--Sites--> <scene sceneID="raj-gx-00d"> <objects> <viewController id="P19-6i-fpd" customClass="MainViewController" customModule="scrypt_pwgen" customModuleProvider="target" sceneMemberID="viewController"> <layoutGuides> <viewControllerLayoutGuide type="top" id="XVy-9K-Bul"/> <viewControllerLayoutGuide type="bottom" id="TZK-mv-9Bn"/> </layoutGuides> <view key="view" contentMode="scaleToFill" id="5FM-eD-86d"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
︙ | ︙ | |||
89 90 91 92 93 94 95 | <placeholder placeholderIdentifier="IBFirstResponder" id="yxW-Ki-6KI" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="1060" y="-516"/> </scene> <!--About--> <scene sceneID="rga-fS-ski"> <objects> | | | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | <placeholder placeholderIdentifier="IBFirstResponder" id="yxW-Ki-6KI" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="1060" y="-516"/> </scene> <!--About--> <scene sceneID="rga-fS-ski"> <objects> <viewController title="About" id="MZ3-iZ-Dsf" customClass="AboutController" customModule="scrypt_pwgen" customModuleProvider="target" sceneMemberID="viewController"> <layoutGuides> <viewControllerLayoutGuide type="top" id="8k0-QJ-gsC"/> <viewControllerLayoutGuide type="bottom" id="NSX-G5-c03"/> </layoutGuides> <view key="view" contentMode="scaleToFill" id="VbJ-Zv-Wf9"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
︙ | ︙ | |||
126 127 128 129 130 131 132 | <placeholder placeholderIdentifier="IBFirstResponder" id="VTJ-jm-hyt" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="1992.8" y="326.98650674662673"/> </scene> <!--Add Site Controller--> <scene sceneID="IxZ-dn-p6h"> <objects> | | | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | <placeholder placeholderIdentifier="IBFirstResponder" id="VTJ-jm-hyt" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="1992.8" y="326.98650674662673"/> </scene> <!--Add Site Controller--> <scene sceneID="IxZ-dn-p6h"> <objects> <tableViewController id="mTn-Td-fIF" customClass="AddSiteController" customModule="scrypt_pwgen" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="cum-L6-K1B"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <sections> <tableViewSection id="Whg-Qc-bTG"> <cells> |
︙ | ︙ | |||
238 239 240 241 242 243 244 | <rect key="frame" x="0.0" y="203" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Oqt-88-vl9" id="j4y-Zr-ep4"> <rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Key file" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uyw-CW-atj"> | | | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | <rect key="frame" x="0.0" y="203" width="375" height="44"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Oqt-88-vl9" id="j4y-Zr-ep4"> <rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/> <autoresizingMask key="autoresizingMask"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Key file" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Uyw-CW-atj"> <rect key="frame" x="16" y="11.5" width="100" height="21"/> <constraints> <constraint firstAttribute="width" constant="100" id="5d9-re-aJA"/> </constraints> <fontDescription key="fontDescription" type="system" pointSize="17"/> <nil key="textColor"/> <nil key="highlightedColor"/> </label> |
︙ | ︙ | |||
302 303 304 305 306 307 308 | </tableViewSection> </objects> <point key="canvasLocation" x="1992.8" y="-1102.3988005997003"/> </scene> <!--Select Key File Controller--> <scene sceneID="fKq-Aa-JNA"> <objects> | | | 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | </tableViewSection> </objects> <point key="canvasLocation" x="1992.8" y="-1102.3988005997003"/> </scene> <!--Select Key File Controller--> <scene sceneID="fKq-Aa-JNA"> <objects> <tableViewController id="4bs-rP-TxE" customClass="SelectKeyFileController" customModule="scrypt_pwgen" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="SYH-wm-J8Z"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="QAR-8T-qhV"> <rect key="frame" x="0.0" y="28" width="375" height="44"/> |
︙ | ︙ | |||
340 341 342 343 344 345 346 | <placeholder placeholderIdentifier="IBFirstResponder" id="hBM-t2-PD9" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="2935" y="-1234"/> </scene> <!--Show Details Controller--> <scene sceneID="rn9-fJ-mg7"> <objects> | | | 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | <placeholder placeholderIdentifier="IBFirstResponder" id="hBM-t2-PD9" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="2935" y="-1234"/> </scene> <!--Show Details Controller--> <scene sceneID="rn9-fJ-mg7"> <objects> <tableViewController id="ayJ-fs-aIU" customClass="ShowDetailsController" customModule="scrypt_pwgen" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="vWS-Yc-qQ5"> <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <sections> <tableViewSection id="pum-yC-c7w"> <cells> |
︙ | ︙ |
Deleted iOS/HTTPServerDelegate.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted iOS/HTTPServerDelegate.m.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added iOS/HTTPServerDelegate.swift.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import Foundation import ObjFW class HTTPServerDelegate: OFObject, OFHTTPServerDelegate { func server(_ server: OFHTTPServer, didReceive request: OFHTTPRequest, requestBody: OFStream?, response: OFHTTPResponse) { print("\(request)") } } |
Deleted iOS/MainViewController.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted iOS/MainViewController.m.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added iOS/MainViewController.swift.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import UIKit import ObjFW class MainViewController: UIViewController, UISearchBarDelegate, UITableViewDelegate, UITableViewDataSource { public var sites = OFArray<OFString>() public var siteStorage = SiteStorage() @IBOutlet var searchBar: UISearchBar? @IBOutlet var tableView: UITableView? override func viewDidLoad() { super.viewDidLoad() self.reset() } func reset() { searchBar?.text = "" sites = siteStorage.sites(withFilter: nil) tableView?.reloadData() } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return sites.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "site") ?? UITableViewCell(style: .default, reuseIdentifier: "site") cell.textLabel?.text = sites[indexPath.row].nsObject return cell } func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { sites = siteStorage.sites(withFilter: searchBar.text?.ofObject) tableView?.reloadData() } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { self.performSegue(withIdentifier: "showDetails", sender: self) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { switch segue.identifier { case .some("addSite"): let destination = segue.destination as? AddSiteController destination?.mainViewController = self case .some("showDetails"): let destination = segue.destination as? ShowDetailsController destination?.mainViewController = self default: break } } } |
Deleted iOS/SelectKeyFileController.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted iOS/SelectKeyFileController.m.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added iOS/SelectKeyFileController.swift.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import ObjFW import UIKit class SelectKeyFileController: UITableViewController { public var addSiteController: AddSiteController? private var keyFiles: [String] = [] private var httpServer: OFHTTPServer private var httpServerDelegate: HTTPServerDelegate private var httpServerThread: OFThread required init?(coder aDecoder: NSCoder) { httpServer = OFHTTPServer() httpServer.host = "127.0.0.1".ofObject httpServerDelegate = HTTPServerDelegate() httpServer.delegate = self.httpServerDelegate httpServerThread = OFThread() super.init(coder: aDecoder) } override func viewDidLoad() { super.viewDidLoad() guard let documentDirectory = NSSearchPathForDirectoriesInDomains( .documentDirectory, .userDomainMask, true).first else { print("Could not get key files: No documents directory") navigationController?.popViewController(animated: true) return } do { keyFiles = try FileManager.default.contentsOfDirectory( atPath: documentDirectory).sorted() } catch let error as NSError { print("Could not get key files: \(error)") navigationController?.popViewController(animated: true) return } httpServerThread.start() } deinit { httpServerThread.runLoop.stop() httpServerThread.join() } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return keyFiles.count + 1 } override func tableView( _ tableView: UITableView, cellForRowAt indexPath: IndexPath ) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "keyFile") ?? UITableViewCell(style: .default, reuseIdentifier: "keyFile") cell.textLabel?.text = indexPath.row > 0 ? keyFiles[indexPath.row - 1] : "None" return cell } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { addSiteController?.keyFile = indexPath.row > 0 ? keyFiles[indexPath.row - 1] : nil addSiteController?.keyFileLabel?.text = indexPath.row > 0 ? keyFiles[indexPath.row - 1] : "None" self.navigationController?.popViewController(animated: true) } @IBAction func upload(_ sender: Any?) { let timer = OFTimer.scheduledTimer(withTimeInterval: 0, repeats: false) { (OFTimer) in self.httpServer.port = 0 self.httpServer.start() let message = "Navigate to http://\(self.httpServer.host!.nsObject):" + "\(self.httpServer.port)/ in your browser.\n\n" + "Press OK when done." let alert = UIAlertController(title: "Server Running", message: message, preferredStyle: .alert) alert.addAction( UIAlertAction(title: "OK", style: .default, handler: nil)) DispatchQueue.main.sync { self.present(alert, animated: true) { self.httpServer.stop() } } } httpServerThread.runLoop.add(timer) } } |
Deleted iOS/ShowDetailsController.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted iOS/ShowDetailsController.m.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added iOS/ShowDetailsController.swift.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import UIKit import ObjFW import ObjFW_Bridge class ShowDetailsController: UITableViewController, UITextFieldDelegate { @IBOutlet var nameField: UITextField? @IBOutlet var lengthField: UITextField? @IBOutlet var legacySwitch: UISwitch? @IBOutlet var keyFileField: UITextField? @IBOutlet var passphraseField: UITextField? public var mainViewController: MainViewController? private var name: OFString = "".ofObject private var length: size_t = 0 private var isLegacy: Bool = false private var keyFile: OFString? = nil override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) guard let mainViewController = self.mainViewController else { return } guard let tableView = mainViewController.tableView else { return } let siteStorage = mainViewController.siteStorage guard let indexPath = tableView.indexPathForSelectedRow else { return } name = mainViewController.sites[indexPath.row] length = siteStorage.length(forSite: name) isLegacy = siteStorage.isLegacy(site: name) keyFile = siteStorage.keyFile(forSite: name) nameField?.text = name.nsObject lengthField?.text = "\(length)" legacySwitch?.isOn = isLegacy keyFileField?.text = keyFile?.nsObject tableView.deselectRow(at: indexPath, animated: true) } func textFieldShouldReturn(_ textField: UITextField) -> Bool { textField.resignFirstResponder() return false } static private func clearNSMutableString(_ string: NSMutableString) { /* * NSMutableString does not offer a way to zero the string. * This is in the hope that setting a single character at an index just * replaces that character in memory, and thus allows us to zero the * password. */ for i in 0..<string.length { string.replaceCharacters(in: NSRange(location: i, length: 1), with: " ") } } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { passphraseField?.resignFirstResponder() tableView.deselectRow(at: indexPath, animated: true) if indexPath.section == 3 { switch indexPath.row { case 0: self.generateAndCopy() case 1: self.generateAndShow() default: break } } } private func generateAndCopy() { self.generateWithCallback { (password: NSMutableString) in let pasteboard = UIPasteboard.general pasteboard.string = password as String ShowDetailsController.clearNSMutableString(password) let message = "The password has been copied into the clipboard." let alert = UIAlertController(title: "Password Generated", message: message, preferredStyle: .alert) let action = UIAlertAction(title: "OK", style: .default) { (UIAlertAction) in self.navigationController?.popViewController(animated: true) } alert.addAction(action) self.present(alert, animated: true, completion: nil) } } private func generateAndShow() { self.generateWithCallback { (password: NSMutableString) in let alert = UIAlertController(title: "Generated Passphrase", message: password as String, preferredStyle: .alert) let action = UIAlertAction(title: "OK", style: .default) { (UIAlertAction) in self.navigationController?.popViewController(animated: true) } alert.addAction(action) self.present(alert, animated: true) { ShowDetailsController.clearNSMutableString(password) } } } private func generateWithCallback(_ block: (_: NSMutableString) -> ()) { let generator: PasswordGenerator = isLegacy ? LegacyPasswordGenerator() : NewPasswordGenerator() generator.site = name generator.length = length if let keyFile = keyFile { guard let documentDirectory = NSSearchPathForDirectoriesInDomains( .documentDirectory, .userDomainMask, true).first else { print("Could not get key files: No documents directory") return } let keyFilePath = documentDirectory.ofObject.appending(keyFile) generator.keyFile = OFMutableData(contentsOfFile: keyFilePath) } let passphraseText = (passphraseField?.text ?? "") as NSString let passphrase = of_strdup(passphraseText.utf8String!)! generator.passphrase = UnsafePointer<CChar>(passphrase) let mainStoryboard = UIStoryboard(name: "Main", bundle: nil) let activityController = mainStoryboard.instantiateViewController( withIdentifier: "activityIndicator") navigationController?.view.addSubview(activityController.view) DispatchQueue.global(qos: .default).async { OFException.try({ generator.derivePassword() }, finally: { if let keyFile = generator.keyFile as? OFMutableData { of_explicit_memset(keyFile.mutableItems, 0, keyFile.count) } of_explicit_memset(passphrase, 0, strlen(passphrase)) free(passphrase) }) } let password = NSMutableString(bytes: generator.output, length: generator.length, encoding: String.Encoding.utf8.rawValue)! of_explicit_memset(generator.output, 0, generator.length) DispatchQueue.main.sync { activityController.view.isHidden = true block(password) } } @IBAction func remove(_ sender: Any?) { let message = "Do you want to remove this site?" let alert = UIAlertController(title: "Remove Site?", message: message, preferredStyle: .alert) alert.addAction( UIAlertAction(title: "No", style: .cancel, handler: nil)) let yesAction = UIAlertAction(title: "Yes", style: .destructive) { (UIAlertAction) in self.mainViewController?.siteStorage.removeSite(self.name) self.mainViewController?.reset() self.navigationController?.popViewController(animated: true) } alert.addAction(yesAction) self.present(alert, animated: true, completion: nil) } } |
Deleted iOS/SiteStorage.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted iOS/SiteStorage.m.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added iOS/SiteStorage.swift.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ import ObjFW import ObjFW_Bridge class SiteStorage: OFObject { private typealias Storage = OFMutableDictionary<OFString, OFDictionary<OFNumber, AnyObject>> private static let lengthField = OFNumber(uInt8: 0) private static let legacyField = OFNumber(uInt8: 1) private static let keyFileField = OFNumber(uInt8: 2) private var path: OFString private var storage: Storage private var sites: OFArray<OFString> override init() { let fileManager = OFFileManager.default let userDataPath = OFSystemInfo.userDataPath! if !fileManager.directoryExists(atPath: userDataPath) { fileManager.createDirectory(atPath: userDataPath) } let path = userDataPath.appendingPathComponent( OFString(utf8String: "sites.msgpack")) var storage: Storage? = nil OFException.try({ storage = OFData(contentsOfFile: path).messagePackValue as? Storage }, catch: { (OFException) in storage = OFMutableDictionary() }) self.path = path self.storage = storage! self.sites = self.storage.allKeys.sorted } func sites(withFilter filter: OFString?) -> OFArray<OFString> { // FIXME: We need case folding here, but there is no method for it yet. let filter = filter?.lowercase return storage.allKeys.sorted.filteredArray({ (name: Any, index: size_t) -> Bool in if filter == nil { return true } let name = name as! OFString return name.lowercase.contains(filter!) }) } func hasSite(_ name: OFString) -> Bool { return (storage[name] != nil) } func length(forSite name: OFString) -> size_t { guard let site = storage[name] else { OFInvalidArgumentException().throw() abort() } return (site[SiteStorage.lengthField] as! OFNumber).sizeValue } func isLegacy(site name: OFString) -> Bool { guard let site = storage[name] else { OFInvalidArgumentException().throw() abort() } return (site[SiteStorage.legacyField] as! OFNumber).boolValue } func keyFile(forSite name: OFString) -> OFString? { guard let site = storage[name] else { OFInvalidArgumentException().throw() abort() } let keyFile = site[SiteStorage.keyFileField] if keyFile is OFNull { return nil } return keyFile as? OFString } func setSite(_ name: OFString, length: size_t, legacy: Bool, keyFile: OFString?) { let siteDictionary = OFMutableDictionary<OFNumber, AnyObject>() siteDictionary.setObject(OFNumber(size: length), forKey: SiteStorage.lengthField) siteDictionary.setObject(OFNumber(bool: legacy), forKey: SiteStorage.legacyField) if keyFile != nil { siteDictionary.setObject(keyFile!, forKey: SiteStorage.keyFileField) } siteDictionary.makeImmutable() storage.setObject(siteDictionary, forKey: name) self.update() } func removeSite(_ name: OFString) { self.storage.removeObject(forKey: name) self.update() } private func update() { storage.messagePackRepresentation.write(toFile: path) sites = storage.allKeys.sorted } } |
Added iOS/bridge.h.
> > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* * Copyright (c) 2016 - 2019 Jonathan Schleifer <js@heap.zone> * * https://heap.zone/git/scrypt-pwgen.git * * 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. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "PasswordGenerator.h" #import "NewPasswordGenerator.h" #import "LegacyPasswordGenerator.h" |
Changes to iOS/main.m.
︙ | ︙ | |||
20 21 22 23 24 25 26 | * POSSIBILITY OF SUCH DAMAGE. */ #import <UIKit/UIKit.h> #import <ObjFW/ObjFW.h> #import <ObjFW_Bridge/ObjFW_Bridge.h> | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | * POSSIBILITY OF SUCH DAMAGE. */ #import <UIKit/UIKit.h> #import <ObjFW/ObjFW.h> #import <ObjFW_Bridge/ObjFW_Bridge.h> #import "scrypt_pwgen-Swift.h" @interface OFAppDelegate: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE(OFAppDelegate) void |
︙ | ︙ |
Changes to iOS/scrypt-pwgen.xcodeproj/project.pbxproj.
1 2 3 4 5 6 7 8 9 | // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ | < < < < | > > > > > > > < < < | < < < < < < < > | | > > > > > > < < < < < < < | | 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 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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 4B2E52EA1DA942840040D091 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B2E52E81DA942840040D091 /* Main.storyboard */; }; 4B2E52EC1DA942840040D091 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B2E52EB1DA942840040D091 /* Assets.xcassets */; }; 4B2E52EF1DA942840040D091 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4B2E52ED1DA942840040D091 /* LaunchScreen.storyboard */; }; 4B31D80922B58F0F00494B15 /* SiteStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B31D80822B58F0F00494B15 /* SiteStorage.swift */; }; 4B5BCEF922B5B94C00E551BD /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEF822B5B94C00E551BD /* AppDelegate.swift */; }; 4B5BCEFB22B5CF3200E551BD /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFA22B5CF3200E551BD /* MainViewController.swift */; }; 4B5BCEFD22B5D98800E551BD /* SelectKeyFileController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFC22B5D98800E551BD /* SelectKeyFileController.swift */; }; 4B5BCEFF22B5E36900E551BD /* ShowDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B5BCEFE22B5E36900E551BD /* ShowDetailsController.swift */; }; 4B93656E22B5ADA00099DD08 /* HTTPServerDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B93656D22B5ADA00099DD08 /* HTTPServerDelegate.swift */; }; 4B93657022B5AE2C0099DD08 /* AboutController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B93656F22B5AE2C0099DD08 /* AboutController.swift */; }; 4B93657222B5B1FB0099DD08 /* AddSiteController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B93657122B5B1FB0099DD08 /* AddSiteController.swift */; }; 4B9525251F96BB900095F259 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525231F96BB820095F259 /* ObjFW.framework */; }; 4B9525261F96BB900095F259 /* ObjFW_Bridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525241F96BB820095F259 /* ObjFW_Bridge.framework */; }; 4B9525291F994CD30095F259 /* ObjFW.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525231F96BB820095F259 /* ObjFW.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4B95252A1F9953350095F259 /* ObjFW_Bridge.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4B9525241F96BB820095F259 /* ObjFW_Bridge.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 4BA115D21DA9432D007ED4EA /* LegacyPasswordGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA115CE1DA9432D007ED4EA /* LegacyPasswordGenerator.m */; settings = {COMPILER_FLAGS = "-fconstant-string-class=OFConstantString -fno-constant-cfstrings"; }; }; 4BA115D31DA9432D007ED4EA /* NewPasswordGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BA115D01DA9432D007ED4EA /* NewPasswordGenerator.m */; settings = {COMPILER_FLAGS = "-fconstant-string-class=OFConstantString -fno-constant-cfstrings"; }; }; 4BA115D61DA94390007ED4EA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BA115D51DA94390007ED4EA /* UIKit.framework */; }; 4BF4ADEA1DA9A3DB0073B995 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BF4ADE91DA9A3DB0073B995 /* Foundation.framework */; }; 4BF4C3A022B602F50034FCED /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF4C39F22B602F50034FCED /* main.m */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ 4BB3CDF61DA967C100FEE5ED /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 12; dstPath = ""; dstSubfolderSpec = 10; files = ( 4B95252A1F9953350095F259 /* ObjFW_Bridge.framework in Embed Frameworks */, 4B9525291F994CD30095F259 /* ObjFW.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 4B2E52DC1DA942840040D091 /* scrypt-pwgen.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "scrypt-pwgen.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 4B2E52E91DA942840040D091 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 4B2E52EB1DA942840040D091 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 4B2E52EE1DA942840040D091 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 4B2E52F01DA942840040D091 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 4B31D80822B58F0F00494B15 /* SiteStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SiteStorage.swift; sourceTree = "<group>"; }; 4B38148322B5ED01005C27B2 /* bridge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bridge.h; sourceTree = "<group>"; }; 4B5BCEF822B5B94C00E551BD /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; }; 4B5BCEFA22B5CF3200E551BD /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; }; 4B5BCEFC22B5D98800E551BD /* SelectKeyFileController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectKeyFileController.swift; sourceTree = "<group>"; }; 4B5BCEFE22B5E36900E551BD /* ShowDetailsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShowDetailsController.swift; sourceTree = "<group>"; }; 4B93656D22B5ADA00099DD08 /* HTTPServerDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPServerDelegate.swift; sourceTree = "<group>"; }; 4B93656F22B5AE2C0099DD08 /* AboutController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutController.swift; sourceTree = "<group>"; }; 4B93657122B5B1FB0099DD08 /* AddSiteController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddSiteController.swift; sourceTree = "<group>"; }; 4B9525231F96BB820095F259 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = ObjFW/Frameworks/ObjFW.framework; sourceTree = "<group>"; }; 4B9525241F96BB820095F259 /* ObjFW_Bridge.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW_Bridge.framework; path = ObjFW/Frameworks/ObjFW_Bridge.framework; sourceTree = "<group>"; }; 4BA115CD1DA9432D007ED4EA /* LegacyPasswordGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LegacyPasswordGenerator.h; path = ../LegacyPasswordGenerator.h; sourceTree = "<group>"; }; 4BA115CE1DA9432D007ED4EA /* LegacyPasswordGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LegacyPasswordGenerator.m; path = ../LegacyPasswordGenerator.m; sourceTree = "<group>"; }; 4BA115CF1DA9432D007ED4EA /* NewPasswordGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NewPasswordGenerator.h; path = ../NewPasswordGenerator.h; sourceTree = "<group>"; }; 4BA115D01DA9432D007ED4EA /* NewPasswordGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NewPasswordGenerator.m; path = ../NewPasswordGenerator.m; sourceTree = "<group>"; }; 4BA115D11DA9432D007ED4EA /* PasswordGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PasswordGenerator.h; path = ../PasswordGenerator.h; sourceTree = "<group>"; }; 4BA115D51DA94390007ED4EA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 4BF4ADE91DA9A3DB0073B995 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 4BF4C39F22B602F50034FCED /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 4B2E52D91DA942840040D091 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( |
︙ | ︙ | |||
111 112 113 114 115 116 117 | name = Products; sourceTree = "<group>"; }; 4B2E52DE1DA942840040D091 /* iOS */ = { isa = PBXGroup; children = ( 4B2E52EB1DA942840040D091 /* Assets.xcassets */, | | < | < | < | < | < | < | < | | | | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | name = Products; sourceTree = "<group>"; }; 4B2E52DE1DA942840040D091 /* iOS */ = { isa = PBXGroup; children = ( 4B2E52EB1DA942840040D091 /* Assets.xcassets */, 4B93656F22B5AE2C0099DD08 /* AboutController.swift */, 4B93657122B5B1FB0099DD08 /* AddSiteController.swift */, 4B5BCEF822B5B94C00E551BD /* AppDelegate.swift */, 4B93656D22B5ADA00099DD08 /* HTTPServerDelegate.swift */, 4B2E52F01DA942840040D091 /* Info.plist */, 4B2E52ED1DA942840040D091 /* LaunchScreen.storyboard */, 4B2E52E81DA942840040D091 /* Main.storyboard */, 4B5BCEFA22B5CF3200E551BD /* MainViewController.swift */, 4B5BCEFC22B5D98800E551BD /* SelectKeyFileController.swift */, 4B5BCEFE22B5E36900E551BD /* ShowDetailsController.swift */, 4B31D80822B58F0F00494B15 /* SiteStorage.swift */, 4B38148322B5ED01005C27B2 /* bridge.h */, 4BF4C39F22B602F50034FCED /* main.m */, ); name = iOS; sourceTree = "<group>"; }; 4BA115CC1DA9431D007ED4EA /* scrypt-pwgen */ = { isa = PBXGroup; children = ( |
︙ | ︙ | |||
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | attributes = { LastUpgradeCheck = 1010; ORGANIZATIONNAME = "Jonathan Schleifer"; TargetAttributes = { 4B2E52DB1DA942840040D091 = { CreatedOnToolsVersion = 8.0; DevelopmentTeam = MXKNFCKFL6; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = 4B2E52D71DA942840040D091 /* Build configuration list for PBXProject "scrypt-pwgen" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 4B2E52D31DA942840040D091; productRefGroup = 4B2E52DD1DA942840040D091 /* Products */; projectDirPath = ""; projectRoot = ""; | > > | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | attributes = { LastUpgradeCheck = 1010; ORGANIZATIONNAME = "Jonathan Schleifer"; TargetAttributes = { 4B2E52DB1DA942840040D091 = { CreatedOnToolsVersion = 8.0; DevelopmentTeam = MXKNFCKFL6; LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = 4B2E52D71DA942840040D091 /* Build configuration list for PBXProject "scrypt-pwgen" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( English, en, Base, ); mainGroup = 4B2E52D31DA942840040D091; productRefGroup = 4B2E52DD1DA942840040D091 /* Products */; projectDirPath = ""; projectRoot = ""; |
︙ | ︙ | |||
231 232 233 234 235 236 237 | /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 4B2E52D81DA942840040D091 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( | | | > | < < < > > | | | | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 4B2E52D81DA942840040D091 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 4B5BCEF922B5B94C00E551BD /* AppDelegate.swift in Sources */, 4B93656E22B5ADA00099DD08 /* HTTPServerDelegate.swift in Sources */, 4B5BCEFB22B5CF3200E551BD /* MainViewController.swift in Sources */, 4B93657222B5B1FB0099DD08 /* AddSiteController.swift in Sources */, 4BA115D21DA9432D007ED4EA /* LegacyPasswordGenerator.m in Sources */, 4BA115D31DA9432D007ED4EA /* NewPasswordGenerator.m in Sources */, 4B31D80922B58F0F00494B15 /* SiteStorage.swift in Sources */, 4B5BCEFD22B5D98800E551BD /* SelectKeyFileController.swift in Sources */, 4B5BCEFF22B5E36900E551BD /* ShowDetailsController.swift in Sources */, 4BF4C3A022B602F50034FCED /* main.m in Sources */, 4B93657022B5AE2C0099DD08 /* AboutController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 4B2E52E81DA942840040D091 /* Main.storyboard */ = { |
︙ | ︙ | |||
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/ObjFW/Frameworks", ); HEADER_SEARCH_PATHS = ObjFW/include; INFOPLIST_FILE = Info.plist; PRODUCT_BUNDLE_IDENTIFIER = "zone.heap.scrypt-pwgen.ios"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; 4B2E52F51DA942840040D091 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = NO; CLANG_ENABLE_OBJC_WEAK = YES; DEVELOPMENT_TEAM = MXKNFCKFL6; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/ObjFW/Frameworks", ); HEADER_SEARCH_PATHS = ObjFW/include; INFOPLIST_FILE = Info.plist; PRODUCT_BUNDLE_IDENTIFIER = "zone.heap.scrypt-pwgen.ios"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ | > > > > > > > | 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/ObjFW/Frameworks", ); HEADER_SEARCH_PATHS = ObjFW/include; INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "zone.heap.scrypt-pwgen.ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = bridge.h; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; 4B2E52F51DA942840040D091 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = NO; CLANG_ENABLE_OBJC_WEAK = YES; DEVELOPMENT_TEAM = MXKNFCKFL6; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/ObjFW/Frameworks", ); HEADER_SEARCH_PATHS = ObjFW/include; INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "zone.heap.scrypt-pwgen.ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = bridge.h; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ |
︙ | ︙ |