summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2021-11-26 14:03:50 +0100
committerAndrej Mihajlov <and@mullvad.net>2021-11-26 14:03:50 +0100
commitdbbb50742ae8068209889346496bb90029a78e1c (patch)
tree1d866b94c4391ef560a91b77be83217c5ae6ebec
parent4f1ce838416f438967aa6e65332976711cb47533 (diff)
parente6e4c01dfff8f0310ed700426ce247d8fb04c2f2 (diff)
downloadmullvadvpn-dbbb50742ae8068209889346496bb90029a78e1c.tar.xz
mullvadvpn-dbbb50742ae8068209889346496bb90029a78e1c.zip
Merge branch 'update-launch-screen'
-rw-r--r--ios/CHANGELOG.md1
-rw-r--r--ios/MullvadVPN.xcodeproj/project.pbxproj4
-rw-r--r--ios/MullvadVPN/AppDelegate.swift4
-rw-r--r--ios/MullvadVPN/LaunchScreen.storyboard39
-rw-r--r--ios/MullvadVPN/LaunchViewController.swift41
-rw-r--r--ios/MullvadVPN/PreferencesDataSource.swift2
-rw-r--r--ios/MullvadVPN/RootContainerViewController.swift23
7 files changed, 78 insertions, 36 deletions
diff --git a/ios/CHANGELOG.md b/ios/CHANGELOG.md
index ebf30f71ca..7694088ce3 100644
--- a/ios/CHANGELOG.md
+++ b/ios/CHANGELOG.md
@@ -33,6 +33,7 @@ Line wrap the file at 100 chars. Th
Background fetch is used as fallback on iOS 12.
- Request background execution time from the system when performing critical tasks.
- Increase hit area of settings (cog) button.
+- Update launch screen.
### Fixed
- Drop leading replacement characters (`\u{FFFD}`) when decoding UTF-8 from a part of log file.
diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj
index 114e831799..55f084cac7 100644
--- a/ios/MullvadVPN.xcodeproj/project.pbxproj
+++ b/ios/MullvadVPN.xcodeproj/project.pbxproj
@@ -260,6 +260,7 @@
58E1336D26D2BE7500CC316B /* AnyResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E1336C26D2BE7500CC316B /* AnyResult.swift */; };
58E1336E26D2BE7500CC316B /* AnyResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E1336C26D2BE7500CC316B /* AnyResult.swift */; };
58E1336F26D2BE7500CC316B /* AnyResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E1336C26D2BE7500CC316B /* AnyResult.swift */; };
+ 58E20771274672CA00DE5D77 /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E20770274672CA00DE5D77 /* LaunchViewController.swift */; };
58E6771F24ADFE7800AA26E7 /* SettingsNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58E6771E24ADFE7800AA26E7 /* SettingsNavigationController.swift */; };
58EE2E3A272FF814003BFF93 /* SettingsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58EE2E38272FF814003BFF93 /* SettingsDataSource.swift */; };
58EE2E3B272FF814003BFF93 /* SettingsDataSourceDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58EE2E39272FF814003BFF93 /* SettingsDataSourceDelegate.swift */; };
@@ -526,6 +527,7 @@
58E1337426D2BEC400CC316B /* Promise+Optional.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Optional.swift"; sourceTree = "<group>"; };
58E1337826D2BEDD00CC316B /* Promise+ReceiveOn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+ReceiveOn.swift"; sourceTree = "<group>"; };
58E1338026D2BF5C00CC316B /* Promise+Result.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Promise+Result.swift"; sourceTree = "<group>"; };
+ 58E20770274672CA00DE5D77 /* LaunchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchViewController.swift; sourceTree = "<group>"; };
58E6771E24ADFE7800AA26E7 /* SettingsNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsNavigationController.swift; sourceTree = "<group>"; };
58E973DD24850EB600096F90 /* AsyncOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncOperation.swift; sourceTree = "<group>"; };
58ECD29123F178FD004298B6 /* Screenshots.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Screenshots.xcconfig; sourceTree = "<group>"; };
@@ -852,6 +854,7 @@
58561C98239A5D1500BD6B5E /* IPEndpoint.swift */,
58FB865626E8C06800F188BC /* Keychain */,
58727282265D173C00F315B2 /* LaunchScreen.storyboard */,
+ 58E20770274672CA00DE5D77 /* LaunchViewController.swift */,
58A1AA8623F43901009F7EA6 /* Location.swift */,
583DA21325FA4B5C00318683 /* LocationDataSource.swift */,
58BA692D23E99EFF009DC256 /* Locking.swift */,
@@ -1437,6 +1440,7 @@
585DA89626B0328000B8C587 /* TunnelIPCResponse.swift in Sources */,
587AD7C623421D7000E93A53 /* TunnelSettings.swift in Sources */,
581503A324D6F1EC00C9C50E /* ChainedError+Logger.swift in Sources */,
+ 58E20771274672CA00DE5D77 /* LaunchViewController.swift in Sources */,
584D26C4270C855B004EA533 /* PreferencesDataSource.swift in Sources */,
58FD5BF024238EB300112C88 /* SKProduct+Formatting.swift in Sources */,
58B43C1925F77DB60002C8C3 /* ConnectMainContentView.swift in Sources */,
diff --git a/ios/MullvadVPN/AppDelegate.swift b/ios/MullvadVPN/AppDelegate.swift
index 8fa8bdad0c..c908637ecd 100644
--- a/ios/MullvadVPN/AppDelegate.swift
+++ b/ios/MullvadVPN/AppDelegate.swift
@@ -76,9 +76,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
self.window = UIWindow(frame: UIScreen.main.bounds)
// Set an empty view controller while loading tunnels
- let launchController = UIViewController()
- launchController.view.backgroundColor = .primaryColor
- self.window?.rootViewController = launchController
+ self.window?.rootViewController = LaunchViewController()
// Add relay cache observer
RelayCache.Tracker.shared.addObserver(self)
diff --git a/ios/MullvadVPN/LaunchScreen.storyboard b/ios/MullvadVPN/LaunchScreen.storyboard
index 41a4f2f5e9..a3287d9019 100644
--- a/ios/MullvadVPN/LaunchScreen.storyboard
+++ b/ios/MullvadVPN/LaunchScreen.storyboard
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
- <capability name="Named colors" minToolsVersion="9.0"/>
+ <deployment identifier="iOS"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -11,22 +11,43 @@
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
- <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+ <viewController interfaceStyle="light" id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" name="Primary"/>
+ <subviews>
+ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LogoIcon" translatesAutoresizingMaskIntoConstraints="NO" id="gqd-e9-Kvh">
+ <rect key="frame" x="143" y="278" width="128" height="128"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="128" id="9xD-Oe-2Cf"/>
+ <constraint firstAttribute="width" secondItem="gqd-e9-Kvh" secondAttribute="height" multiplier="1:1" id="NMd-KF-nJ6"/>
+ </constraints>
+ </imageView>
+ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LogoText" translatesAutoresizingMaskIntoConstraints="NO" id="iHl-91-lx9">
+ <rect key="frame" x="87" y="436" width="240" height="24"/>
+ <constraints>
+ <constraint firstAttribute="width" constant="240" id="jnP-3w-LWl"/>
+ <constraint firstAttribute="height" constant="24" id="zcN-3F-btf"/>
+ </constraints>
+ </imageView>
+ </subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
+ <color key="backgroundColor" red="0.16078431372549018" green="0.30196078431372547" blue="0.45098039215686275" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <constraints>
+ <constraint firstItem="gqd-e9-Kvh" firstAttribute="centerX" secondItem="iHl-91-lx9" secondAttribute="centerX" id="Nbt-d1-lBB"/>
+ <constraint firstItem="iHl-91-lx9" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="RWR-ui-Ujt"/>
+ <constraint firstItem="iHl-91-lx9" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="dKZ-dh-pjb"/>
+ <constraint firstItem="iHl-91-lx9" firstAttribute="top" secondItem="gqd-e9-Kvh" secondAttribute="bottom" constant="30" id="dwx-Xi-Gbn"/>
+ </constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
- <point key="canvasLocation" x="53" y="375"/>
+ <point key="canvasLocation" x="52.173913043478265" y="375"/>
</scene>
</scenes>
<resources>
- <namedColor name="Primary">
- <color red="0.16078431372549021" green="0.30196078431372547" blue="0.45098039215686275" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- </namedColor>
+ <image name="LogoIcon" width="253" height="253"/>
+ <image name="LogoText" width="960" height="104"/>
</resources>
</document>
diff --git a/ios/MullvadVPN/LaunchViewController.swift b/ios/MullvadVPN/LaunchViewController.swift
new file mode 100644
index 0000000000..f108d8f6e4
--- /dev/null
+++ b/ios/MullvadVPN/LaunchViewController.swift
@@ -0,0 +1,41 @@
+//
+// LaunchViewController.swift
+// MullvadVPN
+//
+// Created by pronebird on 18/11/2021.
+// Copyright © 2021 Mullvad VPN AB. All rights reserved.
+//
+
+import UIKit
+
+class LaunchViewController: UIViewController {
+
+ override var preferredStatusBarStyle: UIStatusBarStyle {
+ return .lightContent
+ }
+
+ init() {
+ super.init(nibName: nil, bundle: nil)
+
+ let storyboard = UIStoryboard(name: "LaunchScreen", bundle: nil)
+
+ guard let initialController = storyboard.instantiateInitialViewController() else { return }
+
+ initialController.view.translatesAutoresizingMaskIntoConstraints = false
+
+ addChild(initialController)
+ view.addSubview(initialController.view)
+ initialController.didMove(toParent: self)
+
+ NSLayoutConstraint.activate([
+ initialController.view.topAnchor.constraint(equalTo: view.topAnchor),
+ initialController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
+ initialController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
+ initialController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
+ ])
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+}
diff --git a/ios/MullvadVPN/PreferencesDataSource.swift b/ios/MullvadVPN/PreferencesDataSource.swift
index 74c96ba0e5..2ec34c1a6d 100644
--- a/ios/MullvadVPN/PreferencesDataSource.swift
+++ b/ios/MullvadVPN/PreferencesDataSource.swift
@@ -547,7 +547,7 @@ class PreferencesDataSource: NSObject, UITableViewDataSource, UITableViewDelegat
private func configureFooterView(_ reusableView: SettingsStaticTextFooterView) {
let font = reusableView.titleLabel.font ?? UIFont.systemFont(ofSize: UIFont.systemFontSize)
-
+
reusableView.titleLabel.attributedText = viewModel.customDNSPrecondition
.attributedLocalizedDescription(isEditing: isEditing, preferredFont: font)
}
diff --git a/ios/MullvadVPN/RootContainerViewController.swift b/ios/MullvadVPN/RootContainerViewController.swift
index 8dd9e7b9e5..f98c3e93df 100644
--- a/ios/MullvadVPN/RootContainerViewController.swift
+++ b/ios/MullvadVPN/RootContainerViewController.swift
@@ -163,20 +163,6 @@ class RootContainerViewController: UIViewController {
return interfaceOrientationMask ?? super.supportedInterfaceOrientations
}
- // MARK: - Storyboard segue handling
-
- override func unwind(for unwindSegue: UIStoryboardSegue, towards subsequentVC: UIViewController) {
- // Make sure there is no attempt to unwind to the top view controller
- guard subsequentVC != topViewController else { return }
-
- let index = viewControllers.firstIndex(of: subsequentVC)!
- let newViewControllers = Array(viewControllers.prefix(through: index))
-
- let animated = UIView.areAnimationsEnabled
-
- setViewControllersInternal(newViewControllers, isUnwinding: true, animated: animated)
- }
-
// MARK: - Public
func setViewControllers(_ newViewControllers: [UIViewController],
@@ -562,15 +548,6 @@ class RootContainerViewController: UIViewController {
}
-class RootContainerPushSegue: UIStoryboardSegue {
- override func perform() {
- let container = source.rootContainerController!
- let animated = UIView.areAnimationsEnabled
-
- container.pushViewController(destination, animated: animated)
- }
-}
-
/// A UIViewController extension that gives view controllers an access to root container
extension UIViewController {