Просмотр исходного кода

Updated Realm optional macros and cleaned project changes.

Tim Oliver лет назад: 10
Родитель
Сommit
0112c097d9

+ 4 - 7
Classes/GlobalStateExplorers/DatabaseBrowser/FLEXRealmDatabaseManager.m

@@ -8,7 +8,7 @@
 
 #import "FLEXRealmDatabaseManager.h"
 
-#if __has_include("<Realm/Realm.h>")
+#if __has_include(<Realm/Realm.h>)
 
 #import <Realm/Realm.h>
 #import <Realm/RLMRealm_Dynamic.h>
@@ -24,7 +24,7 @@
 
 @implementation FLEXRealmDatabaseManager
 
-#if __has_include("<Realm/Realm.h>")
+#if __has_include(<Realm/Realm.h>)
 
 - (instancetype)initWithPath:(NSString*)aPath
 {
@@ -38,13 +38,10 @@
 
 - (BOOL)open
 {
-    RLMRealmConfiguration *configuration = [RLMRealmConfiguration defaultConfiguration];
-    configuration.dynamic = YES;
-    configuration.path = self.path;
-    
     NSError *error = nil;
+    RLMRealmConfiguration *configuration = [[RLMRealmConfiguration alloc] init];
+    configuration.path = self.path;
     self.realm = [RLMRealm realmWithConfiguration:configuration error:&error];
-    
     return (error == nil);
 }
 

+ 2 - 2
Classes/GlobalStateExplorers/DatabaseBrowser/FLEXTableListViewController.m

@@ -10,7 +10,7 @@
 
 #import "FLEXDatabaseManager.h"
 #import "FLEXSQLiteDatabaseManager.h"
-#if __has_include("<Realm/Realm.h>")
+#if __has_include(<Realm/Realm.h>)
 #import "FLEXRealmDatabaseManager.h"
 #endif
 
@@ -49,7 +49,7 @@
         return [[FLEXSQLiteDatabaseManager alloc] initWithPath:path];
     }
     
-#if __has_include("<Realm/Realm.h>")
+#if __has_include(<Realm/Realm.h>)
     if ([pathExtension isEqualToString:@"realm"]) {
         return [[FLEXRealmDatabaseManager alloc] initWithPath:path];
     }

+ 1 - 1
Classes/GlobalStateExplorers/FLEXFileBrowserTableViewController.m

@@ -220,7 +220,7 @@
             } else if ([@[@"db", @"sqlite", @"sqlite3"] containsObject:[subpath pathExtension]]) {
               drillInViewController = [[FLEXTableListViewController alloc] initWithPath:fullPath];
             }
-#if __has_include("<Realm/Realm.h>")
+#if __has_include(<Realm/Realm.h>)
             else if ([@[@"realm"] containsObject:[subpath pathExtension]]) {
                 drillInViewController = [[FLEXTableListViewController alloc] initWithPath:fullPath];
             }

+ 0 - 3
Example/UICatalog.xcodeproj/project.pbxproj

@@ -7,7 +7,6 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
-		224D49B01C673BB5000EAB86 /* Realm.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224D49AE1C673BA1000EAB86 /* Realm.framework */; };
 		3EC6487318FF8A5000024205 /* ReadMe.txt in Resources */ = {isa = PBXBuildFile; fileRef = 3EC6487218FF8A5000024205 /* ReadMe.txt */; };
 		5356823E18F3656900BAAD62 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5356823D18F3656900BAAD62 /* Foundation.framework */; };
 		5356824018F3656900BAAD62 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5356823F18F3656900BAAD62 /* CoreGraphics.framework */; };
@@ -62,7 +61,6 @@
 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
-		224D49AE1C673BA1000EAB86 /* Realm.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Realm.framework; path = /Users/TiM/Projects/FLEX/Example/Realm.framework; sourceTree = "<absolute>"; };
 		3EC6487218FF8A5000024205 /* ReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ReadMe.txt; sourceTree = SOURCE_ROOT; };
 		5356823A18F3656900BAAD62 /* UICatalog.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UICatalog.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		5356823D18F3656900BAAD62 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -141,7 +139,6 @@
 				779B1EF51C0C4F25001F5E49 /* libsqlite3.dylib in Frameworks */,
 				94CB4D431A97183E0054A905 /* libz.dylib in Frameworks */,
 				5356824018F3656900BAAD62 /* CoreGraphics.framework in Frameworks */,
-				224D49B01C673BB5000EAB86 /* Realm.framework in Frameworks */,
 				5356824218F3656900BAAD62 /* UIKit.framework in Frameworks */,
 				5356823E18F3656900BAAD62 /* Foundation.framework in Frameworks */,
 			);

BIN
Example/UICatalog/dogs.realm