Commit 6056866e by Demid Merzlyakov

CoreData Model created.

parent 63a87a9a
...@@ -159,6 +159,9 @@ ...@@ -159,6 +159,9 @@
CEF959982600C88100975FAA /* AnalyticsParameter.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF959972600C88100975FAA /* AnalyticsParameter.swift */; }; CEF959982600C88100975FAA /* AnalyticsParameter.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF959972600C88100975FAA /* AnalyticsParameter.swift */; };
CEF9599F2601DF3300975FAA /* AdLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF9599E2601DF3300975FAA /* AdLogger.swift */; }; CEF9599F2601DF3300975FAA /* AdLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF9599E2601DF3300975FAA /* AdLogger.swift */; };
CEF959A626035A2600975FAA /* DeviceLocationMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF959A526035A2600975FAA /* DeviceLocationMonitor.swift */; }; CEF959A626035A2600975FAA /* DeviceLocationMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF959A526035A2600975FAA /* DeviceLocationMonitor.swift */; };
CEFB857226174F7A00C5CDD2 /* Storage.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEFB857126174F7A00C5CDD2 /* Storage.swift */; };
CEFB85752617506100C5CDD2 /* CoreDataStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEFB85742617506100C5CDD2 /* CoreDataStorage.swift */; };
CEFB857A2617510700C5CDD2 /* 1WModel.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = CEFB85782617510700C5CDD2 /* 1WModel.xcdatamodeld */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
...@@ -318,6 +321,9 @@ ...@@ -318,6 +321,9 @@
CEF959972600C88100975FAA /* AnalyticsParameter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsParameter.swift; sourceTree = "<group>"; }; CEF959972600C88100975FAA /* AnalyticsParameter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsParameter.swift; sourceTree = "<group>"; };
CEF9599E2601DF3300975FAA /* AdLogger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdLogger.swift; sourceTree = "<group>"; }; CEF9599E2601DF3300975FAA /* AdLogger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdLogger.swift; sourceTree = "<group>"; };
CEF959A526035A2600975FAA /* DeviceLocationMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceLocationMonitor.swift; sourceTree = "<group>"; }; CEF959A526035A2600975FAA /* DeviceLocationMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeviceLocationMonitor.swift; sourceTree = "<group>"; };
CEFB857126174F7A00C5CDD2 /* Storage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storage.swift; sourceTree = "<group>"; };
CEFB85742617506100C5CDD2 /* CoreDataStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreDataStorage.swift; sourceTree = "<group>"; };
CEFB85792617510700C5CDD2 /* Model.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model.xcdatamodel; sourceTree = "<group>"; };
DF826CF4702D9DCCB9A9DD71 /* Pods-1Weather.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-1Weather.release.xcconfig"; path = "Target Support Files/Pods-1Weather/Pods-1Weather.release.xcconfig"; sourceTree = "<group>"; }; DF826CF4702D9DCCB9A9DD71 /* Pods-1Weather.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-1Weather.release.xcconfig"; path = "Target Support Files/Pods-1Weather/Pods-1Weather.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -403,6 +409,7 @@ ...@@ -403,6 +409,7 @@
87C171E725FF79CC00DA3464 /* Configuration */, 87C171E725FF79CC00DA3464 /* Configuration */,
CE9D181425ECB8370028D9D7 /* Common */, CE9D181425ECB8370028D9D7 /* Common */,
CEAFF09925DFC78200DF4EBF /* Network */, CEAFF09925DFC78200DF4EBF /* Network */,
CEFB856B26174F2E00C5CDD2 /* Storage */,
CEAFF08125DFC66F00DF4EBF /* Model */, CEAFF08125DFC66F00DF4EBF /* Model */,
CD647D0025ED07AF0034578B /* ViewModels */, CD647D0025ED07AF0034578B /* ViewModels */,
CD17C5F925D15B5500EE884E /* Coordinators */, CD17C5F925D15B5500EE884E /* Coordinators */,
...@@ -928,6 +935,24 @@ ...@@ -928,6 +935,24 @@
path = Helpers; path = Helpers;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CEFB856B26174F2E00C5CDD2 /* Storage */ = {
isa = PBXGroup;
children = (
CEFB857126174F7A00C5CDD2 /* Storage.swift */,
CEFB8577261750DF00C5CDD2 /* CoreData */,
);
path = Storage;
sourceTree = "<group>";
};
CEFB8577261750DF00C5CDD2 /* CoreData */ = {
isa = PBXGroup;
children = (
CEFB85742617506100C5CDD2 /* CoreDataStorage.swift */,
CEFB85782617510700C5CDD2 /* 1WModel.xcdatamodeld */,
);
path = CoreData;
sourceTree = "<group>";
};
DBFD169AA2AA6A3CB5B68BB5 /* Frameworks */ = { DBFD169AA2AA6A3CB5B68BB5 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1131,6 +1156,7 @@ ...@@ -1131,6 +1156,7 @@
CD37D3FE260DF726002669D6 /* SettingsCellFactory.swift in Sources */, CD37D3FE260DF726002669D6 /* SettingsCellFactory.swift in Sources */,
CD8E041625F8F91B001785B6 /* ForecastCellFactory.swift in Sources */, CD8E041625F8F91B001785B6 /* ForecastCellFactory.swift in Sources */,
87C1720D25FF870600DA3464 /* GeoNamesPlace.swift in Sources */, 87C1720D25FF870600DA3464 /* GeoNamesPlace.swift in Sources */,
CEFB857A2617510700C5CDD2 /* 1WModel.xcdatamodeld in Sources */,
CDC70833260FBFD4004A1974 /* UnitPressure+Atmosphere.swift in Sources */, CDC70833260FBFD4004A1974 /* UnitPressure+Atmosphere.swift in Sources */,
CDC6125325E79C8F00188DA7 /* DayTimeView.swift in Sources */, CDC6125325E79C8F00188DA7 /* DayTimeView.swift in Sources */,
CD251EDC26036E5400ED7A65 /* DayTimePrecipitationView.swift in Sources */, CD251EDC26036E5400ED7A65 /* DayTimePrecipitationView.swift in Sources */,
...@@ -1160,6 +1186,7 @@ ...@@ -1160,6 +1186,7 @@
CDE2BF252609D9140085C930 /* ForecastWindButton.swift in Sources */, CDE2BF252609D9140085C930 /* ForecastWindButton.swift in Sources */,
CD32CE16260C77C600235081 /* MenuHeaderButton.swift in Sources */, CD32CE16260C77C600235081 /* MenuHeaderButton.swift in Sources */,
CD251ED82603633800ED7A65 /* ForecastPrecipitationCell.swift in Sources */, CD251ED82603633800ED7A65 /* ForecastPrecipitationCell.swift in Sources */,
CEFB85752617506100C5CDD2 /* CoreDataStorage.swift in Sources */,
CDF9BF8E26133D050037847D /* LocationSearchCoordinator.swift in Sources */, CDF9BF8E26133D050037847D /* LocationSearchCoordinator.swift in Sources */,
CD86246125E662BC0097F3FB /* SunUvLineView.swift in Sources */, CD86246125E662BC0097F3FB /* SunUvLineView.swift in Sources */,
CD32CE0B260C744A00235081 /* MenuCoordinator.swift in Sources */, CD32CE0B260C744A00235081 /* MenuCoordinator.swift in Sources */,
...@@ -1186,6 +1213,7 @@ ...@@ -1186,6 +1213,7 @@
CD86245E25E646350097F3FB /* SunUvView.swift in Sources */, CD86245E25E646350097F3FB /* SunUvView.swift in Sources */,
CEAFF08325DFC67F00DF4EBF /* Location.swift in Sources */, CEAFF08325DFC67F00DF4EBF /* Location.swift in Sources */,
87C171EC25FF79CC00DA3464 /* EnvironmentManager.swift in Sources */, 87C171EC25FF79CC00DA3464 /* EnvironmentManager.swift in Sources */,
CEFB857226174F7A00C5CDD2 /* Storage.swift in Sources */,
CD82300725D6A73F00A05501 /* TodayConditionButton.swift in Sources */, CD82300725D6A73F00A05501 /* TodayConditionButton.swift in Sources */,
CDC6126A25E90C8800188DA7 /* GraphLineSettings.swift in Sources */, CDC6126A25E90C8800188DA7 /* GraphLineSettings.swift in Sources */,
CDA5542D25EF7C9700A2E08C /* ReusableCellProtocol.swift in Sources */, CDA5542D25EF7C9700A2E08C /* ReusableCellProtocol.swift in Sources */,
...@@ -1397,6 +1425,19 @@ ...@@ -1397,6 +1425,19 @@
defaultConfigurationName = Release; defaultConfigurationName = Release;
}; };
/* End XCConfigurationList section */ /* End XCConfigurationList section */
/* Begin XCVersionGroup section */
CEFB85782617510700C5CDD2 /* 1WModel.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
CEFB85792617510700C5CDD2 /* Model.xcdatamodel */,
);
currentVersion = CEFB85792617510700C5CDD2 /* Model.xcdatamodel */;
path = 1WModel.xcdatamodeld;
sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel;
};
/* End XCVersionGroup section */
}; };
rootObject = CD1237B7255D5C5900C98139 /* Project object */; rootObject = CD1237B7255D5C5900C98139 /* Project object */;
} }
//
// CoreDataStorage.swift
// 1Weather
//
// Created by Demid Merzlyakov on 02.04.2021.
//
import Foundation
public class CoreDataStorage: Storage {
public func save(locations: [Location], selectedIndex: Int) {
}
public func load(completion: StorageCompletion) {
}
}
//
// Storage.swift
// 1Weather
//
// Created by Demid Merzlyakov on 02.04.2021.
//
import Foundation
public typealias StorageCompletion = ([Location]?, selectedIndex: Int, Error?)
public protocol Storage {
func save(locations: [Location], selectedIndex: Int)
func load(completion: StorageCompletion)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment