Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
1
1weather
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
1weather
Commits
f8c91f7f
Commit
f8c91f7f
authored
May 26, 2021
by
Dmitriy Stepanets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged CoreDataStorage
parent
29265d44
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
1Weather.xcodeproj/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
+1
-1
1Weather.xcworkspace/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
+4
-4
CoreDataStorage/CoreDataStorage.xcodeproj/project.pbxproj
+2
-0
CoreDataStorage/CoreDataStorage/CoreDataStorage.swift
+8
-1
No files found.
1Weather.xcodeproj/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
f8c91f7f
...
...
@@ -12,7 +12,7 @@
<
k
e
y
>
OneWeatherNotificationServiceExtension.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
5
3
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
5
5
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
1.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
...
...
1Weather.xcworkspace/xcuserdata/dstepanets.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
f8c91f7f
...
...
@@ -9,21 +9,21 @@
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
42
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
56
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
2.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
43
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
57
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
3.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
44
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
58
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
PG
(
Playground
)
4.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
...
...
@@ -51,7 +51,7 @@
<
k
e
y
>
isShown
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
1
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
54
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
CoreDataStorage/CoreDataStorage.xcodeproj/project.pbxproj
View file @
f8c91f7f
...
...
@@ -35,6 +35,7 @@
CD3884512657BA550070FD6F
/* _CoreDailyWeather.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD3884312657BA410070FD6F
/* _CoreDailyWeather.swift */
;
};
CD3884522657BA550070FD6F
/* _CoreNotifications.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD3884322657BA410070FD6F
/* _CoreNotifications.swift */
;
};
CD3884532657BA550070FD6F
/* _CoreNWSAlert.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD3884332657BA410070FD6F
/* _CoreNWSAlert.swift */
;
};
CD8EA914265D42E2000D3D63
/* 1WModel.xcdatamodeld in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
CD3884372657BA420070FD6F
/* 1WModel.xcdatamodeld */
;
};
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
...
...
@@ -278,6 +279,7 @@
isa
=
PBXResourcesBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
CD8EA914265D42E2000D3D63
/* 1WModel.xcdatamodeld in Resources */
,
CD38843C2657BA430070FD6F
/* regenerate_objects.sh in Resources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
...
...
CoreDataStorage/CoreDataStorage/CoreDataStorage.swift
View file @
f8c91f7f
...
...
@@ -16,7 +16,14 @@ public class CoreDataStorage: Storage {
persistentContainer
.
newBackgroundContext
()
}()
private
lazy
var
persistentContainer
:
NSPersistentContainer
=
{
let
container
=
NSPersistentContainer
(
name
:
"1WModel"
)
guard
let
modelURL
=
Bundle
(
for
:
CoreDataStorage
.
self
)
.
url
(
forResource
:
"1WModel"
,
withExtension
:
"momd"
),
let
managedObjectModel
=
NSManagedObjectModel
(
contentsOf
:
modelURL
)
else
{
return
NSPersistentContainer
(
name
:
"1WModel"
)
}
let
container
=
NSPersistentContainer
(
name
:
"1WModel"
,
managedObjectModel
:
managedObjectModel
)
container
.
loadPersistentStores
{
[
weak
self
]
(
description
,
error
)
in
if
let
error
=
error
{
self
?
.
log
.
error
(
"Error loading persistent stores:
\(
error
)
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment