-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a138838
commit 433e8e0
Showing
10 changed files
with
201 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// ForceUpdateViewController.swift | ||
// PIA VPN | ||
// | ||
// Created by Said Rehouni on 9/10/24. | ||
// Copyright © 2024 Private Internet Access Inc. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import PIALibrary | ||
|
||
class ForceUpdateViewController: UIViewController { | ||
@IBOutlet weak var updateButton: PIAButton! | ||
@IBOutlet weak var titleLabel: UILabel! | ||
@IBOutlet weak var descriptionLabel: UILabel! | ||
|
||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
// Do any additional setup after loading the view. | ||
|
||
styleUpdateButton() | ||
|
||
updateButton.addTarget(self, action: #selector(updateButtonTapped), for: .touchUpInside) | ||
updateButton.setTitle("Update Now", for: .normal) | ||
} | ||
|
||
@objc func updateButtonTapped() { | ||
Client.providers.vpnProvider.uninstallAll() | ||
UIApplication.shared.open(URL(string: "https://itunes.apple.com/app/private-internet-access-anonymous/id955626407")!) | ||
} | ||
|
||
private func styleUpdateButton() { | ||
updateButton.setRounded() | ||
updateButton.style(style: TextStyle.Buttons.piaGreenButton) | ||
updateButton.setTitle(L10n.Welcome.Purchase.submit.uppercased(), | ||
for: []) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> | ||
<device id="retina6_12" orientation="portrait" appearance="light"/> | ||
<dependencies> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<objects> | ||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ForceUpdateViewController" customModule="PIA_VPN" customModuleProvider="target"> | ||
<connections> | ||
<outlet property="descriptionLabel" destination="ecX-Zr-LdC" id="6Bv-B0-uO8"/> | ||
<outlet property="titleLabel" destination="KbD-fS-iw2" id="zVZ-aP-q9i"/> | ||
<outlet property="updateButton" destination="HLl-yh-l1E" id="goe-zj-ZRg"/> | ||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> | ||
</connections> | ||
</placeholder> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT"> | ||
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<subviews> | ||
<stackView opaque="NO" tag="2" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="24" translatesAutoresizingMaskIntoConstraints="NO" id="liw-vr-nmU"> | ||
<rect key="frame" x="20" y="119" width="353" height="639"/> | ||
<subviews> | ||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="force_update_shield" translatesAutoresizingMaskIntoConstraints="NO" id="7dx-Zd-LvJ"> | ||
<rect key="frame" x="103.66666666666669" y="0.0" width="146" height="138"/> | ||
<constraints> | ||
<constraint firstAttribute="width" constant="146" id="DDI-PN-m5q"/> | ||
<constraint firstAttribute="height" constant="138" id="XbN-Iz-yzO"/> | ||
</constraints> | ||
</imageView> | ||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="24" translatesAutoresizingMaskIntoConstraints="NO" id="FQV-ZF-r2m"> | ||
<rect key="frame" x="10.333333333333343" y="162" width="332.66666666666663" height="111.33333333333331"/> | ||
<subviews> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Upgrade Your Experience" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KbD-fS-iw2"> | ||
<rect key="frame" x="0.0" y="0.0" width="248.33333333333334" height="26.333333333333332"/> | ||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="22"/> | ||
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="You’re using an older version of PIA. Update your app now to enjoy an enhanced experience with all the latest features." textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ecX-Zr-LdC"> | ||
<rect key="frame" x="0.0" y="50.333333333333314" width="332.66666666666669" height="61"/> | ||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="17"/> | ||
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
<nil key="highlightedColor"/> | ||
</label> | ||
</subviews> | ||
</stackView> | ||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ty5-Yz-511"> | ||
<rect key="frame" x="56.666666666666686" y="297.33333333333326" width="240" height="267.66666666666674"/> | ||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
</view> | ||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HLl-yh-l1E" customClass="PIAButton" customModule="PIALibrary"> | ||
<rect key="frame" x="0.0" y="589" width="353" height="50"/> | ||
<constraints> | ||
<constraint firstAttribute="height" constant="50" id="Vt7-9x-RzF"/> | ||
</constraints> | ||
<color key="tintColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
<state key="normal" title="Button"/> | ||
<buttonConfiguration key="configuration" style="plain" title="Button"/> | ||
</button> | ||
</subviews> | ||
<constraints> | ||
<constraint firstAttribute="trailing" secondItem="HLl-yh-l1E" secondAttribute="trailing" id="d0Y-di-7gB"/> | ||
<constraint firstItem="HLl-yh-l1E" firstAttribute="leading" secondItem="liw-vr-nmU" secondAttribute="leading" id="qQa-K0-vqg"/> | ||
</constraints> | ||
</stackView> | ||
</subviews> | ||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> | ||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
<constraints> | ||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="liw-vr-nmU" secondAttribute="bottom" constant="60" id="DYi-Hx-NzJ"/> | ||
<constraint firstItem="liw-vr-nmU" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="20" id="DsA-7H-Iv1"/> | ||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="liw-vr-nmU" secondAttribute="trailing" constant="20" id="IJR-hN-7PH"/> | ||
<constraint firstItem="liw-vr-nmU" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="60" id="z6E-K9-CBQ"/> | ||
</constraints> | ||
<point key="canvasLocation" x="139.69465648854961" y="20.422535211267608"/> | ||
</view> | ||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" id="joW-BT-sWM"> | ||
<rect key="frame" x="0.0" y="0.0" width="240" height="128"/> | ||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
<point key="canvasLocation" x="727" y="-15"/> | ||
</imageView> | ||
</objects> | ||
<resources> | ||
<image name="force_update_shield" width="146" height="138"/> | ||
</resources> | ||
</document> |
15 changes: 15 additions & 0 deletions
15
PIA VPN/Images.xcassets/force_update_shield.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "shield.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"preserves-vector-representation" : true | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.