浏览代码

don't migrate to shared group container on pre-iOS 7

Tobias Conradi 10 年之前
父节点
当前提交
f30d1289ef
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      Sources/VLCAppDelegate.m

+ 8 - 0
Sources/VLCAppDelegate.m

@@ -191,6 +191,14 @@
 
 - (void)pathMigrationToGroupsIfNeeded:(NSError **)migrationError
 {
+
+    /*
+     * We can't and don't need to migrate to groups on pre-iOS 7
+     */
+    if (![[NSFileManager defaultManager] respondsToSelector:@selector(containerURLForSecurityApplicationGroupIdentifier:)]) {
+        return;
+    }
+
     MLMediaLibrary *mediaLibrary = [MLMediaLibrary sharedMediaLibrary];
     NSURL *groupURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:@"group.org.videolan.vlc-ios"];