Bladeren bron

[Simulator] Add perfect status bar

Perfect status bar displays 100% battery life and 9:41 as the time.
This allows for consistent, and perfect screenshoting, 100% of the time
Mike JS. Choi 7 jaren geleden
bovenliggende
commit
78f7053f21
3 gewijzigde bestanden met toevoegingen van 8 en 0 verwijderingen
  1. 1 0
      Podfile
  2. 3 0
      Podfile.lock
  3. 4 0
      Sources/VLCAppDelegate.m

+ 1 - 0
Podfile

@@ -25,6 +25,7 @@ target 'VLC-iOS' do
   pod 'MediaLibraryKit-prod'
   pod 'MobileVLCKit', '3.0.2'
   pod 'GTMAppAuth'
+  pod 'SimulatorStatusMagic', :configurations => ['Debug']
 end
 
 target 'VLC-tvOS' do

+ 3 - 0
Podfile.lock

@@ -51,6 +51,7 @@ PODS:
   - PAPasscode (1.0)
   - SwiftLint (0.25.0)
   - TVVLCKit (3.0.2)
+  - SimulatorStatusMagic (2.1)
   - upnpx (1.4.0)
   - VLC-LiveSDK (5.7.0x)
   - VLC-LXReorderableCollectionViewFlowLayout (0.1.3v)
@@ -77,6 +78,7 @@ DEPENDENCIES:
   - PAPasscode (~> 1.0)
   - SwiftLint (~> 0.25.0)
   - TVVLCKit (= 3.0.2)
+  - SimulatorStatusMagic
   - upnpx (~> 1.4.0)
   - VLC-LiveSDK (= 5.7.0x)
   - VLC-LXReorderableCollectionViewFlowLayout (= 0.1.3v)
@@ -136,6 +138,7 @@ SPEC CHECKSUMS:
   PAPasscode: b408fb87c530cad58a554e26482e87dbb14b7bc2
   SwiftLint: e14651157288e9e01d6e1a71db7014fb5744a8ea
   TVVLCKit: 178e4f82f8b57320774821384e42eaac403d2faa
+  SimulatorStatusMagic: 481558caf2b9ccb2ceba2cc193728d4db3dcac07
   upnpx: c695b99229e08154d23abe5c252cb64f1600f35d
   VLC-LiveSDK: c9566a9edde968f969138f84cfd40b540a109b3f
   VLC-LXReorderableCollectionViewFlowLayout: 0204946967b746ca183835e854826290be06e2f4

+ 4 - 0
Sources/VLCAppDelegate.m

@@ -35,6 +35,7 @@
 #import "VLCPlaybackNavigationController.h"
 #import "PAPasscodeViewController.h"
 #import "VLC_iOS-Swift.h"
+#import "SDStatusBarManager.h"
 
 NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorized";
 
@@ -55,6 +56,9 @@ NSString *const VLCDropboxSessionWasAuthorized = @"VLCDropboxSessionWasAuthorize
 
 + (void)initialize
 {
+#if DEBUG
+    [[SDStatusBarManager sharedInstance] enableOverrides];
+#endif
     NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
 
     NSDictionary *appDefaults = @{kVLCSettingPasscodeAllowFaceID : @(1),