Explorar el Código

App Delegate: correctly initialize MLKit so its crash preventer can work (close #9089)

Felix Paul Kühne hace 12 años
padre
commit
ce07330fcb
Se han modificado 2 ficheros con 9 adiciones y 1 borrados
  1. 8 0
      AspenProject/VLCAppDelegate.m
  2. 1 1
      NEWS

+ 8 - 0
AspenProject/VLCAppDelegate.m

@@ -53,6 +53,9 @@
     // Init the HTTP Server
     self.uploadController = [[VLCHTTPUploaderController alloc] init];
 
+    // enable crash preventer
+    [[MLMediaLibrary sharedMediaLibrary] applicationWillStart];
+
     self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
 
     _playlistViewController = [[VLCPlaylistViewController alloc] init];
@@ -128,6 +131,11 @@
     return url;
 }
 
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+    [[MLMediaLibrary sharedMediaLibrary] applicationWillStart];
+}
+
 - (void)applicationWillResignActive:(UIApplication *)application
 {
     [[MLMediaLibrary sharedMediaLibrary] applicationWillExit];

+ 1 - 1
NEWS

@@ -1,10 +1,10 @@
 2-next:
 -------
+* Improved overall stability (#8989, #9031, #9089, #9092)
 * Add support for subtitles in non-western languages (#8991)
 * Add Bonjour announcement for the WiFi Uploader's website (#8741)
 * Device no longer goes to sleep during media downloads (#9062)
 * Improved video output on external screens (#9079)
-* Various stability improvements (#8989, #9031, #9092)
 * New translations to Bosnian, Catalan, Galician, Marathi
 
 2.0.2: