From ebaf49a62ecfe62f92ce335c28362bd2ce794b38 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Wed, 1 Apr 2020 23:03:25 +0300 Subject: [PATCH] Adding realm migration stub --- AutoCat.xcodeproj/project.pbxproj | 4 ++-- AutoCat/AppDelegate.swift | 8 ++++++++ AutoCat/Info.plist | 8 ++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/AutoCat.xcodeproj/project.pbxproj b/AutoCat.xcodeproj/project.pbxproj index f93b6da..05dd07a 100644 --- a/AutoCat.xcodeproj/project.pbxproj +++ b/AutoCat.xcodeproj/project.pbxproj @@ -519,7 +519,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 46DTTB8X4S; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -543,7 +543,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 46DTTB8X4S; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/AutoCat/AppDelegate.swift b/AutoCat/AppDelegate.swift index 5d00cfa..e99f5f5 100644 --- a/AutoCat/AppDelegate.swift +++ b/AutoCat/AppDelegate.swift @@ -1,5 +1,6 @@ import UIKit import SVProgressHUD +import RealmSwift @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -7,6 +8,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + + let config = Realm.Configuration( + schemaVersion: 2, + migrationBlock: { migration, oldSchemaVersion in + }) + + Realm.Configuration.defaultConfiguration = config SVProgressHUD.setDefaultStyle(.dark) SVProgressHUD.setDefaultMaskType(.black) diff --git a/AutoCat/Info.plist b/AutoCat/Info.plist index a1cf521..c34e0f0 100644 --- a/AutoCat/Info.plist +++ b/AutoCat/Info.plist @@ -2,10 +2,6 @@ - UIAppFonts - - RoadNumbers2.0.otf - CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable @@ -44,6 +40,10 @@ + UIAppFonts + + RoadNumbers2.0.otf + UIApplicationSceneManifest UIApplicationSupportsMultipleScenes