Browse Source

rebranded for greeng0blin, fixed some bugs with regards to disabling the jailbreak button once already jailbroken etc

Kevin Bradley 6 years ago
parent
commit
66cc315918
27 changed files with 345 additions and 28 deletions
  1. 16 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
  2. 6 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json
  3. 17 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json
  4. 16 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
  5. 6 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json
  6. 16 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
  7. 6 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json
  8. 6 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json
  9. 17 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json
  10. 1 1
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
  11. BIN
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/g0blin@2x.png
  12. BIN
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/gg copy-1.png
  13. 6 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json
  14. 16 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
  15. 6 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json
  16. 1 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json
  17. BIN
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/gg_topshelf.png
  18. 1 0
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json
  19. BIN
      g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/gg_topshelf.png
  20. 29 14
      g0blinTV/Base.lproj/Main.storyboard
  21. 2 0
      g0blinTV/Info.plist
  22. 16 0
      g0blinTV/UIColor+Additions.h
  23. 119 0
      g0blinTV/UIColor+Additions.m
  24. 41 12
      g0blinTV/ViewController.m
  25. 1 1
      g0blinTV/bootstrap.m
  26. BIN
      g0blinTV/gg.png
  27. BIN
      g0blinTV/greeng0blin-white copy.png

+ 16 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json

@@ -0,0 +1,16 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 6 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 17 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json

@@ -0,0 +1,17 @@
+{
+  "layers" : [
+    {
+      "filename" : "Front.imagestacklayer"
+    },
+    {
+      "filename" : "Middle.imagestacklayer"
+    },
+    {
+      "filename" : "Back.imagestacklayer"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 16 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json

@@ -0,0 +1,16 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 6 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 16 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json

@@ -0,0 +1,16 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 6 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 6 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 17 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json

@@ -0,0 +1,17 @@
+{
+  "layers" : [
+    {
+      "filename" : "Front.imagestacklayer"
+    },
+    {
+      "filename" : "Middle.imagestacklayer"
+    },
+    {
+      "filename" : "Back.imagestacklayer"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 1 - 1
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json

@@ -2,7 +2,7 @@
   "images" : [
     {
       "idiom" : "tv",
-      "filename" : "g0blin@2x.png",
+      "filename" : "gg copy-1.png",
       "scale" : "1x"
     },
     {

BIN
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/g0blin@2x.png


BIN
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/gg copy-1.png


+ 6 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 16 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json

@@ -0,0 +1,16 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 6 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 1 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json

@@ -6,6 +6,7 @@
     },
     {
       "idiom" : "tv",
+      "filename" : "gg_topshelf.png",
       "scale" : "2x"
     }
   ],

BIN
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/gg_topshelf.png


+ 1 - 0
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json

@@ -6,6 +6,7 @@
     },
     {
       "idiom" : "tv",
+      "filename" : "gg_topshelf.png",
       "scale" : "2x"
     }
   ],

BIN
g0blinTV/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/gg_topshelf.png


+ 29 - 14
g0blinTV/Base.lproj/Main.storyboard

@@ -22,7 +22,7 @@
                         <rect key="frame" x="0.0" y="0.0" width="1920" height="1080"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" misplaced="YES" editable="NO" text="Console" textAlignment="natural" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JaC-A2-sE1">
+                            <textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" fixedFrame="YES" editable="NO" text="Console" textAlignment="natural" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JaC-A2-sE1">
                                 <rect key="frame" x="110" y="546" width="1700" height="424"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <color key="backgroundColor" cocoaTouchSystemColor="darkTextColor"/>
@@ -30,15 +30,8 @@
                                 <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
                                 <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
                             </textView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" misplaced="YES" text="10.2.2 tvOS jailbreak v0rtex + yalu102 + nitoTV" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GuE-5Q-JV5">
-                                <rect key="frame" x="110" y="343" width="1700" height="46"/>
-                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
-                                <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g15-vN-6SI" customClass="FocusedButton">
-                                <rect key="frame" x="184" y="422" width="1548" height="86"/>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="g15-vN-6SI" customClass="FocusedButton">
+                                <rect key="frame" x="184" y="427" width="1548" height="86"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
                                 <state key="normal" title="jailbreak"/>
@@ -46,17 +39,37 @@
                                     <action selector="go:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="OZM-75-baP"/>
                                 </connections>
                             </button>
-                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" misplaced="YES" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="vPs-uR-xKu">
-                                <rect key="frame" x="110" y="60" width="1700" height="270"/>
+                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="greeng0blin-white copy" translatesAutoresizingMaskIntoConstraints="NO" id="pxS-yn-dPe">
+                                <rect key="frame" x="1091" y="87" width="81" height="72"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                             </imageView>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" misplaced="YES" text="original by sticktron ported by nitoTV" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="evU-Lb-C8O">
+                            <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="gg" translatesAutoresizingMaskIntoConstraints="NO" id="vPs-uR-xKu">
+                                <rect key="frame" x="329" y="-2" width="1269" height="264"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                            </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="original by sticktron ported by nitoTV" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="evU-Lb-C8O">
                                 <rect key="frame" x="110" y="1007" width="1700" height="46"/>
                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                 <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
                                 <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hYl-1i-I6a" customClass="FocusedButton">
+                                <rect key="frame" x="586" y="330" width="745" height="86"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <inset key="contentEdgeInsets" minX="40" minY="20" maxX="40" maxY="20"/>
+                                <state key="normal" title="Dont Reinstall Bootstrap"/>
+                                <connections>
+                                    <action selector="toggleForce:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="dQA-4c-IdM"/>
+                                </connections>
+                            </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="10.2.2 tvOS jailbreak v0rtex + yalu102 + nitoTV" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GuE-5Q-JV5">
+                                <rect key="frame" x="110" y="272" width="1700" height="46"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <fontDescription key="fontDescription" style="UICTFontTextStyleHeadline"/>
+                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <nil key="highlightedColor"/>
+                            </label>
                         </subviews>
                         <color key="backgroundColor" red="0.12984204290000001" green="0.12984612579999999" blue="0.12984395030000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <viewLayoutGuide key="safeArea" id="wu6-TO-1qx"/>
@@ -64,6 +77,7 @@
                     <connections>
                         <outlet property="consoleView" destination="JaC-A2-sE1" id="SPm-j0-ivp"/>
                         <outlet property="goButton" destination="g15-vN-6SI" id="mH1-wS-mct"/>
+                        <outlet property="reinstallBootstrap" destination="hYl-1i-I6a" id="hJJ-LJ-vvh"/>
                         <outlet property="reinstallBootstrapLabel" destination="GuE-5Q-JV5" id="FS8-Ap-1Ka"/>
                     </connections>
                 </viewController>
@@ -72,6 +86,7 @@
         </scene>
     </scenes>
     <resources>
-        <image name="logo" width="180" height="44"/>
+        <image name="gg" width="1724" height="378"/>
+        <image name="greeng0blin-white copy" width="240" height="343"/>
     </resources>
 </document>

+ 2 - 0
g0blinTV/Info.plist

@@ -4,6 +4,8 @@
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleDisplayName</key>
+	<string>greeng0blin</string>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>

+ 16 - 0
g0blinTV/UIColor+Additions.h

@@ -0,0 +1,16 @@
+
+#import <UIKit/UIKit.h>
+
+typedef NS_ENUM(NSInteger, SQFContrastingColorMethod) {
+    SQFContrastingColorFiftyPercentMethod,
+    SQFContrastingColorYIQMethod
+};
+
+@interface UIColor (Additions)
+
+- (UIColor*)changeBrightnessByAmount:(CGFloat)amount;
++ (UIColor*)changeBrightness:(UIColor*)color amount:(CGFloat)amount;
+- (NSString *)hexValue;
++ (UIColor *)colorFromHex:(NSString *)s;
+- (UIColor *)sqf_contrastingColorWithMethod:(SQFContrastingColorMethod)method;
+@end

+ 119 - 0
g0blinTV/UIColor+Additions.m

@@ -0,0 +1,119 @@
+
+#import "UIColor+Additions.h"
+
+@implementation UIColor (Additions)
+
+
+- (UIColor*)changeBrightnessByAmount:(CGFloat)amount
+{
+    
+    CGFloat hue, saturation, brightness, alpha;
+    if ([self getHue:&hue saturation:&saturation brightness:&brightness alpha:&alpha]) {
+        brightness += (amount-1.0);
+        brightness = MAX(MIN(brightness, 1.0), 0.0);
+        return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:alpha];
+    }
+    
+    CGFloat white;
+    if ([self getWhite:&white alpha:&alpha]) {
+        white += (amount-1.0);
+        white = MAX(MIN(white, 1.0), 0.0);
+        return [UIColor colorWithWhite:white alpha:alpha];
+    }
+    
+    return nil;
+}
+
++ (UIColor*)changeBrightness:(UIColor*)color amount:(CGFloat)amount
+{
+    
+    CGFloat hue, saturation, brightness, alpha;
+    if ([color getHue:&hue saturation:&saturation brightness:&brightness alpha:&alpha]) {
+        brightness += (amount-1.0);
+        brightness = MAX(MIN(brightness, 1.0), 0.0);
+        return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:alpha];
+    }
+    
+    CGFloat white;
+    if ([color getWhite:&white alpha:&alpha]) {
+        white += (amount-1.0);
+        white = MAX(MIN(white, 1.0), 0.0);
+        return [UIColor colorWithWhite:white alpha:alpha];
+    }
+    
+    return nil;
+}
+
++ (UIColor *)colorFromHex:(NSString *)s
+{
+    NSScanner *scan = [NSScanner scannerWithString:[s substringToIndex:2]];
+    unsigned int r = 0, g = 0, b = 0;
+    [scan scanHexInt:&r];
+    scan = [NSScanner scannerWithString:[[s substringFromIndex:2] substringToIndex:2]];
+    [scan scanHexInt:&g];
+    scan = [NSScanner scannerWithString:[s substringFromIndex:4]];
+    [scan scanHexInt:&b];
+    
+    
+    return [UIColor colorWithRed:(float)r/255 green:(float)g/255 blue:(float)b/255 alpha:1.0];
+}
+
+- (NSString *)hexValue
+{
+    const CGFloat *components = CGColorGetComponents(self.CGColor);
+    
+    CGFloat r = components[0];
+    CGFloat g = components[1];
+    CGFloat b = components[2];
+    
+    return [NSString stringWithFormat:@"%02lX%02lX%02lX",
+            lroundf(r * 255),
+            lroundf(g * 255),
+            lroundf(b * 255)];
+}
+
+
+
+- (UIColor *)sqf_contrastingColorWithMethod:(SQFContrastingColorMethod)method
+{
+    switch (method) {
+            
+        case SQFContrastingColorFiftyPercentMethod:
+            return [self sqf_contrastingColorFiftyPercentMethod];
+            break;
+            
+        case SQFContrastingColorYIQMethod:
+            return [self sqf_contrastingColorYIQMethod];
+    }
+}
+
+- (UIColor *)sqf_contrastingColorFiftyPercentMethod
+{
+    CGFloat red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0;
+    [self getRed:&red green:&green blue:&blue alpha:&alpha];
+    
+    NSInteger redDecimal = (NSInteger)(red * 255);
+    NSInteger greenDecimal = (NSInteger)(green * 255);
+    NSInteger blueDecimal = (NSInteger)(blue * 255);
+    
+    NSString *hex = [NSString stringWithFormat:@"%02x%02x%02x", (unsigned int)redDecimal, (unsigned int)greenDecimal, (unsigned int)blueDecimal];
+    
+    unsigned int result = 0;
+    NSScanner *scanner = [NSScanner scannerWithString:hex];
+    [scanner scanHexInt:&result];
+    
+    return (result > 0xffffff / 2) ? [UIColor blackColor] : [UIColor whiteColor];
+}
+
+- (UIColor *)sqf_contrastingColorYIQMethod
+{
+    CGFloat red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0;
+    [self getRed:&red green:&green blue:&blue alpha:&alpha];
+    
+    CGFloat yiq = ((( red * 255 ) * 299 ) + (( green * 255 ) * 587 ) + (( blue * 255 ) * 114 )) / 1000;
+    
+    return (yiq >= 128.0) ? [UIColor blackColor] : [UIColor whiteColor];
+}
+
+
+@end

+ 41 - 12
g0blinTV/ViewController.m

@@ -8,6 +8,7 @@
 
 #import "ViewController.h"
 
+#include <string.h>
 #include "v0rtex2.h"
 #include "common2.h"
 #include "offsets2.h"
@@ -19,8 +20,10 @@
 #import <AVFoundation/AVFoundation.h>
 #import <AVKit/AVKit.h>
 
+#import "UIColor+Additions.h"
 
-#define GRAPE [UIColor colorWithRed:0.5 green:0 blue:1 alpha:1]
+//#define GRAPE [UIColor colorWithRed:0.5 green:0 blue:1 alpha:1]
+#define GRAPE [UIColor colorFromHex:@"25b24a"]
 
 @implementation FocusedButton
 
@@ -79,6 +82,7 @@
 }
 @property (weak, nonatomic) IBOutlet UIImageView *logoView;
 @property (weak, nonatomic) IBOutlet FocusedButton *goButton;
+@property (weak, nonatomic) IBOutlet FocusedButton *reinstallBootstrap;
 @property (weak, nonatomic) IBOutlet UITextView *consoleView;
 @property (weak, nonatomic) IBOutlet UIButton *settingsButton;
 @property (weak, nonatomic) IBOutlet UILabel *reinstallBootstrapLabel;
@@ -98,12 +102,30 @@ AVPlayerViewController *cont;
 
 @implementation ViewController
 
+- (IBAction)toggleForce:(id)sender
+{
+  
+    _force = !_force;
+    if (_force)
+    {
+        [self.reinstallBootstrap setTitle:@"Force Reinstall Bootstrap" forState:UIControlStateNormal];
+        [self.reinstallBootstrap setTitle:@"Force Reinstall Bootstrap" forState:UIControlStateFocused];
+    } else {
+        [self.reinstallBootstrap setTitle:@"Dont Reinstall Bootstrap" forState:UIControlStateNormal];
+        [self.reinstallBootstrap setTitle:@"Dont Reinstall Bootstrap" forState:UIControlStateFocused];
+    }
+}
+
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view, typically from a nib.
     
     [self.goButton buttonColors:GRAPE
-                       andUnfocused:[UIColor whiteColor]];
+                       andUnfocused:[UIColor darkTextColor]];
+    
+    [self.reinstallBootstrap buttonColors:GRAPE
+                   andUnfocused:[UIColor darkTextColor]];
+    
     
     //self.consoleView.layer.cornerRadius = 6;
     self.consoleView.text = nil;
@@ -112,7 +134,8 @@ AVPlayerViewController *cont;
     self.consoleView.layoutManager.allowsNonContiguousLayout = NO;
     self.goButton.layer.cornerRadius = 16;
     
-    self.reinstallBootstrapLabel.hidden = YES;
+    _force = NO;
+    //self.reinstallBootstrapLabel.hidden = YES;
     
     
     // print kernel version
@@ -121,13 +144,16 @@ AVPlayerViewController *cont;
     [self log:[NSString stringWithFormat:@"%s \n", u.version]];
     _disabled = NO;
     // abort if already jailbroken
-    if (strstr(u.version, "MarijuanARM")) {
-        //self.goButton.enabled = NO;
+    //if (strstr(u.version, "MarijuanARM")) {
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:[NSString stringWithUTF8String:u.version] message:nil preferredStyle:UIAlertControllerStyleAlert];
+    [self presentViewController:alert animated:YES completion:nil];
+    if ([[NSString stringWithUTF8String:u.version] containsString:@"MarijuanARM"]){
+    self.goButton.enabled = NO;
         _disabled = YES;
         //self.goButton.backgroundColor = UIColor.darkGrayColor;
         [self.goButton setTitle:@"jailbroke yo!" forState:UIControlStateDisabled];
         [self.goButton buttonColors:UIColor.darkGrayColor
-                       andUnfocused:[UIColor whiteColor]];
+                       andUnfocused:[UIColor darkGrayColor]];
     }
     
     // try to load offsets for device
@@ -272,9 +298,9 @@ AVPlayerViewController *cont;
 - (void)bootstrap {
     [self log:@"bootstrapping"];
     
-    _force = NO;
-    if (self.reinstallBootstrapLabel.hidden == NO) {
-        _force = YES;
+   // _force = NO;
+    if (_force == YES) {
+        //_force = YES;
         [self log:@"(forcing reinstall)"];
     }
     
@@ -326,9 +352,12 @@ AVPlayerViewController *cont;
     
     sleep(2);
     
-    respringNeeded = YES;
-    [self.goButton setTitle:@"respring" forState:UIControlStateNormal];
-    self.goButton.enabled = YES;
+    dispatch_async(dispatch_get_main_queue(), ^{
+        respringNeeded = YES;
+        [self.goButton setTitle:@"respring" forState:UIControlStateNormal];
+        self.goButton.enabled = YES;
+    });
+
 }
 
 - (void)restart {

+ 1 - 1
g0blinTV/bootstrap.m

@@ -34,7 +34,7 @@ int RunCmd(const char *cmd)
             perror("waitpid");
         }
     } else {
-        printf("posix_spawn: %s\n", strerror(status));
+       // printf("posix_spawn: %s\n", strerror(status));
     }
     return status;
 }

BIN
g0blinTV/gg.png


BIN
g0blinTV/greeng0blin-white copy.png