Adding realm migration stub

This commit is contained in:
Selim Mustafaev 2020-04-01 23:03:25 +03:00
parent 734fbc5bc0
commit ebaf49a62e
3 changed files with 14 additions and 6 deletions

View File

@ -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)",

View File

@ -1,5 +1,6 @@
import UIKit
import SVProgressHUD
import RealmSwift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
@ -8,6 +9,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)

View File

@ -2,10 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIAppFonts</key>
<array>
<string>RoadNumbers2.0.otf</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
@ -44,6 +40,10 @@
</dict>
</dict>
</dict>
<key>UIAppFonts</key>
<array>
<string>RoadNumbers2.0.otf</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>