comit for code for latest version that I completely forgot about
This commit is contained in:
parent
6db1a5aeee
commit
7003bad96e
6 changed files with 423 additions and 378 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -444,6 +444,7 @@
|
|||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = PRBH2T6668;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
|
@ -458,6 +459,7 @@
|
|||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.FlashBack;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -467,6 +469,7 @@
|
|||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = PRBH2T6668;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
|
@ -481,6 +484,7 @@
|
|||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.mpg13.FlashBack;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
|
|
BIN
FlashBack.xcodeproj/project.xcworkspace/xcuserdata/micahgomez.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
BIN
FlashBack.xcodeproj/project.xcworkspace/xcuserdata/micahgomez.xcuserdatad/UserInterfaceState.xcuserstate
generated
Normal file
Binary file not shown.
BIN
FlashBack/.DS_Store
vendored
Normal file
BIN
FlashBack/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -1,11 +1,9 @@
|
|||
<?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" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<device id="retina5_9" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14810.11" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<device id="retina5_9" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment version="2304" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14766.13"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
@ -26,11 +24,42 @@
|
|||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="n8w-C8-2Xw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" misplaced="YES" text="FlashBack" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="84C-7a-WER">
|
||||
<rect key="frame" x="78" y="53" width="219.66666666666666" height="93"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="93" id="kTq-Zk-so1"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="50"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Selected Backup:" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z1J-Te-u2O">
|
||||
<rect key="frame" x="27" y="154" width="320" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="SDI-zA-cs8"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="20"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Scroll to Select a Backup" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gXr-H3-y6A">
|
||||
<rect key="frame" x="27" y="192" width="320" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="0Vm-Mi-KQx"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="84C-7a-WER" firstAttribute="leading" secondItem="n8w-C8-2Xw" secondAttribute="leadingMargin" constant="8" id="tFv-fq-Y5l"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<blurEffect style="light"/>
|
||||
</visualEffectView>
|
||||
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="X4R-sr-2s9">
|
||||
<rect key="frame" x="16" y="221" width="343" height="345"/>
|
||||
<pickerView contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="X4R-sr-2s9">
|
||||
<rect key="frame" x="28" y="233" width="320" height="333"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.25035761443661969" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
|
||||
|
@ -43,11 +72,10 @@
|
|||
</connections>
|
||||
</pickerView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XMB-Cv-YLA">
|
||||
<rect key="frame" x="16" y="632" width="167" height="50"/>
|
||||
<rect key="frame" x="27.666666666666671" y="632" width="167" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.25035761439999998" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="167" id="RFy-27-zsA"/>
|
||||
<constraint firstAttribute="height" constant="50" id="bKK-uv-NnI"/>
|
||||
<constraint firstAttribute="height" constant="50" id="efO-Wd-s6f"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="31"/>
|
||||
<state key="normal" title="Restore"/>
|
||||
|
@ -61,8 +89,11 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WN9-tU-bOp">
|
||||
<rect key="frame" x="192" y="632" width="167" height="50"/>
|
||||
<rect key="frame" x="203.66666666666663" y="632" width="144" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.25035761439999998" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="144" id="7Mj-k5-xdd"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="31"/>
|
||||
<state key="normal" title="Update"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
|
@ -75,7 +106,7 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z44-tn-4Km">
|
||||
<rect key="frame" x="192" y="689" width="167" height="50"/>
|
||||
<rect key="frame" x="203.66666666666663" y="689" width="144" height="50"/>
|
||||
<color key="backgroundColor" red="1" green="0.51075712174615018" blue="0.48122861101819614" alpha="0.25035761439999998" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="31"/>
|
||||
<state key="normal" title="Delete">
|
||||
|
@ -91,10 +122,10 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FKY-5f-bN9">
|
||||
<rect key="frame" x="16" y="574" width="343" height="50"/>
|
||||
<rect key="frame" x="27.666666666666657" y="574" width="320" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.25035761439999998" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="Dji-9D-MQU"/>
|
||||
<constraint firstAttribute="height" constant="50" id="x25-wv-t0t"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="31"/>
|
||||
<state key="normal" title="Create Backup"/>
|
||||
|
@ -108,10 +139,10 @@
|
|||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lNN-hV-Kcy">
|
||||
<rect key="frame" x="16" y="690" width="167" height="50"/>
|
||||
<rect key="frame" x="27.666666666666671" y="690" width="167" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.25035761439999998" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="PL0-p3-YLa"/>
|
||||
<constraint firstAttribute="height" constant="50" id="BDc-y5-4NG"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="31"/>
|
||||
<state key="normal" title="Package"/>
|
||||
|
@ -124,96 +155,50 @@
|
|||
<action selector="packageBackup:" destination="BYZ-38-t0r" eventType="touchUpInside" id="BGU-Dg-Yyu"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Selected Backup:" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z1J-Te-u2O">
|
||||
<rect key="frame" x="16" y="145" width="343" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="90x-jO-Xfk"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="20"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Scroll to Select a Backup" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gXr-H3-y6A">
|
||||
<rect key="frame" x="16" y="183" width="343" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="ClJ-lR-kgI"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="FlashBack" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="84C-7a-WER">
|
||||
<rect key="frame" x="16" y="44" width="343" height="93"/>
|
||||
<fontDescription key="fontDescription" name="Courier" family="Courier" pointSize="54"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" adjustsImageWhenHighlighted="NO" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="j3D-XF-u37">
|
||||
<rect key="frame" x="162" y="747" width="51" height="30"/>
|
||||
<rect key="frame" x="167" y="747" width="41" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="9he-YC-JKm"/>
|
||||
<constraint firstAttribute="height" constant="30" id="Mf3-hV-jap"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="25"/>
|
||||
<state key="normal" title="Help"/>
|
||||
<state key="normal" title="Info"/>
|
||||
<connections>
|
||||
<action selector="helpMenu:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Cqa-me-9od"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="47M-sG-LZL">
|
||||
<rect key="frame" x="16" y="44" width="343" height="93"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="93" id="T8k-cf-vLy"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="50"/>
|
||||
<connections>
|
||||
<action selector="secretButton:" destination="BYZ-38-t0r" eventType="touchUpInside" id="fAg-6v-c6Q"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="47M-sG-LZL" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" id="4As-Rd-Dji"/>
|
||||
<constraint firstItem="WN9-tU-bOp" firstAttribute="leading" secondItem="Z44-tn-4Km" secondAttribute="leading" id="4QT-wZ-w3a"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="leading" secondItem="3iZ-tO-enL" secondAttribute="leading" id="5sk-v2-ppd"/>
|
||||
<constraint firstItem="3iZ-tO-enL" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="6dr-2o-cxa"/>
|
||||
<constraint firstItem="84C-7a-WER" firstAttribute="leading" secondItem="z1J-Te-u2O" secondAttribute="leading" id="8vD-4r-nEa"/>
|
||||
<constraint firstItem="84C-7a-WER" firstAttribute="trailing" secondItem="z1J-Te-u2O" secondAttribute="trailing" id="AB0-Lv-2Db"/>
|
||||
<constraint firstItem="WN9-tU-bOp" firstAttribute="trailing" secondItem="Z44-tn-4Km" secondAttribute="trailing" id="Aef-wR-qqw"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="top" secondItem="3iZ-tO-enL" secondAttribute="top" id="AxY-1f-vBW"/>
|
||||
<constraint firstItem="gXr-H3-y6A" firstAttribute="top" secondItem="z1J-Te-u2O" secondAttribute="bottom" constant="8" symbolic="YES" id="D74-sB-NG6"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3iZ-tO-enL" secondAttribute="bottom" id="DE7-xP-Ce6"/>
|
||||
<constraint firstItem="3iZ-tO-enL" firstAttribute="bottom" secondItem="Xdq-a9-Vkk" secondAttribute="bottom" id="DGT-JX-ght"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="top" secondItem="FKY-5f-bN9" secondAttribute="bottom" constant="8" symbolic="YES" id="Eib-qn-Uh1"/>
|
||||
<constraint firstItem="gXr-H3-y6A" firstAttribute="trailing" secondItem="X4R-sr-2s9" secondAttribute="trailing" id="FkS-db-Fxq"/>
|
||||
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="j3D-XF-u37" secondAttribute="bottom" constant="1" id="GVL-E6-A4s"/>
|
||||
<constraint firstItem="FKY-5f-bN9" firstAttribute="leading" secondItem="XMB-Cv-YLA" secondAttribute="leading" id="GX6-2a-Uyj"/>
|
||||
<constraint firstItem="FKY-5f-bN9" firstAttribute="top" secondItem="X4R-sr-2s9" secondAttribute="bottom" constant="8" symbolic="YES" id="Hh2-6E-2zg"/>
|
||||
<constraint firstItem="X4R-sr-2s9" firstAttribute="leading" secondItem="FKY-5f-bN9" secondAttribute="leading" id="IhQ-HE-XGz"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="Lru-LV-ylV"/>
|
||||
<constraint firstItem="z1J-Te-u2O" firstAttribute="top" secondItem="47M-sG-LZL" secondAttribute="bottom" constant="8" symbolic="YES" id="PR7-hd-mwp"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="trailing" secondItem="lNN-hV-Kcy" secondAttribute="trailing" id="Pgp-oJ-90I"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="top" secondItem="WN9-tU-bOp" secondAttribute="top" id="Roj-fM-BHF"/>
|
||||
<constraint firstItem="FKY-5f-bN9" firstAttribute="trailing" secondItem="WN9-tU-bOp" secondAttribute="trailing" id="SDT-ZW-XdB"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="baseline" secondItem="WN9-tU-bOp" secondAttribute="baseline" id="XZs-zT-gzV"/>
|
||||
<constraint firstItem="WN9-tU-bOp" firstAttribute="leading" secondItem="XMB-Cv-YLA" secondAttribute="trailing" constant="9" id="Xtg-Ja-Oag"/>
|
||||
<constraint firstItem="lNN-hV-Kcy" firstAttribute="top" secondItem="XMB-Cv-YLA" secondAttribute="bottom" constant="8" symbolic="YES" id="aHl-IK-4uN"/>
|
||||
<constraint firstItem="47M-sG-LZL" firstAttribute="leading" secondItem="84C-7a-WER" secondAttribute="leading" id="adJ-XZ-EfD"/>
|
||||
<constraint firstItem="84C-7a-WER" firstAttribute="trailing" secondItem="47M-sG-LZL" secondAttribute="trailing" id="b9p-0l-sgD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Xdq-a9-Vkk" secondAttribute="trailing" id="cOS-0m-ol3"/>
|
||||
<constraint firstItem="Z44-tn-4Km" firstAttribute="top" secondItem="WN9-tU-bOp" secondAttribute="bottom" constant="7" id="cxE-is-A7K"/>
|
||||
<constraint firstItem="j3D-XF-u37" firstAttribute="top" secondItem="Z44-tn-4Km" secondAttribute="bottom" constant="8" symbolic="YES" id="dNV-Ra-Qok"/>
|
||||
<constraint firstItem="z1J-Te-u2O" firstAttribute="trailing" secondItem="gXr-H3-y6A" secondAttribute="trailing" id="eLs-Sy-E9m"/>
|
||||
<constraint firstItem="z1J-Te-u2O" firstAttribute="top" secondItem="84C-7a-WER" secondAttribute="bottom" constant="8" symbolic="YES" id="eV0-yW-4vo"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="leading" secondItem="lNN-hV-Kcy" secondAttribute="leading" id="fR6-ap-wSV"/>
|
||||
<constraint firstItem="X4R-sr-2s9" firstAttribute="trailing" secondItem="FKY-5f-bN9" secondAttribute="trailing" id="gBa-uI-8US"/>
|
||||
<constraint firstItem="84C-7a-WER" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leadingMargin" id="i2Y-32-cP3"/>
|
||||
<constraint firstItem="47M-sG-LZL" firstAttribute="top" secondItem="84C-7a-WER" secondAttribute="top" id="jHu-K3-0zh"/>
|
||||
<constraint firstItem="gXr-H3-y6A" firstAttribute="leading" secondItem="X4R-sr-2s9" secondAttribute="leading" id="lsq-nO-szW"/>
|
||||
<constraint firstItem="3iZ-tO-enL" firstAttribute="centerX" secondItem="84C-7a-WER" secondAttribute="centerX" id="nkt-hI-9vX"/>
|
||||
<constraint firstItem="FKY-5f-bN9" firstAttribute="centerX" secondItem="j3D-XF-u37" secondAttribute="centerX" id="pW2-AS-dIm"/>
|
||||
<constraint firstItem="z1J-Te-u2O" firstAttribute="leading" secondItem="gXr-H3-y6A" secondAttribute="leading" id="pZ1-LZ-fuu"/>
|
||||
<constraint firstItem="j3D-XF-u37" firstAttribute="top" secondItem="lNN-hV-Kcy" secondAttribute="bottom" constant="7" id="sic-Ci-tJe"/>
|
||||
<constraint firstItem="3iZ-tO-enL" firstAttribute="trailing" secondItem="Xdq-a9-Vkk" secondAttribute="trailing" id="t8T-Kj-blh"/>
|
||||
<constraint firstItem="X4R-sr-2s9" firstAttribute="top" secondItem="gXr-H3-y6A" secondAttribute="bottom" constant="8" symbolic="YES" id="vuj-pj-8iI"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="leading" secondItem="lNN-hV-Kcy" secondAttribute="leading" id="1ec-tv-SQI"/>
|
||||
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="FKY-5f-bN9" secondAttribute="trailing" constant="27.333333333333371" id="2DY-Gx-Ya4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Xdq-a9-Vkk" secondAttribute="trailing" id="3Cu-bB-B36"/>
|
||||
<constraint firstItem="lNN-hV-Kcy" firstAttribute="top" secondItem="XMB-Cv-YLA" secondAttribute="bottom" constant="8" symbolic="YES" id="88F-hL-6kc"/>
|
||||
<constraint firstItem="j3D-XF-u37" firstAttribute="top" secondItem="Z44-tn-4Km" secondAttribute="bottom" constant="8" symbolic="YES" id="8J1-pn-fXS"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="centerX" secondItem="lNN-hV-Kcy" secondAttribute="centerX" id="EHY-zL-Opf"/>
|
||||
<constraint firstItem="WN9-tU-bOp" firstAttribute="trailing" secondItem="Z44-tn-4Km" secondAttribute="trailing" id="EKP-ZZ-RjA"/>
|
||||
<constraint firstItem="X4R-sr-2s9" firstAttribute="centerX" secondItem="FKY-5f-bN9" secondAttribute="centerX" id="Eqm-PN-FiF"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="top" secondItem="WN9-tU-bOp" secondAttribute="top" id="Ieb-a6-do8"/>
|
||||
<constraint firstItem="WN9-tU-bOp" firstAttribute="leading" secondItem="XMB-Cv-YLA" secondAttribute="trailing" constant="8.9999999999999432" id="Iz1-vq-8eC"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="centerX" secondItem="j3D-XF-u37" secondAttribute="centerX" id="Kmt-e5-dsb"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="leading" secondItem="3iZ-tO-enL" secondAttribute="leading" id="MJP-GQ-jgC"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="top" secondItem="FKY-5f-bN9" secondAttribute="bottom" constant="8" symbolic="YES" id="OZN-5p-892"/>
|
||||
<constraint firstItem="Z44-tn-4Km" firstAttribute="top" secondItem="WN9-tU-bOp" secondAttribute="bottom" constant="7" id="Psc-dg-MtU"/>
|
||||
<constraint firstItem="3iZ-tO-enL" firstAttribute="trailing" secondItem="Xdq-a9-Vkk" secondAttribute="trailing" id="RTs-j1-VGz"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Xdq-a9-Vkk" secondAttribute="bottom" id="S9h-a0-Sd8"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="27.666666666666671" id="Z90-qa-pIl"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="top" secondItem="3iZ-tO-enL" secondAttribute="top" id="b8x-oN-xwS"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="bottom" secondItem="3iZ-tO-enL" secondAttribute="bottom" id="bgC-4l-Ag6"/>
|
||||
<constraint firstItem="FKY-5f-bN9" firstAttribute="centerX" secondItem="j3D-XF-u37" secondAttribute="centerX" id="c5S-8v-5Aa"/>
|
||||
<constraint firstItem="X4R-sr-2s9" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="189" id="cJL-YQ-PNR"/>
|
||||
<constraint firstItem="FKY-5f-bN9" firstAttribute="top" secondItem="X4R-sr-2s9" secondAttribute="bottom" constant="8" symbolic="YES" id="cO2-Oo-r0w"/>
|
||||
<constraint firstItem="WN9-tU-bOp" firstAttribute="leading" secondItem="Z44-tn-4Km" secondAttribute="leading" id="lou-Ev-8ba"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="njI-NI-ZRp"/>
|
||||
<constraint firstItem="WN9-tU-bOp" firstAttribute="trailing" secondItem="FKY-5f-bN9" secondAttribute="trailing" id="ppy-uy-u3J"/>
|
||||
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="j3D-XF-u37" secondAttribute="bottom" constant="1" id="pzj-b3-kCF"/>
|
||||
<constraint firstItem="XMB-Cv-YLA" firstAttribute="baseline" secondItem="WN9-tU-bOp" secondAttribute="baseline" id="sXK-9J-Yio"/>
|
||||
<constraint firstItem="Xdq-a9-Vkk" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="usH-bQ-2Af"/>
|
||||
<constraint firstItem="j3D-XF-u37" firstAttribute="top" secondItem="lNN-hV-Kcy" secondAttribute="bottom" constant="7" id="wYE-52-Ik6"/>
|
||||
<constraint firstItem="X4R-sr-2s9" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="28" id="zdE-iY-NlG"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
</view>
|
||||
|
|
|
@ -16,126 +16,111 @@
|
|||
|
||||
@end
|
||||
|
||||
BOOL trial;
|
||||
NSArray *_backupFolderArray;
|
||||
NSString *_backupDirectory;
|
||||
NSMutableString *selectedBackupImageURL;
|
||||
NSMutableString *selectedBackupURL;
|
||||
NSString *backupNameSelected;
|
||||
int itFuckingCounts = 0;
|
||||
|
||||
//CFArrayRef CPBitmapCreateImagesFromData(CFDataRef cpbitmap, void*, int, void*);
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
|
||||
- (IBAction)secretButton:(id)sender {
|
||||
|
||||
itFuckingCounts++;
|
||||
|
||||
if (itFuckingCounts==13) {
|
||||
|
||||
UIAlertController * secretButtonAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Secret found!"
|
||||
message:@"Thanks for supporting FlashBack, and congratulations on finding the secret button!"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@":)"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
NSURL *myPicURL = [NSURL fileURLWithPath:@"/Library/FlashBack/.mg.png"];
|
||||
NSLog(@"%@", myPicURL);
|
||||
NSData *myPicData = [NSData dataWithContentsOfURL:myPicURL];
|
||||
selectedBackupImage.image = [UIImage imageWithData:myPicData];
|
||||
|
||||
[secretButtonAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
[secretButtonAlert addAction:ok];
|
||||
|
||||
[self presentViewController:secretButtonAlert animated:YES completion:nil];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (IBAction)createBackup:(id)sender {
|
||||
|
||||
UIAlertController *createBackupAlert = [UIAlertController alertControllerWithTitle:@"Enter the Backup Name" message:@"Please do not use special symbols. Use only letters and numbers, no spaces." preferredStyle:UIAlertControllerStyleAlert];
|
||||
[createBackupAlert addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
|
||||
textField.placeholder = @"Backup Name";
|
||||
textField.secureTextEntry = NO;
|
||||
}];
|
||||
UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
NSLog(@"Backup name is :%@", [[createBackupAlert textFields][0] text]);
|
||||
NSString *newBackupName=[[createBackupAlert textFields][0] text];
|
||||
if(([_backupFolderArray count] >= 1) && (trial == YES)){
|
||||
|
||||
if([[[createBackupAlert textFields][0] text] isEqual:@""]){
|
||||
NSLog(@"empty backup name!");
|
||||
}
|
||||
else{
|
||||
NSLog(@"Backup name is good!");
|
||||
|
||||
NSLog(@"Running NSTask");
|
||||
|
||||
NSTask *createTask = [[NSTask alloc] init];
|
||||
[createTask setLaunchPath:@"/bin/bash"];
|
||||
[createTask setArguments:@[ @"FBCreate", newBackupName]];
|
||||
[createTask launch];
|
||||
[createTask waitUntilExit];
|
||||
|
||||
UIAlertController * finishedCreateAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Backup Creation Completed"
|
||||
message:@"The backup has been successfully created"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
_backupFolderArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Library/FlashBack/Backups/" error:nil];
|
||||
[self->selectedBackupPickerView reloadAllComponents];
|
||||
|
||||
[finishedCreateAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
[finishedCreateAlert addAction:ok];
|
||||
|
||||
[self presentViewController:finishedCreateAlert animated:YES completion:nil];
|
||||
|
||||
/*pid_t pid;
|
||||
int status;
|
||||
const char* args[] = {"killall", "backboardd", NULL, NULL};
|
||||
posix_spawn(&pid, "/bin/bash", NULL, NULL, (char* const*)args, NULL);
|
||||
waitpid(pid, &status, WEXITED);*/
|
||||
|
||||
}
|
||||
UIAlertController * noMoreBackupsAlert = [UIAlertController
|
||||
alertControllerWithTitle:@"Maximum Backups Reached"
|
||||
message:@"The free trial of FlashBack only allows one saved setup. Purchase the full version on PackIX for $1.50 to make more!"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"ok"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[noMoreBackupsAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
|
||||
}];
|
||||
[createBackupAlert addAction:confirmAction];
|
||||
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
||||
NSLog(@"Canelled");
|
||||
}];
|
||||
[createBackupAlert addAction:cancelAction];
|
||||
[self presentViewController:createBackupAlert animated:YES completion:nil];
|
||||
|
||||
[noMoreBackupsAlert addAction:ok];
|
||||
[self presentViewController:noMoreBackupsAlert animated:YES completion:nil];
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
UIAlertController *createBackupAlert = [UIAlertController alertControllerWithTitle:@"Enter the Backup Name" message:@"Please do not use special symbols. Use only letters and numbers, no spaces. If you have issues with the wallpaper not being properly applied after restoring to a backup, install autowall from\n https://jb365.github.io/" preferredStyle:UIAlertControllerStyleAlert];
|
||||
[createBackupAlert addTextFieldWithConfigurationHandler:^(UITextField * _Nonnull textField) {
|
||||
textField.placeholder = @"Backup Name";
|
||||
textField.secureTextEntry = NO;
|
||||
}];
|
||||
UIAlertAction *confirmAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||
NSLog(@"Backup name is :%@", [[createBackupAlert textFields][0] text]);
|
||||
NSString *newBackupName=[[createBackupAlert textFields][0] text];
|
||||
|
||||
if([[[createBackupAlert textFields][0] text] isEqual:@""]){
|
||||
NSLog(@"empty backup name!");
|
||||
}
|
||||
else{
|
||||
NSLog(@"Backup name is good!");
|
||||
|
||||
NSLog(@"Running NSTask");
|
||||
|
||||
NSTask *createTask = [[NSTask alloc] init];
|
||||
[createTask setLaunchPath:@"/bin/bash"];
|
||||
[createTask setArguments:@[ @"FBCreate", newBackupName]];
|
||||
[createTask launch];
|
||||
[createTask waitUntilExit];
|
||||
|
||||
UIAlertController * finishedCreateAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Backup Creation Completed"
|
||||
message:@"The backup has been successfully created"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
_backupFolderArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Library/FlashBack/Backups/" error:nil];
|
||||
[self->selectedBackupPickerView reloadAllComponents];
|
||||
|
||||
[finishedCreateAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
[finishedCreateAlert addAction:ok];
|
||||
|
||||
[self presentViewController:finishedCreateAlert animated:YES completion:nil];
|
||||
|
||||
/*pid_t pid;
|
||||
int status;
|
||||
const char* args[] = {"killall", "backboardd", NULL, NULL};
|
||||
posix_spawn(&pid, "/bin/bash", NULL, NULL, (char* const*)args, NULL);
|
||||
waitpid(pid, &status, WEXITED);*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
}];
|
||||
[createBackupAlert addAction:confirmAction];
|
||||
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
||||
NSLog(@"Canelled");
|
||||
}];
|
||||
[createBackupAlert addAction:cancelAction];
|
||||
[self presentViewController:createBackupAlert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (IBAction)restoreBackup:(id)sender {
|
||||
|
||||
if (backupNameSelected == nil){
|
||||
|
||||
UIAlertController * selectBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Select a Backup!"
|
||||
message:@"Scroll through the list then let it settle on an item to select the backup."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
alertControllerWithTitle:@"Select a Backup!"
|
||||
message:@"Scroll through the list then let it settle on an item to select the backup."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"ok"
|
||||
|
@ -152,47 +137,47 @@ int itFuckingCounts = 0;
|
|||
|
||||
}
|
||||
else{
|
||||
|
||||
UIAlertController * restoreBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Restore Backup"
|
||||
message:@"Your device will revert to the selected backup! Please wait for your device to respring."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
//RUN RESTORE SCRIPT
|
||||
|
||||
NSTask *restoreTask = [[NSTask alloc] init];
|
||||
[restoreTask setLaunchPath:@"/bin/bash"];
|
||||
[restoreTask setArguments:@[ @"FBRestore", backupNameSelected]];
|
||||
[restoreTask launch];
|
||||
|
||||
UIAlertController * finishedRestoreAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Restoring from backup"
|
||||
message:@"Your device will respring when the process is completed."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[self presentViewController:finishedRestoreAlert animated:YES completion:nil];
|
||||
|
||||
[restoreBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
UIAlertAction* cancel = [UIAlertAction
|
||||
actionWithTitle:@"Cancel"
|
||||
|
||||
UIAlertController * restoreBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Restore Backup"
|
||||
message:@"Your device will revert to the selected backup! Please wait for your device to respring."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
//RUN RESTORE SCRIPT
|
||||
|
||||
NSTask *restoreTask = [[NSTask alloc] init];
|
||||
[restoreTask setLaunchPath:@"/bin/bash"];
|
||||
[restoreTask setArguments:@[ @"FBRestore", backupNameSelected]];
|
||||
[restoreTask launch];
|
||||
|
||||
UIAlertController * finishedRestoreAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Restoring from backup"
|
||||
message:@"Your device will respring when the process is completed."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[self presentViewController:finishedRestoreAlert animated:YES completion:nil];
|
||||
|
||||
[restoreBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
|
||||
[restoreBackupAlert addAction:cancel];
|
||||
[restoreBackupAlert addAction:ok];
|
||||
|
||||
[self presentViewController:restoreBackupAlert animated:YES completion:nil];
|
||||
UIAlertAction* cancel = [UIAlertAction
|
||||
actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[restoreBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
|
||||
[restoreBackupAlert addAction:cancel];
|
||||
[restoreBackupAlert addAction:ok];
|
||||
|
||||
[self presentViewController:restoreBackupAlert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,143 +205,167 @@ int itFuckingCounts = 0;
|
|||
|
||||
}
|
||||
else{
|
||||
|
||||
UIAlertController * updateBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Update Backup"
|
||||
message:@"The selected backup will be overwritten! Please wait until the completion pop-up appears"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
|
||||
[updateBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
NSTask *deleteTask = [[NSTask alloc] init];
|
||||
[deleteTask setLaunchPath:@"/bin/bash"];
|
||||
[deleteTask setArguments:@[ @"FBDelete", backupNameSelected]];
|
||||
[deleteTask launch];
|
||||
[deleteTask waitUntilExit];
|
||||
|
||||
NSTask *createTask = [[NSTask alloc] init];
|
||||
[createTask setLaunchPath:@"/bin/bash"];
|
||||
[createTask setArguments:@[ @"FBCreate", backupNameSelected]];
|
||||
[createTask launch];
|
||||
[createTask waitUntilExit];
|
||||
|
||||
UIAlertController * finishedUpdateAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Backup Update Completed"
|
||||
message:@"The backup has been successfully updated"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
_backupFolderArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Library/FlashBack/Backups/" error:nil];
|
||||
[self->selectedBackupPickerView reloadAllComponents];
|
||||
|
||||
[finishedUpdateAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
[finishedUpdateAlert addAction:ok];
|
||||
|
||||
[self presentViewController:finishedUpdateAlert animated:YES completion:nil];
|
||||
|
||||
|
||||
}];
|
||||
UIAlertAction* cancel = [UIAlertAction
|
||||
actionWithTitle:@"Cancel"
|
||||
|
||||
UIAlertController * updateBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Update Backup"
|
||||
message:@"The selected backup will be overwritten! Please wait until the completion pop-up appears"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
|
||||
[updateBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
NSTask *deleteTask = [[NSTask alloc] init];
|
||||
[deleteTask setLaunchPath:@"/bin/bash"];
|
||||
[deleteTask setArguments:@[ @"FBDelete", backupNameSelected]];
|
||||
[deleteTask launch];
|
||||
[deleteTask waitUntilExit];
|
||||
|
||||
NSTask *createTask = [[NSTask alloc] init];
|
||||
[createTask setLaunchPath:@"/bin/bash"];
|
||||
[createTask setArguments:@[ @"FBCreate", backupNameSelected]];
|
||||
[createTask launch];
|
||||
[createTask waitUntilExit];
|
||||
|
||||
UIAlertController * finishedUpdateAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Backup Update Completed"
|
||||
message:@"The backup has been successfully updated"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
_backupFolderArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Library/FlashBack/Backups/" error:nil];
|
||||
[self->selectedBackupPickerView reloadAllComponents];
|
||||
|
||||
[finishedUpdateAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
[finishedUpdateAlert addAction:ok];
|
||||
|
||||
[self presentViewController:finishedUpdateAlert animated:YES completion:nil];
|
||||
|
||||
|
||||
}];
|
||||
|
||||
[updateBackupAlert addAction:cancel];
|
||||
[updateBackupAlert addAction:ok];
|
||||
|
||||
[self presentViewController:updateBackupAlert animated:YES completion:nil];
|
||||
UIAlertAction* cancel = [UIAlertAction
|
||||
actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[updateBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
|
||||
[updateBackupAlert addAction:cancel];
|
||||
[updateBackupAlert addAction:ok];
|
||||
|
||||
[self presentViewController:updateBackupAlert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)packageBackup:(id)sender {
|
||||
|
||||
if (backupNameSelected == nil){
|
||||
if (trial == NO){
|
||||
|
||||
UIAlertController * selectBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Select a Backup!"
|
||||
message:@"Scroll through the list then let it settle on an item to select the backup."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
if (backupNameSelected == nil){
|
||||
|
||||
UIAlertController * selectBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Select a Backup!"
|
||||
message:@"Scroll through the list then let it settle on an item to select the backup."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"ok"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[selectBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
|
||||
[selectBackupAlert addAction:ok];
|
||||
|
||||
[self presentViewController:selectBackupAlert animated:YES completion:nil];
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
UIAlertController * packageBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Package Backup"
|
||||
message:@"This will package the selected backup to a DEB file."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
UIAlertController * packageBackupWait= [UIAlertController
|
||||
alertControllerWithTitle:@"Backup DEB"
|
||||
message:@"The backup is being created. Please Wait. This dialogue will will be dismissed when finished. The DEB can be found in [/User/Documents/FlashBackDEBs]"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[packageBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
[self presentViewController:packageBackupWait animated:YES completion:nil];
|
||||
|
||||
|
||||
NSTask *packageTask = [[NSTask alloc] init];
|
||||
[packageTask setLaunchPath:@"/bin/bash"];
|
||||
[packageTask setArguments:@[ @"FBPackage", backupNameSelected]];
|
||||
[packageTask launch];
|
||||
[packageTask waitUntilExit];
|
||||
|
||||
|
||||
[packageBackupWait dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
UIAlertAction* cancel = [UIAlertAction
|
||||
actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[packageBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
|
||||
[packageBackupAlert addAction:cancel];
|
||||
[packageBackupAlert addAction:ok];
|
||||
|
||||
[self presentViewController:packageBackupAlert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
else{
|
||||
|
||||
UIAlertController * noBackupDEBAlert = [UIAlertController
|
||||
alertControllerWithTitle:@"Creating DEBs is only available in the full version"
|
||||
message:@"The free trial of FlashBack doesn't allow backing up setups to DEBs. Purchase the full version on PackIX for $1.50 for this!"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"ok"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[selectBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
[noBackupDEBAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
|
||||
[selectBackupAlert addAction:ok];
|
||||
[noBackupDEBAlert addAction:ok];
|
||||
|
||||
[self presentViewController:selectBackupAlert animated:YES completion:nil];
|
||||
[self presentViewController:noBackupDEBAlert animated:YES completion:nil];
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
UIAlertController * packageBackupAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Package Backup"
|
||||
message:@"This will package the selected backup to a DEB file."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"OK"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
|
||||
UIAlertController * packageBackupWait= [UIAlertController
|
||||
alertControllerWithTitle:@"Backup DEB"
|
||||
message:@"The backup is being created. Please Wait. This dialogue will will be dismissed when finished. The DEB can be found in [/User/Documents/FlashBackDEBs]"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[packageBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
[self presentViewController:packageBackupWait animated:YES completion:nil];
|
||||
|
||||
|
||||
NSTask *packageTask = [[NSTask alloc] init];
|
||||
[packageTask setLaunchPath:@"/bin/bash"];
|
||||
[packageTask setArguments:@[ @"FBPackage", backupNameSelected]];
|
||||
[packageTask launch];
|
||||
[packageTask waitUntilExit];
|
||||
|
||||
|
||||
[packageBackupWait dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
UIAlertAction* cancel = [UIAlertAction
|
||||
actionWithTitle:@"Cancel"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[packageBackupAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
|
||||
}];
|
||||
|
||||
[packageBackupAlert addAction:cancel];
|
||||
[packageBackupAlert addAction:ok];
|
||||
|
||||
[self presentViewController:packageBackupAlert animated:YES completion:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)helpMenu:(id)sender {
|
||||
|
@ -376,7 +385,7 @@ int itFuckingCounts = 0;
|
|||
|
||||
UIAlertController * infoAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Known issues"
|
||||
message:@"\nScrolling through the picker view with no backups will crash the app.\n\nSometimes, wallpapers are incorrectly applied after restoring a backup\n\nFor bug reports, please contact me via Twitter or the email available in the next pop-up dialogue."
|
||||
message:@"\nFor bug reports, please contact me via Twitter or the email available in the next pop-up dialogue.\n\nCredit for the DRM goes to @kushdabush on twitter"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* okay = [UIAlertAction
|
||||
|
@ -423,8 +432,6 @@ int itFuckingCounts = 0;
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (IBAction)deleteBackup:(id)sender {
|
||||
|
||||
if (backupNameSelected == nil){
|
||||
|
@ -467,9 +474,9 @@ int itFuckingCounts = 0;
|
|||
[deleteTask waitUntilExit];
|
||||
|
||||
UIAlertController * deleteFinishedAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Backup Deleted"
|
||||
message:@"The backup has been deleted successfully"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
alertControllerWithTitle:@"Backup Deleted"
|
||||
message:@"The backup has been deleted successfully"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* okey = [UIAlertAction
|
||||
actionWithTitle:@"ok"
|
||||
|
@ -515,24 +522,82 @@ int itFuckingCounts = 0;
|
|||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
|
||||
|
||||
|
||||
selectedBackupPickerView.delegate=self;
|
||||
selectedBackupPickerView.dataSource=self;
|
||||
|
||||
// MARK: List of Backups is found and added to this array
|
||||
//_backupFolderArray = @[@"one",@"two",@"three"];
|
||||
_backupFolderArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:@"/Library/FlashBack/Backups/" error:nil];
|
||||
NSLog(@"%d", itFuckingCounts);
|
||||
|
||||
// MARK: DRM From @Kushdabush, commenting out for testing
|
||||
//pulled from https://github.com/DomienF/kushy-drm/blob/master/Tweak.xm
|
||||
/*
|
||||
|
||||
UIAlertController * failedDRMAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"FlashBack appears to be pirated :("
|
||||
message:@"Please support small devs and purchase software. If you're unable to, please contact me, I'm happy to work things out! If you want to test it out, check out the trial version!"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* failedDRMOk = [UIAlertAction
|
||||
actionWithTitle:@"ok"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[failedDRMAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
//exit(0);
|
||||
}];
|
||||
|
||||
UIAlertController * trialNoticeAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Trial Notice"
|
||||
message:@"Thanks for checking out FlashBack! This trial allows you to give FlashBack a test run allowing for one backup. You can use that backup as a checkpoint to revert to after making changes."
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* trialOk = [UIAlertAction
|
||||
actionWithTitle:@"ok"
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action)
|
||||
{
|
||||
[trialNoticeAlert dismissViewControllerAnimated:YES completion:nil];
|
||||
}];
|
||||
|
||||
[failedDRMAlert addAction:failedDRMOk];
|
||||
[trialNoticeAlert addAction:trialOk];
|
||||
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.mpg13.flashback.list"]){
|
||||
NSLog(@"FlashBack DRM Passed");
|
||||
trial = NO;
|
||||
}
|
||||
else{
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:@"/var/lib/dpkg/info/com.mpg13.flashbackfree.list"]){
|
||||
NSLog(@"FlashBack Trial Mode");
|
||||
trial = YES;
|
||||
dispatch_async(dispatch_get_main_queue(), ^ {
|
||||
[self presentViewController:trialNoticeAlert animated:YES completion:nil];
|
||||
});
|
||||
}
|
||||
else{
|
||||
NSLog(@"DRM failed");
|
||||
dispatch_async(dispatch_get_main_queue(), ^ {
|
||||
[self presentViewController:failedDRMAlert animated:YES completion:nil];
|
||||
});
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
trial = NO;
|
||||
}
|
||||
|
||||
|
||||
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
|
||||
|
||||
|
||||
//NEED TO FIGURE OUT HOW TO CHECK FOR EMPTY LIST
|
||||
if (_backupFolderArray == nil){
|
||||
|
||||
|
||||
UIAlertController * emptyArrayAlert= [UIAlertController
|
||||
alertControllerWithTitle:@"Let's start by making a backup!"
|
||||
message:@"Press 'Create Backup' to get started!"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
alertControllerWithTitle:@"Let's start by making a backup!"
|
||||
message:@"Press 'Create Backup' to get started!"
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* ok = [UIAlertAction
|
||||
actionWithTitle:@"ok"
|
||||
|
@ -546,33 +611,24 @@ int itFuckingCounts = 0;
|
|||
[emptyArrayAlert addAction:ok];
|
||||
|
||||
[self presentViewController:emptyArrayAlert animated:YES completion:nil];
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
backupNameSelected = [_backupFolderArray objectAtIndex:row];
|
||||
selectedBackupText.text=backupNameSelected;
|
||||
|
||||
selectedBackupURL = [NSMutableString stringWithString: @"/Library/FlashBack/Backups/"];
|
||||
[selectedBackupURL appendString: backupNameSelected];
|
||||
|
||||
selectedBackupImageURL=selectedBackupURL;
|
||||
|
||||
[selectedBackupImageURL appendString: @"/SBFolder/LockBackgroundThumbnail.jpg"];
|
||||
//[selectedBackupImageURL appendString: @"/SBFolder/LockBackground.cpbitmap"];
|
||||
NSLog(@"%@", selectedBackupImageURL);
|
||||
NSURL *url = [NSURL fileURLWithPath:selectedBackupImageURL];
|
||||
NSData *data = [NSData dataWithContentsOfURL:url];
|
||||
|
||||
/*NSData *homeData = [NSData dataWithContentsOfFile:selectedBackupImageURL];
|
||||
CFArrayRef homeArrayRef = CPBitmapCreateImagesFromData((__bridge CFDataRef)homeData, NULL, 1, NULL);
|
||||
NSArray *homeArray = (__bridge NSArray*)homeArrayRef;
|
||||
UIImage *homeWallpaper = [[UIImage alloc] initWithCGImage:(__bridge CGImageRef)(homeArray[0])];*/
|
||||
backupNameSelected = [_backupFolderArray objectAtIndex:row];
|
||||
selectedBackupText.text=backupNameSelected;
|
||||
|
||||
selectedBackupImage.image = [UIImage imageWithData:data];
|
||||
//selectedBackupImage.image = [UIImage imageWithContentsOfCPBitmapFile:selectedBackupImageURL flags:kNilOptions];
|
||||
selectedBackupURL = [NSMutableString stringWithString: @"/Library/FlashBack/Backups/"];
|
||||
[selectedBackupURL appendString: backupNameSelected];
|
||||
|
||||
|
||||
NSLog(@"%@", backupNameSelected);
|
||||
selectedBackupImageURL=selectedBackupURL;
|
||||
|
||||
[selectedBackupImageURL appendString: @"/SBFolder/LockBackgroundThumbnail.jpg"];
|
||||
NSLog(@"%@", selectedBackupImageURL);
|
||||
NSURL *url = [NSURL fileURLWithPath:selectedBackupImageURL];
|
||||
NSData *data = [NSData dataWithContentsOfURL:url];
|
||||
selectedBackupImage.image = [UIImage imageWithData:data];
|
||||
|
||||
NSLog(@"%@", backupNameSelected);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue