git.iko.soy/dashared/GDproject
on master help sign in
Trying to embed coordinators in project. Broke log in a little bit. Can be a lot of issues now.
9e6ff48Darya Rednikina
@@ -5,3 +5,4 @@ github "macteo/Marklight"
5github "ElaWorkshop/TagListView"
5github "ElaWorkshop/TagListView"
6github "Alamofire/Alamofire" "5.0.0-beta.2"
6github "Alamofire/Alamofire" "5.0.0-beta.2"
7github "whitesmith/WSTagsField"
7github "whitesmith/WSTagsField"
8+github "ReactiveCocoa/ReactiveCocoa" ~> 8.0
GDproject.xcodeproj/project.pbxproj+63−20
@@ -15,14 +15,16 @@
15 124CC7032221C00C009DF531 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124CC7022221C00C009DF531 /* Model.swift */; };
15 124CC7032221C00C009DF531 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124CC7022221C00C009DF531 /* Model.swift */; };
16 124CC7052221C2BB009DF531 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 124CC7042221C2BA009DF531 /* Alamofire.framework */; };
16 124CC7052221C2BB009DF531 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 124CC7042221C2BA009DF531 /* Alamofire.framework */; };
17 124CC7072221C2C3009DF531 /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 124CC7042221C2BA009DF531 /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 124CC7072221C2C3009DF531 /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 124CC7042221C2BA009DF531 /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18− 1253867D2223DC9F00CC5EA7 /* RepeatingTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1253867C2223DC9F00CC5EA7 /* RepeatingTimer.swift */; };
19 125BD57D22171D2A008A3575 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD57C22171D2A008A3575 /* ProfileViewController.swift */; };
18 125BD57D22171D2A008A3575 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD57C22171D2A008A3575 /* ProfileViewController.swift */; };
20 125BD57F22171D73008A3575 /* Extentions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD57E22171D73008A3575 /* Extentions.swift */; };
19 125BD57F22171D73008A3575 /* Extentions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD57E22171D73008A3575 /* Extentions.swift */; };
21 125BD5812217314A008A3575 /* NewsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD5802217314A008A3575 /* NewsVC.swift */; };
20 125BD5812217314A008A3575 /* NewsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD5802217314A008A3575 /* NewsVC.swift */; };
22 1288B5CE221F1158002BE6B1 /* DataStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1288B5CD221F1158002BE6B1 /* DataStorage.swift */; };
21 1288B5CE221F1158002BE6B1 /* DataStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1288B5CD221F1158002BE6B1 /* DataStorage.swift */; };
23 1291BE2D2221312D009D3F23 /* ChannelsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */; };
22 1291BE2D2221312D009D3F23 /* ChannelsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */; };
24 1291BE342221569B009D3F23 /* TabbarCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */; };
23 1291BE342221569B009D3F23 /* TabbarCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */; };
25− 1291BE3622218DBF009D3F23 /* LogInCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE3522218DBF009D3F23 /* LogInCoordinator.swift */; };
24+ 1291BE3622218DBF009D3F23 /* LogInCoordinator1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE3522218DBF009D3F23 /* LogInCoordinator1.swift */; };
25+ 12BA4B9B224101A400DF93D7 /* ApplicationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9A224101A400DF93D7 /* ApplicationCoordinator.swift */; };
26+ 12BA4B9D224101E700DF93D7 /* BaseCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9C224101E700DF93D7 /* BaseCoordinator.swift */; };
27+ 12BA4B9F224102B700DF93D7 /* LogInCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9E224102B700DF93D7 /* LogInCoordinator.swift */; };
26 12D7D133221C321600B35452 /* ChannelListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D132221C321600B35452 /* ChannelListController.swift */; };
28 12D7D133221C321600B35452 /* ChannelListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D132221C321600B35452 /* ChannelListController.swift */; };
27 12D7D135221C42B700B35452 /* ChannelController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D134221C42B700B35452 /* ChannelController.swift */; };
29 12D7D135221C42B700B35452 /* ChannelController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D134221C42B700B35452 /* ChannelController.swift */; };
28 12D7D137221D78E800B35452 /* Channel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D136221D78E800B35452 /* Channel.swift */; };
30 12D7D137221D78E800B35452 /* Channel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D7D136221D78E800B35452 /* Channel.swift */; };
@@ -50,9 +52,17 @@
50 12E36DCE22144756006FCDD7 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DCD22144756006FCDD7 /* Constants.swift */; };
52 12E36DCE22144756006FCDD7 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DCD22144756006FCDD7 /* Constants.swift */; };
51 12E36DD122148122006FCDD7 /* FullPostController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DD022148122006FCDD7 /* FullPostController.swift */; };
53 12E36DD122148122006FCDD7 /* FullPostController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DD022148122006FCDD7 /* FullPostController.swift */; };
52 12E36DD522156559006FCDD7 /* MyStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DD422156559006FCDD7 /* MyStackView.swift */; };
54 12E36DD522156559006FCDD7 /* MyStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DD422156559006FCDD7 /* MyStackView.swift */; };
53− 12E36DD8221594A9006FCDD7 /* TagListView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DD622159493006FCDD7 /* TagListView.framework */; };
54− 12E36DD9221594A9006FCDD7 /* TagListView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DD622159493006FCDD7 /* TagListView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
55 12E36DDB221594B1006FCDD7 /* MarkdownKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DB022143D47006FCDD7 /* MarkdownKit.framework */; };
55 12E36DDB221594B1006FCDD7 /* MarkdownKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DB022143D47006FCDD7 /* MarkdownKit.framework */; };
56+ 12F3D6B0224106F700A69214 /* TabbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F3D6AF224106F700A69214 /* TabbarController.swift */; };
57+ 12F3D6B22241097B00A69214 /* ProfileCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F3D6B12241097B00A69214 /* ProfileCoordinator.swift */; };
58+ 12F3D6B4224112D600A69214 /* ReactiveMapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B3224112D600A69214 /* ReactiveMapKit.framework */; };
59+ 12F3D6B6224112E100A69214 /* ReactiveSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B5224112E000A69214 /* ReactiveSwift.framework */; };
60+ 12F3D6B8224112E900A69214 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B7224112E800A69214 /* Result.framework */; };
61+ 12F3D6BB224112FD00A69214 /* ReactiveCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B9224112F500A69214 /* ReactiveCocoa.framework */; };
62+ 12F3D6BC224112FD00A69214 /* ReactiveCocoa.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B9224112F500A69214 /* ReactiveCocoa.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
63+ 12F3D6BE2241130000A69214 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B7224112E800A69214 /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
64+ 12F3D6C02241130200A69214 /* ReactiveSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B5224112E000A69214 /* ReactiveSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
65+ 12F3D6C22241130400A69214 /* ReactiveMapKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B3224112D600A69214 /* ReactiveMapKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
56/* End PBXBuildFile section */
66/* End PBXBuildFile section */
57
67
58/* Begin PBXCopyFilesBuildPhase section */
68/* Begin PBXCopyFilesBuildPhase section */
@@ -63,10 +73,13 @@
63 dstSubfolderSpec = 10;
73 dstSubfolderSpec = 10;
64 files = (
74 files = (
65 12E36DC0221441DB006FCDD7 /* Marklight.framework in Embed Frameworks */,
75 12E36DC0221441DB006FCDD7 /* Marklight.framework in Embed Frameworks */,
76+ 12F3D6C22241130400A69214 /* ReactiveMapKit.framework in Embed Frameworks */,
66 124CC7072221C2C3009DF531 /* Alamofire.framework in Embed Frameworks */,
77 124CC7072221C2C3009DF531 /* Alamofire.framework in Embed Frameworks */,
67 12E36DC4221441EA006FCDD7 /* Cartography.framework in Embed Frameworks */,
78 12E36DC4221441EA006FCDD7 /* Cartography.framework in Embed Frameworks */,
68− 12E36DD9221594A9006FCDD7 /* TagListView.framework in Embed Frameworks */,
79+ 12F3D6BE2241130000A69214 /* Result.framework in Embed Frameworks */,
69 12E36DBD221441D5006FCDD7 /* TinyConstraints.framework in Embed Frameworks */,
80 12E36DBD221441D5006FCDD7 /* TinyConstraints.framework in Embed Frameworks */,
81+ 12F3D6C02241130200A69214 /* ReactiveSwift.framework in Embed Frameworks */,
82+ 12F3D6BC224112FD00A69214 /* ReactiveCocoa.framework in Embed Frameworks */,
70 123AD0E5223C1C4300326173 /* WSTagsField.framework in Embed Frameworks */,
83 123AD0E5223C1C4300326173 /* WSTagsField.framework in Embed Frameworks */,
71 12E36DC2221441E1006FCDD7 /* MarkdownKit.framework in Embed Frameworks */,
84 12E36DC2221441E1006FCDD7 /* MarkdownKit.framework in Embed Frameworks */,
72 );
85 );
@@ -82,14 +95,16 @@
82 123E37A6221F1DD700F6E42A /* MainController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainController.swift; sourceTree = "<group>"; };
95 123E37A6221F1DD700F6E42A /* MainController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainController.swift; sourceTree = "<group>"; };
83 124CC7022221C00C009DF531 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = "<group>"; };
96 124CC7022221C00C009DF531 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = "<group>"; };
84 124CC7042221C2BA009DF531 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
97 124CC7042221C2BA009DF531 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
85− 1253867C2223DC9F00CC5EA7 /* RepeatingTimer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RepeatingTimer.swift; sourceTree = "<group>"; };
86 125BD57C22171D2A008A3575 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; };
98 125BD57C22171D2A008A3575 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; };
87 125BD57E22171D73008A3575 /* Extentions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extentions.swift; sourceTree = "<group>"; };
99 125BD57E22171D73008A3575 /* Extentions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extentions.swift; sourceTree = "<group>"; };
88 125BD5802217314A008A3575 /* NewsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsVC.swift; sourceTree = "<group>"; };
100 125BD5802217314A008A3575 /* NewsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsVC.swift; sourceTree = "<group>"; };
89 1288B5CD221F1158002BE6B1 /* DataStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataStorage.swift; sourceTree = "<group>"; };
101 1288B5CD221F1158002BE6B1 /* DataStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataStorage.swift; sourceTree = "<group>"; };
90 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelsCoordinator.swift; sourceTree = "<group>"; };
102 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelsCoordinator.swift; sourceTree = "<group>"; };
91 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabbarCoordinator.swift; sourceTree = "<group>"; };
103 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabbarCoordinator.swift; sourceTree = "<group>"; };
104+ 1291BE3522218DBF009D3F23 /* LogInCoordinator1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogInCoordinator1.swift; sourceTree = "<group>"; };
105+ 12BA4B9A224101A400DF93D7 /* ApplicationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationCoordinator.swift; sourceTree = "<group>"; };
106+ 12BA4B9C224101E700DF93D7 /* BaseCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCoordinator.swift; sourceTree = "<group>"; };
92− 1291BE3522218DBF009D3F23 /* LogInCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogInCoordinator.swift; sourceTree = "<group>"; };
107+ 12BA4B9E224102B700DF93D7 /* LogInCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogInCoordinator.swift; sourceTree = "<group>"; };
93 12D7D132221C321600B35452 /* ChannelListController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelListController.swift; sourceTree = "<group>"; };
108 12D7D132221C321600B35452 /* ChannelListController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelListController.swift; sourceTree = "<group>"; };
94 12D7D134221C42B700B35452 /* ChannelController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelController.swift; sourceTree = "<group>"; };
109 12D7D134221C42B700B35452 /* ChannelController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelController.swift; sourceTree = "<group>"; };
95 12D7D136221D78E800B35452 /* Channel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Channel.swift; sourceTree = "<group>"; };
110 12D7D136221D78E800B35452 /* Channel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Channel.swift; sourceTree = "<group>"; };
@@ -116,7 +131,12 @@
116 12E36DCD22144756006FCDD7 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
131 12E36DCD22144756006FCDD7 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
117 12E36DD022148122006FCDD7 /* FullPostController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullPostController.swift; sourceTree = "<group>"; };
132 12E36DD022148122006FCDD7 /* FullPostController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FullPostController.swift; sourceTree = "<group>"; };
118 12E36DD422156559006FCDD7 /* MyStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyStackView.swift; sourceTree = "<group>"; };
133 12E36DD422156559006FCDD7 /* MyStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyStackView.swift; sourceTree = "<group>"; };
134+ 12F3D6AF224106F700A69214 /* TabbarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabbarController.swift; sourceTree = "<group>"; };
135+ 12F3D6B12241097B00A69214 /* ProfileCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileCoordinator.swift; sourceTree = "<group>"; };
136+ 12F3D6B3224112D600A69214 /* ReactiveMapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveMapKit.framework; path = Carthage/Build/iOS/ReactiveMapKit.framework; sourceTree = "<group>"; };
119− 12E36DD622159493006FCDD7 /* TagListView.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TagListView.framework; path = Carthage/Build/iOS/TagListView.framework; sourceTree = "<group>"; };
137+ 12F3D6B5224112E000A69214 /* ReactiveSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveSwift.framework; path = Carthage/Build/iOS/ReactiveSwift.framework; sourceTree = "<group>"; };
138+ 12F3D6B7224112E800A69214 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Result.framework; path = Carthage/Build/iOS/Result.framework; sourceTree = "<group>"; };
139+ 12F3D6B9224112F500A69214 /* ReactiveCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveCocoa.framework; path = Carthage/Build/iOS/ReactiveCocoa.framework; sourceTree = "<group>"; };
120/* End PBXFileReference section */
140/* End PBXFileReference section */
121
141
122/* Begin PBXFrameworksBuildPhase section */
142/* Begin PBXFrameworksBuildPhase section */
@@ -125,9 +145,12 @@
125 buildActionMask = 2147483647;
145 buildActionMask = 2147483647;
126 files = (
146 files = (
127 12E36DB522143D54006FCDD7 /* TinyConstraints.framework in Frameworks */,
147 12E36DB522143D54006FCDD7 /* TinyConstraints.framework in Frameworks */,
148+ 12F3D6B4224112D600A69214 /* ReactiveMapKit.framework in Frameworks */,
128 124CC7052221C2BB009DF531 /* Alamofire.framework in Frameworks */,
149 124CC7052221C2BB009DF531 /* Alamofire.framework in Frameworks */,
150+ 12F3D6BB224112FD00A69214 /* ReactiveCocoa.framework in Frameworks */,
151+ 12F3D6B8224112E900A69214 /* Result.framework in Frameworks */,
152+ 12F3D6B6224112E100A69214 /* ReactiveSwift.framework in Frameworks */,
129 12E36DDB221594B1006FCDD7 /* MarkdownKit.framework in Frameworks */,
153 12E36DDB221594B1006FCDD7 /* MarkdownKit.framework in Frameworks */,
130− 12E36DD8221594A9006FCDD7 /* TagListView.framework in Frameworks */,
131 12E36DAF22143D40006FCDD7 /* Cartography.framework in Frameworks */,
154 12E36DAF22143D40006FCDD7 /* Cartography.framework in Frameworks */,
132 123AD0E3223C1C3900326173 /* WSTagsField.framework in Frameworks */,
155 123AD0E3223C1C3900326173 /* WSTagsField.framework in Frameworks */,
133 12E36DB322143D4E006FCDD7 /* Marklight.framework in Frameworks */,
156 12E36DB322143D4E006FCDD7 /* Marklight.framework in Frameworks */,
@@ -150,19 +173,25 @@
150 path = Profile;
173 path = Profile;
151 sourceTree = "<group>";
174 sourceTree = "<group>";
152 };
175 };
153− 1291BE32222154C3009D3F23 /* Coordinator tab bar? */ = {
176+ 1291BE32222154C3009D3F23 /* Coordinators */ = {
154 isa = PBXGroup;
177 isa = PBXGroup;
155 children = (
178 children = (
179+ 12BA4B9A224101A400DF93D7 /* ApplicationCoordinator.swift */,
180+ 12F3D6AF224106F700A69214 /* TabbarController.swift */,
181+ 12F3D6B12241097B00A69214 /* ProfileCoordinator.swift */,
182+ 12BA4B9E224102B700DF93D7 /* LogInCoordinator.swift */,
183+ 12BA4B9C224101E700DF93D7 /* BaseCoordinator.swift */,
184+ 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */,
156 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */,
185 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */,
157 );
186 );
158− path = "Coordinator tab bar?";
187+ path = Coordinators;
159 sourceTree = "<group>";
188 sourceTree = "<group>";
160 };
189 };
161 1291BE3722218DC4009D3F23 /* Log In */ = {
190 1291BE3722218DC4009D3F23 /* Log In */ = {
162 isa = PBXGroup;
191 isa = PBXGroup;
163 children = (
192 children = (
164 123E37A4221F1B3200F6E42A /* LogInViewController.swift */,
193 123E37A4221F1B3200F6E42A /* LogInViewController.swift */,
165− 1291BE3522218DBF009D3F23 /* LogInCoordinator.swift */,
194+ 1291BE3522218DBF009D3F23 /* LogInCoordinator1.swift */,
166 );
195 );
167 path = "Log In";
196 path = "Log In";
168 sourceTree = "<group>";
197 sourceTree = "<group>";
@@ -170,9 +199,12 @@
170 12E36D8F221424EA006FCDD7 = {
199 12E36D8F221424EA006FCDD7 = {
171 isa = PBXGroup;
200 isa = PBXGroup;
172 children = (
201 children = (
202+ 12F3D6B9224112F500A69214 /* ReactiveCocoa.framework */,
203+ 12F3D6B7224112E800A69214 /* Result.framework */,
204+ 12F3D6B5224112E000A69214 /* ReactiveSwift.framework */,
205+ 12F3D6B3224112D600A69214 /* ReactiveMapKit.framework */,
173 123AD0E2223C1C3900326173 /* WSTagsField.framework */,
206 123AD0E2223C1C3900326173 /* WSTagsField.framework */,
174 124CC7042221C2BA009DF531 /* Alamofire.framework */,
207 124CC7042221C2BA009DF531 /* Alamofire.framework */,
175− 12E36DD622159493006FCDD7 /* TagListView.framework */,
176 12E36DB422143D54006FCDD7 /* TinyConstraints.framework */,
208 12E36DB422143D54006FCDD7 /* TinyConstraints.framework */,
177 12E36DB222143D4E006FCDD7 /* Marklight.framework */,
209 12E36DB222143D4E006FCDD7 /* Marklight.framework */,
178 12E36DB022143D47006FCDD7 /* MarkdownKit.framework */,
210 12E36DB022143D47006FCDD7 /* MarkdownKit.framework */,
@@ -232,8 +264,7 @@
232 12E36DCF22145923006FCDD7 /* Controller */ = {
264 12E36DCF22145923006FCDD7 /* Controller */ = {
233 isa = PBXGroup;
265 isa = PBXGroup;
234 children = (
266 children = (
235− 1253867C2223DC9F00CC5EA7 /* RepeatingTimer.swift */,
236− 1291BE32222154C3009D3F23 /* Coordinator tab bar? */,
267+ 1291BE32222154C3009D3F23 /* Coordinators */,
237 1291BE3722218DC4009D3F23 /* Log In */,
268 1291BE3722218DC4009D3F23 /* Log In */,
238 1288B5CC221F0EFE002BE6B1 /* Profile */,
269 1288B5CC221F0EFE002BE6B1 /* Profile */,
239 12E36DD322156519006FCDD7 /* News and channels */,
270 12E36DD322156519006FCDD7 /* News and channels */,
@@ -250,7 +281,6 @@
250 12E36DC922144635006FCDD7 /* NewPostViewController.swift */,
281 12E36DC922144635006FCDD7 /* NewPostViewController.swift */,
251 12E36DD022148122006FCDD7 /* FullPostController.swift */,
282 12E36DD022148122006FCDD7 /* FullPostController.swift */,
252 12E36D9D221424EA006FCDD7 /* NewsController.swift */,
283 12E36D9D221424EA006FCDD7 /* NewsController.swift */,
253− 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */,
254 125BD5802217314A008A3575 /* NewsVC.swift */,
284 125BD5802217314A008A3575 /* NewsVC.swift */,
255 12E36DCB22144725006FCDD7 /* PostViewCell.swift */,
285 12E36DCB22144725006FCDD7 /* PostViewCell.swift */,
256 );
286 );
@@ -297,6 +327,11 @@
297 TargetAttributes = {
327 TargetAttributes = {
298 12E36D97221424EA006FCDD7 = {
328 12E36D97221424EA006FCDD7 = {
299 CreatedOnToolsVersion = 10.1;
329 CreatedOnToolsVersion = 10.1;
330+ SystemCapabilities = {
331+ com.apple.Keychain = {
332+ enabled = 0;
333+ };
334+ };
300 };
335 };
301 };
336 };
302 };
337 };
@@ -337,9 +372,10 @@
337 buildActionMask = 2147483647;
372 buildActionMask = 2147483647;
338 files = (
373 files = (
339 124CC7032221C00C009DF531 /* Model.swift in Sources */,
374 124CC7032221C00C009DF531 /* Model.swift in Sources */,
375+ 12F3D6B0224106F700A69214 /* TabbarController.swift in Sources */,
340 12E36DD522156559006FCDD7 /* MyStackView.swift in Sources */,
376 12E36DD522156559006FCDD7 /* MyStackView.swift in Sources */,
341 12D7D137221D78E800B35452 /* Channel.swift in Sources */,
377 12D7D137221D78E800B35452 /* Channel.swift in Sources */,
342− 1291BE3622218DBF009D3F23 /* LogInCoordinator.swift in Sources */,
378+ 1291BE3622218DBF009D3F23 /* LogInCoordinator1.swift in Sources */,
343 12E36DB922144016006FCDD7 /* User.swift in Sources */,
379 12E36DB922144016006FCDD7 /* User.swift in Sources */,
344 1210A0BB223940310080686D /* SimplifiedChannelsList.swift in Sources */,
380 1210A0BB223940310080686D /* SimplifiedChannelsList.swift in Sources */,
345 125BD5812217314A008A3575 /* NewsVC.swift in Sources */,
381 125BD5812217314A008A3575 /* NewsVC.swift in Sources */,
@@ -352,15 +388,18 @@
352 125BD57F22171D73008A3575 /* Extentions.swift in Sources */,
388 125BD57F22171D73008A3575 /* Extentions.swift in Sources */,
353 12D7D133221C321600B35452 /* ChannelListController.swift in Sources */,
389 12D7D133221C321600B35452 /* ChannelListController.swift in Sources */,
354 1291BE342221569B009D3F23 /* TabbarCoordinator.swift in Sources */,
390 1291BE342221569B009D3F23 /* TabbarCoordinator.swift in Sources */,
391+ 12BA4B9B224101A400DF93D7 /* ApplicationCoordinator.swift in Sources */,
355 1291BE2D2221312D009D3F23 /* ChannelsCoordinator.swift in Sources */,
392 1291BE2D2221312D009D3F23 /* ChannelsCoordinator.swift in Sources */,
356 12E36DD122148122006FCDD7 /* FullPostController.swift in Sources */,
393 12E36DD122148122006FCDD7 /* FullPostController.swift in Sources */,
357 1288B5CE221F1158002BE6B1 /* DataStorage.swift in Sources */,
394 1288B5CE221F1158002BE6B1 /* DataStorage.swift in Sources */,
395+ 12BA4B9F224102B700DF93D7 /* LogInCoordinator.swift in Sources */,
396+ 12F3D6B22241097B00A69214 /* ProfileCoordinator.swift in Sources */,
358 125BD57D22171D2A008A3575 /* ProfileViewController.swift in Sources */,
397 125BD57D22171D2A008A3575 /* ProfileViewController.swift in Sources */,
359− 1253867D2223DC9F00CC5EA7 /* RepeatingTimer.swift in Sources */,
360 12DB7FDB2218590C0096878E /* InfoCell.swift in Sources */,
398 12DB7FDB2218590C0096878E /* InfoCell.swift in Sources */,
361 12DB7FD922181E660096878E /* BasicInfoCell.swift in Sources */,
399 12DB7FD922181E660096878E /* BasicInfoCell.swift in Sources */,
362 12D7D135221C42B700B35452 /* ChannelController.swift in Sources */,
400 12D7D135221C42B700B35452 /* ChannelController.swift in Sources */,
363 12E36D9C221424EA006FCDD7 /* AppDelegate.swift in Sources */,
401 12E36D9C221424EA006FCDD7 /* AppDelegate.swift in Sources */,
402+ 12BA4B9D224101E700DF93D7 /* BaseCoordinator.swift in Sources */,
364 12DB7FD722181CD20096878E /* BasicInfoController.swift in Sources */,
403 12DB7FD722181CD20096878E /* BasicInfoController.swift in Sources */,
365 12E36DCE22144756006FCDD7 /* Constants.swift in Sources */,
404 12E36DCE22144756006FCDD7 /* Constants.swift in Sources */,
366 12DB7FDD221872F80096878E /* SettingsViewController.swift in Sources */,
405 12DB7FDD221872F80096878E /* SettingsViewController.swift in Sources */,
@@ -510,6 +549,7 @@
510 isa = XCBuildConfiguration;
549 isa = XCBuildConfiguration;
511 buildSettings = {
550 buildSettings = {
512 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
551 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
552+ CODE_SIGN_IDENTITY = "iPhone Developer";
513 CODE_SIGN_STYLE = Automatic;
553 CODE_SIGN_STYLE = Automatic;
514 DEVELOPMENT_TEAM = 9Z6LFGKA9G;
554 DEVELOPMENT_TEAM = 9Z6LFGKA9G;
515 FRAMEWORK_SEARCH_PATHS = (
555 FRAMEWORK_SEARCH_PATHS = (
@@ -521,8 +561,9 @@
521 "$(inherited)",
561 "$(inherited)",
522 "@executable_path/Frameworks",
562 "@executable_path/Frameworks",
523 );
563 );
524− PRODUCT_BUNDLE_IDENTIFIER = rednikina.com.drHSE.GDproject;
564+ PRODUCT_BUNDLE_IDENTIFIER = rednikina.com.drHSE.GDproject.sos;
525 PRODUCT_NAME = "$(TARGET_NAME)";
565 PRODUCT_NAME = "$(TARGET_NAME)";
566+ PROVISIONING_PROFILE_SPECIFIER = "";
526 SWIFT_VERSION = 4.2;
567 SWIFT_VERSION = 4.2;
527 TARGETED_DEVICE_FAMILY = "1,2";
568 TARGETED_DEVICE_FAMILY = "1,2";
528 };
569 };
@@ -532,6 +573,7 @@
532 isa = XCBuildConfiguration;
573 isa = XCBuildConfiguration;
533 buildSettings = {
574 buildSettings = {
534 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
575 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
576+ CODE_SIGN_IDENTITY = "iPhone Developer";
535 CODE_SIGN_STYLE = Automatic;
577 CODE_SIGN_STYLE = Automatic;
536 DEVELOPMENT_TEAM = 9Z6LFGKA9G;
578 DEVELOPMENT_TEAM = 9Z6LFGKA9G;
537 FRAMEWORK_SEARCH_PATHS = (
579 FRAMEWORK_SEARCH_PATHS = (
@@ -543,8 +585,9 @@
543 "$(inherited)",
585 "$(inherited)",
544 "@executable_path/Frameworks",
586 "@executable_path/Frameworks",
545 );
587 );
546− PRODUCT_BUNDLE_IDENTIFIER = rednikina.com.drHSE.GDproject;
588+ PRODUCT_BUNDLE_IDENTIFIER = rednikina.com.drHSE.GDproject.sos;
547 PRODUCT_NAME = "$(TARGET_NAME)";
589 PRODUCT_NAME = "$(TARGET_NAME)";
590+ PROVISIONING_PROFILE_SPECIFIER = "";
548 SWIFT_VERSION = 4.2;
591 SWIFT_VERSION = 4.2;
549 TARGETED_DEVICE_FAMILY = "1,2";
592 TARGETED_DEVICE_FAMILY = "1,2";
550 };
593 };
GDproject/Base.lproj/Main.storyboard+4−72
@@ -1,5 +1,5 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="609-2j-gc9">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3 <device id="retina4_7" orientation="portrait">
3 <device id="retina4_7" orientation="portrait">
4 <adaptation id="fullscreen"/>
4 <adaptation id="fullscreen"/>
5 </device>
5 </device>
@@ -20,7 +20,7 @@
20 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
20 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
21 <subviews>
21 <subviews>
22 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cay-ea-rTl">
22 <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cay-ea-rTl">
23− <rect key="frame" x="0.0" y="116" width="375" height="502"/>
23+ <rect key="frame" x="0.0" y="20" width="375" height="647"/>
24 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
24 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
25 <view key="tableHeaderView" contentMode="scaleToFill" id="kFZ-3c-OFY">
25 <view key="tableHeaderView" contentMode="scaleToFill" id="kFZ-3c-OFY">
26 <rect key="frame" x="0.0" y="0.0" width="375" height="199"/>
26 <rect key="frame" x="0.0" y="0.0" width="375" height="199"/>
@@ -416,55 +416,6 @@
416 </objects>
416 </objects>
417 <point key="canvasLocation" x="3444" y="129.98500749625188"/>
417 <point key="canvasLocation" x="3444" y="129.98500749625188"/>
418 </scene>
418 </scene>
419− <!--Log In View Controller-->
420− <scene sceneID="Pkd-pB-bQs">
421− <objects>
422− <viewController storyboardIdentifier="LogInController" id="ZCz-70-hDh" customClass="LogInViewController" customModule="GDproject" customModuleProvider="target" sceneMemberID="viewController">
423− <view key="view" contentMode="scaleToFill" id="1q2-4g-KZs">
424− <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
425− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
426− <subviews>
427− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="UwC-m5-jA5">
428− <rect key="frame" x="16" y="100" width="343" height="83"/>
429− <subviews>
430− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Log In" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="efn-ze-jca">
431− <rect key="frame" x="0.0" y="0.0" width="343" height="41"/>
432− <fontDescription key="fontDescription" type="boldSystem" pointSize="34"/>
433− <nil key="textColor"/>
434− <nil key="highlightedColor"/>
435− </label>
436− <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Mail" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="mFP-WG-jY5">
437− <rect key="frame" x="0.0" y="53" width="343" height="30"/>
438− <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
439− <nil key="textColor"/>
440− <fontDescription key="fontDescription" type="system" pointSize="14"/>
441− <textInputTraits key="textInputTraits"/>
442− </textField>
443− </subviews>
444− </stackView>
445− <activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="K3b-gv-JPp">
446− <rect key="frame" x="177.5" y="333.5" width="20" height="20"/>
447− </activityIndicatorView>
448− </subviews>
449− <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
450− <constraints>
451− <constraint firstItem="UwC-m5-jA5" firstAttribute="leading" secondItem="LOR-Yw-0FU" secondAttribute="leading" constant="16" id="M6z-nU-H40"/>
452− <constraint firstItem="K3b-gv-JPp" firstAttribute="centerY" secondItem="LOR-Yw-0FU" secondAttribute="centerY" id="eOp-yQ-n28"/>
453− <constraint firstItem="K3b-gv-JPp" firstAttribute="centerX" secondItem="LOR-Yw-0FU" secondAttribute="centerX" id="gdW-VU-pE8"/>
454− <constraint firstItem="LOR-Yw-0FU" firstAttribute="trailing" secondItem="UwC-m5-jA5" secondAttribute="trailing" constant="16" id="jST-rr-MMX"/>
455− <constraint firstItem="UwC-m5-jA5" firstAttribute="top" secondItem="LOR-Yw-0FU" secondAttribute="top" constant="80" id="rvy-Ii-bwS"/>
456− </constraints>
457− <viewLayoutGuide key="safeArea" id="LOR-Yw-0FU"/>
458− </view>
459− <connections>
460− <outlet property="indicatorView" destination="K3b-gv-JPp" id="mSR-QU-VZQ"/>
461− <outlet property="mailTextField" destination="mFP-WG-jY5" id="7SN-qe-DDm"/>
462− </connections>
463− </viewController>
464− <placeholder placeholderIdentifier="IBFirstResponder" id="6e8-oo-bbc" userLabel="First Responder" sceneMemberID="firstResponder"/>
465− </objects>
466− <point key="canvasLocation" x="-466" y="-821"/>
467− </scene>
468 <!--Posts-->
419 <!--Posts-->
469 <scene sceneID="RSd-UJ-34B">
420 <scene sceneID="RSd-UJ-34B">
470 <objects>
421 <objects>
@@ -476,9 +427,6 @@
476 <autoresizingMask key="autoresizingMask"/>
427 <autoresizingMask key="autoresizingMask"/>
477 </navigationBar>
428 </navigationBar>
478 <nil name="viewControllers"/>
429 <nil name="viewControllers"/>
479− <connections>
480− <segue destination="Nqc-TI-ueQ" kind="relationship" relationship="rootViewController" id="2BZ-i4-uIE"/>
481− </connections>
482 </navigationController>
430 </navigationController>
483 <placeholder placeholderIdentifier="IBFirstResponder" id="POV-5T-jeQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
431 <placeholder placeholderIdentifier="IBFirstResponder" id="POV-5T-jeQ" userLabel="First Responder" sceneMemberID="firstResponder"/>
484 </objects>
432 </objects>
@@ -515,31 +463,15 @@
515 <autoresizingMask key="autoresizingMask"/>
463 <autoresizingMask key="autoresizingMask"/>
516 </navigationBar>
464 </navigationBar>
517 <nil name="viewControllers"/>
465 <nil name="viewControllers"/>
518− <connections>
519− <segue destination="R4D-Ao-uvG" kind="relationship" relationship="rootViewController" id="aF6-zK-hCB"/>
520− </connections>
521 </navigationController>
466 </navigationController>
522 <placeholder placeholderIdentifier="IBFirstResponder" id="Fvm-qf-2Ve" userLabel="First Responder" sceneMemberID="firstResponder"/>
467 <placeholder placeholderIdentifier="IBFirstResponder" id="Fvm-qf-2Ve" userLabel="First Responder" sceneMemberID="firstResponder"/>
523 </objects>
468 </objects>
524 <point key="canvasLocation" x="1089" y="958"/>
469 <point key="canvasLocation" x="1089" y="958"/>
525 </scene>
470 </scene>
526− <!--Navigation Controller-->
527− <scene sceneID="r0M-xH-UwU">
528− <objects>
529− <navigationController storyboardIdentifier="root" id="609-2j-gc9" sceneMemberID="viewController">
530− <navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="Ah8-NU-AsD">
531− <rect key="frame" x="0.0" y="20" width="375" height="44"/>
532− <autoresizingMask key="autoresizingMask"/>
533− </navigationBar>
534− </navigationController>
535− <placeholder placeholderIdentifier="IBFirstResponder" id="Raj-78-jlT" userLabel="First Responder" sceneMemberID="firstResponder"/>
536− </objects>
537− <point key="canvasLocation" x="-2242" y="68"/>
538− </scene>
539− <!--Tab Bar Controller-->
471+ <!--Tabbar Controller-->
540 <scene sceneID="HCR-WO-p7g">
472 <scene sceneID="HCR-WO-p7g">
541 <objects>
473 <objects>
542− <tabBarController storyboardIdentifier="TabBar" automaticallyAdjustsScrollViewInsets="NO" id="IeP-4W-8LT" sceneMemberID="viewController">
474+ <tabBarController storyboardIdentifier="TabbarController" automaticallyAdjustsScrollViewInsets="NO" id="IeP-4W-8LT" customClass="TabbarController" customModule="GDproject" customModuleProvider="target" sceneMemberID="viewController">
543 <toolbarItems/>
475 <toolbarItems/>
544 <tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="3pl-mU-U30">
476 <tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="3pl-mU-U30">
545 <rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
477 <rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
GDproject/Constants.swift+4
@@ -6,6 +6,7 @@
6// Copyright © 2019 drHSE. All rights reserved.
6// Copyright © 2019 drHSE. All rights reserved.
7//
7//
8
8
9+import UIKit
9/// constant for cell in posts NewsController.swift
10/// constant for cell in posts NewsController.swift
10let postCellId = "PostCell"
11let postCellId = "PostCell"
11
12
@@ -46,3 +47,6 @@ let logInController = "LogInController"
46let profileViewController = "ProfileViewController"
47let profileViewController = "ProfileViewController"
47
48
48let simplifiedChannelsList = "SimplifiedChannelsList"
49let simplifiedChannelsList = "SimplifiedChannelsList"
50+
51+let blueSystemColor = UIColor(red: 0, green: 137/255, blue: 249/255, alpha: 0.5)
52+
GDproject/Controller/ News and channels/ChannelsCoordinator.swiftdeleted−55
@@ -1,55 +0,0 @@
1−//
2−// ChannelsCoordinator.swift
3−// GDproject
4−//
5−// Created by cstore on 23/02/2019.
6−// Copyright © 2019 drHSE. All rights reserved.
7−//
8−
9−import Foundation
10−import UIKit
11−
12−final class ChannelsCoordinator{
13−
14− // MARK: - Properties
15− private var channel: Model.Channels { didSet { updateInterfaces() } }
16− private weak var navigationController: UINavigationController?
17−
18− // MARK:- Init
19− init(currentChannel: Model.Channels, navigationController: UINavigationController) {
20− self.channel = currentChannel
21− self.navigationController = navigationController
22− }
23−
24− func start(){
25− showCurrentChannel()
26− }
27−
28− // MARK: - Private implementation
29− private func showListOfChannels(){
30− let controller = UIStoryboard.makeChannelsListController()
31− controller.onChannelSelected = { [weak self] channel
32− in
33− self?.channel = channel
34− _ = self?.navigationController?.popViewController(animated: true)
35− }
36− navigationController?.pushViewController(controller, animated: true)
37− }
38−
39− private func showCurrentChannel(){
40− let controller = UIStoryboard.makeNewsController()
41− controller.channel = channel
42− controller.onSelectChannel = { [weak self] in
43− self?.showListOfChannels()
44− }
45− navigationController?.setViewControllers([controller], animated: false)
46− //navigationController?.pushViewController(controller, animated: false)
47− }
48−
49− // MARK:- update only viewControllers which are depandable on chosen channel
50− private func updateInterfaces() {
51− navigationController?.viewControllers.forEach {
52− ($0 as? UpdateableWithChannel)?.channel = channel
53− }
54− }
55−}
GDproject/Controller/Coordinators/ApplicationCoordinator.swiftnew file+69
@@ -0,0 +1,69 @@
1+//
2+// ApplicationCoordinator.swift
3+// RxSwift
4+//
5+// Created by cstore on 04/03/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import Foundation
10+import UIKit
11+
12+
13+
14+fileprivate enum LaunchInstructor {
15+ case main, auth
16+
17+ static func configure(
18+ isAutorized: Bool = DataStorage.standard.isLoggedIn) -> LaunchInstructor {
19+
20+ if isAutorized{
21+ return .main
22+ } else {
23+ return .auth
24+ }
25+ }
26+}
27+
28+final class ApplicationCoordinator: BaseCoordinator{
29+ private var window: UIWindow!
30+
31+ init(window: UIWindow) {
32+ self.window = window
33+ }
34+
35+ private var instructor: LaunchInstructor {
36+ return LaunchInstructor.configure()
37+ }
38+
39+ override func start() {
40+ switch instructor {
41+ case .auth: runAuthFlow()
42+ case .main: runMainFlow()
43+ }
44+ }
45+
46+ private func runAuthFlow() {
47+ let coordinator = LogInCoordinator(window: window)
48+ coordinator.didEndFlow = { [weak self, weak coordinator] in
49+ self?.start()
50+ self?.removeDependency(coordinator)
51+ }
52+ addDependency(coordinator)
53+ coordinator.start()
54+ }
55+
56+ private func runMainFlow() {
57+ let storyboard = UIStoryboard(name: "Main", bundle: nil)
58+ let tabBar = storyboard.instantiateViewController(withIdentifier: "TabbarController") as! TabbarController
59+ let coordinator = TabBarCoordinator(tabbarView: tabBar, window: window!)
60+
61+ coordinator.didEndFlow = { [weak self, weak coordinator] in
62+ self?.start()
63+ self?.removeDependency(coordinator)
64+ }
65+
66+ addDependency(coordinator)
67+ coordinator.start()
68+ }
69+}
GDproject/Controller/Coordinators/BaseCoordinator.swiftnew file+47
@@ -0,0 +1,47 @@
1+//
2+// BaseCoordinator.swift
3+// RxSwift
4+//
5+// Created by cstore on 02/03/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import Foundation
10+import UIKit
11+
12+protocol Coordinator: class {
13+ func start()
14+}
15+
16+class BaseCoordinator: Coordinator {
17+
18+ var childCoordinators: [Coordinator] = []
19+
20+ func start() {
21+
22+ }
23+
24+ // add only unique object
25+ func addDependency(_ coordinator: Coordinator) {
26+ guard !childCoordinators.contains(where: { $0 === coordinator }) else { return }
27+ childCoordinators.append(coordinator)
28+ }
29+
30+ func removeDependency(_ coordinator: Coordinator?) {
31+ guard
32+ childCoordinators.isEmpty == false,
33+ let coordinator = coordinator
34+ else { return }
35+
36+ // Clear child-coordinators recursively
37+ if let coordinator = coordinator as? BaseCoordinator, !coordinator.childCoordinators.isEmpty {
38+ coordinator.childCoordinators
39+ .filter({ $0 !== coordinator })
40+ .forEach({ coordinator.removeDependency($0) })
41+ }
42+ for (index, element) in childCoordinators.enumerated() where element === coordinator {
43+ childCoordinators.remove(at: index)
44+ break
45+ }
46+ }
47+}
GDproject/Controller/Coordinators/ChannelsCoordinator.swiftnew file+28
@@ -0,0 +1,28 @@
1+//
2+// ChannelsCoordinator.swift
3+// RxSwift
4+//
5+// Created by cstore on 03/03/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import Foundation
10+import UIKit
11+
12+class ChannelsCoordinator: BaseCoordinator{
13+ private weak var navigationController: UINavigationController?
14+
15+ init(nc: UINavigationController) {
16+ self.navigationController = nc
17+ }
18+
19+ override func start() {
20+ show()
21+ }
22+
23+ private func show() {
24+ let storyboard = UIStoryboard(name: "Main", bundle: nil)
25+ let channels = storyboard.instantiateViewController(withIdentifier: channelListControllerId) as! ChannelListController
26+ navigationController?.setViewControllers([channels], animated: false)
27+ }
28+}
GDproject/Controller/Coordinators/LogInCoordinator.swiftnew file+41
@@ -0,0 +1,41 @@
1+//
2+// LogInCoordinator.swift
3+// RxSwift
4+//
5+// Created by cstore on 01/03/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class LogInCoordinator: BaseCoordinator {
12+
13+ var didEndFlow: (()->())?
14+ var window: UIWindow!
15+ var navigationController: UINavigationController?
16+
17+ init(window: UIWindow) {
18+ self.window = window
19+ self.window?.rootViewController = UINavigationController()
20+ self.navigationController = window.rootViewController as? UINavigationController
21+ }
22+
23+ override func start(){
24+ let logInVC = LogInViewController()
25+ logInVC.authenticate = { [weak self] (id) in
26+
27+ Model.authenticate(with: id) {
28+ (res) in
29+
30+ if (res) {
31+ DataStorage.standard.setUserKey(with: id)
32+ self?.didEndFlow?()
33+ }
34+ else {
35+ DataStorage.standard.setUserKey(with: 0)
36+ }
37+ }
38+ }
39+ navigationController?.pushViewController(logInVC, animated: false)
40+ }
41+}
GDproject/Controller/Coordinators/ProfileCoordinator.swiftnew file+52
@@ -0,0 +1,52 @@
1+//
2+// ProfileCoordinator.swift
3+// RxSwift
4+//
5+// Created by cstore on 02/03/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import Foundation
10+import UIKit
11+
12+class ProfileCoordinator: BaseCoordinator {
13+
14+ var didEndSession: (()->())?
15+
16+ private weak var navigationController: UINavigationController?
17+
18+ init(nc: UINavigationController) {
19+ self.navigationController = nc
20+ }
21+
22+ override func start() {
23+ show()
24+ }
25+
26+ private func show() {
27+ let storyboard = UIStoryboard(name: "Main", bundle: nil)
28+ let profile = storyboard.instantiateViewController(withIdentifier: "ProfileViewController") as! ProfileViewController
29+ profile.logOut = { [weak self] in
30+ DataStorage.standard.setIsLoggedIn(value: false, with: 0)
31+ self?.didEndSession?()
32+ }
33+ profile.onSettings = { [weak self, weak storyboard] in
34+ let vc = storyboard?.instantiateViewController(withIdentifier: "SettingsViewController") as! SettingsViewController
35+ self?.navigationController?.pushViewController(vc, animated: true)
36+ }
37+
38+ profile.onChannelsListToAddAPerson = { [weak self, weak storyboard] (user) in
39+ let vc = storyboard?.instantiateViewController(withIdentifier: simplifiedChannelsList) as! SimplifiedChannelsList
40+ vc.user = user
41+
42+ let transition = CATransition()
43+ transition.duration = 0.5
44+ transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
45+ transition.type = CATransitionType.moveIn
46+ transition.subtype = CATransitionSubtype.fromTop
47+ self?.navigationController?.view.layer.add(transition, forKey: nil)
48+ self?.navigationController?.pushViewController(vc, animated: false)
49+ }
50+ navigationController?.setViewControllers([profile], animated: false)
51+ }
52+}
GDproject/Controller/Coordinators/TabbarController.swiftnew file+45
@@ -0,0 +1,45 @@
1+//
2+// TabbarController.swift
3+// RxSwift
4+//
5+// Created by cstore on 03/03/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import Foundation
10+import UIKit
11+
12+protocol TabbarView: class {
13+ var onChannelsFlowSelect: ((UINavigationController) -> ())? { get set }
14+ var onProfileFlowSelect: ((UINavigationController) -> ())? { get set }
15+ var onViewDidLoad: ((UINavigationController) -> ())? { get set }
16+}
17+
18+final class TabbarController: UITabBarController, UITabBarControllerDelegate, TabbarView {
19+
20+
21+ var onChannelsFlowSelect: ((UINavigationController) -> ())?
22+ var onProfileFlowSelect: ((UINavigationController) -> ())?
23+ var onViewDidLoad: ((UINavigationController) -> ())?
24+
25+ override func viewDidLoad() {
26+ super.viewDidLoad()
27+
28+ delegate = self
29+ if let controller = customizableViewControllers?.first as? UINavigationController {
30+ onViewDidLoad?(controller)
31+ }
32+ }
33+
34+ func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController)
35+ {
36+
37+ guard let controller = viewControllers?[selectedIndex] as? UINavigationController else { return }
38+
39+ if selectedIndex == 0 {
40+ onChannelsFlowSelect?(controller)
41+ } else {
42+ onProfileFlowSelect?(controller)
43+ }
44+ }
45+}
GDproject/Controller/Coordinators/TabbarCoordinator.swiftnew file+57
@@ -0,0 +1,57 @@
1+//
2+// TabBarCoordinator.swift
3+// RxSwift
4+//
5+// Created by cstore on 02/03/2019.
6+// Copyright © 2019 drHSE. All rights reserved.
7+//
8+
9+import Foundation
10+import UIKit
11+
12+
13+class TabBarCoordinator: BaseCoordinator {
14+
15+ var didEndFlow: (()->())?
16+
17+ private let tabbarView: TabbarView
18+ private let window: UIWindow?
19+
20+ init(tabbarView: TabbarView, window: UIWindow) {
21+ self.tabbarView = tabbarView
22+ self.window = window
23+ }
24+
25+ override func start() {
26+ tabbarView.onViewDidLoad = runChannelsFlow()
27+ tabbarView.onChannelsFlowSelect = runChannelsFlow()
28+ tabbarView.onProfileFlowSelect = runProfileFlow()
29+ window?.rootViewController = tabbarView as! TabbarController
30+ }
31+
32+ private func runChannelsFlow() -> ((UINavigationController) -> ())
33+ {
34+ return { [unowned self] navController in
35+ if navController.viewControllers.isEmpty == true {
36+ let channelCoordinator = ChannelsCoordinator(nc: navController)
37+ self.addDependency(channelCoordinator)
38+ channelCoordinator.start()
39+ }
40+ }
41+ }
42+
43+ private func runProfileFlow() -> ((UINavigationController) -> ())
44+ {
45+ return { [unowned self] navController in
46+ if navController.viewControllers.isEmpty == true {
47+ let profileCoordinator = ProfileCoordinator(nc: navController)
48+ profileCoordinator.didEndSession = { [weak self, weak profileCoordinator] in
49+ self?.removeDependency(profileCoordinator)
50+ self?.didEndFlow?()
51+ }
52+ self.addDependency(profileCoordinator)
53+ profileCoordinator.start()
54+ }
55+ }
56+ }
57+}
GDproject/Controller/Log In/LogInCoordinator.swiftdeleted−48
@@ -1,48 +0,0 @@
1−//
2−// LogInCoordinator.swift
3−// GDproject
4−//
5−// Created by cstore on 23/02/2019.
6−// Copyright © 2019 drHSE. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class LogInCoordinator{
12−
13− private weak var navigationController: UINavigationController?
14− private var window: UIWindow!
15− // MARK:- Init
16− init(navigationController: UINavigationController, window: UIWindow) {
17− self.navigationController = navigationController
18− self.window = window
19− }
20−
21− func start(){
22− showLogInPage()
23− }
24−
25− // MARK: - Private implementation
26−// private func showStatusPage(){
27−// let controller = TabbarCoordinator(window: window)
28−// controller.start()
29−// }
30−
31− private func showLogInPage(){
32− let controller = UIStoryboard.makeLogIn()
33−
34− controller.onLogIn = {
35− (id) in Model.authenticate(with: id) {
36− (res) in
37−
38− if (res) { DataStorage.standard.setUserKey(with: id) }
39− else { DataStorage.standard.setUserKey(with: 0) }
40−
41− controller.authenticateSucceeded = res
42− }
43− }
44−
45− navigationController?.pushViewController(controller, animated: false)
46− }
47−
48−}
GDproject/Controller/Log In/LogInCoordinator1.swiftnew file+48
@@ -0,0 +1,48 @@
1+////
2+//// LogInCoordinator.swift
3+//// GDproject
4+////
5+//// Created by cstore on 23/02/2019.
6+//// Copyright © 2019 drHSE. All rights reserved.
7+////
8+//
9+//import UIKit
10+//
11+//class LogInCoordinator{
12+//
13+// private weak var navigationController: UINavigationController?
14+// private var window: UIWindow!
15+// // MARK:- Init
16+// init(navigationController: UINavigationController, window: UIWindow) {
17+// self.navigationController = navigationController
18+// self.window = window
19+// }
20+//
21+// func start(){
22+// showLogInPage()
23+// }
24+//
25+// // MARK: - Private implementation
26+//// private func showStatusPage(){
27+//// let controller = TabbarCoordinator(window: window)
28+//// controller.start()
29+//// }
30+//
31+// private func showLogInPage(){
32+// let controller = UIStoryboard.makeLogIn()
33+//
34+// controller.onLogIn = {
35+// (id) in Model.authenticate(with: id) {
36+// (res) in
37+//
38+// if (res) { DataStorage.standard.setUserKey(with: id) }
39+// else { DataStorage.standard.setUserKey(with: 0) }
40+//
41+// controller.authenticateSucceeded = res
42+// }
43+// }
44+//
45+// navigationController?.pushViewController(controller, animated: false)
46+// }
47+//
48+//}
GDproject/Controller/Log In/LogInViewController.swift+71−94
@@ -1,128 +1,110 @@
1//
1//
2// LogInViewController.swift
2// LogInViewController.swift
3−// NewsFeed
3+// RxSwift
4//
4//
5−// Created by cstore on 20/01/2019.
5+// Created by cstore on 01/03/2019.
6// Copyright © 2019 drHSE. All rights reserved.
6// Copyright © 2019 drHSE. All rights reserved.
7//
7//
8
8
9import UIKit
9import UIKit
10+import TinyConstraints
11+import ReactiveSwift
12+import ReactiveCocoa
13+import Result
10
14
11class LogInViewController: UIViewController {
15class LogInViewController: UIViewController {
12
16
13− @IBOutlet weak var mailTextField: UITextField!
17+ var authenticate: ((Int)->())?
14
18
15− @IBOutlet weak var indicatorView: UIActivityIndicatorView!
19+ let logInLabel: UILabel = {
16−
20+ let label = UILabel()
17− var onLogIn: ((Int)->())?
21+ label.text = "Log In"
18−
22+ label.textColor = .black
19− var authenticateSucceeded: Bool? {
23+ label.font = UIFont.boldSystemFont(ofSize: 34)
20− didSet {
24+ return label
21− if !authenticateSucceeded! {
25+ }()
22− indicatorView.stopAnimating()
23− indicatorView.isHidden = true
24− }
25− }
26− }
27−
28− static let titleColor = UIColor(red: 0, green: 137/255, blue: 249/255, alpha: 0.5)
29
26
30− var bottomConstraint: NSLayoutConstraint?
27+ let mailTextField: UITextField = {
28+ let textField = UITextField()
29+ textField.backgroundColor = #colorLiteral(red: 0.937254902, green: 0.937254902, blue: 0.9568627451, alpha: 1)
30+ textField.placeholder = "Mail"
31+ textField.borderStyle = .roundedRect
32+ textField.textColor = .black
33+ textField.clearButtonMode = .always
34+ return textField
35+ }()
31
36
32 let logInButton: UIButton = {
37 let logInButton: UIButton = {
33 let button = UIButton(type: .system)
38 let button = UIButton(type: .system)
34 button.setTitle("Log In", for: .normal)
39 button.setTitle("Log In", for: .normal)
35− button.setTitleColor(titleColor, for: .normal)
40+ button.setTitleColor(blueSystemColor, for: .normal)
36 button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
41 button.titleLabel?.font = UIFont.boldSystemFont(ofSize: 16)
42+ button.addTarget(self, action: #selector(handleTap), for: .touchUpInside)
37 button.isEnabled = false
43 button.isEnabled = false
38− button.addTarget(self, action: #selector(activateLogInProcess), for: .touchUpInside)
39 return button
44 return button
40 }()
45 }()
41
46
42− let keyboardBar: UIView = {
47+ @objc func handleTap(){
43− let view = UIView()
48+ authenticate?(Int(mailTextField.text!)!)
44− view.backgroundColor = .white
45− return view
46− }()
47−
48− override func viewDidLoad() {
49− super.viewDidLoad()
50− setUpView()
51− configureTapgesture()
52− }
53−
54− override func viewWillAppear(_ animated: Bool) {
55− super.viewWillAppear(animated)
56 }
49 }
57
50
58− override func viewWillDisappear(_ animated: Bool) {
51+ private lazy var keyboardBar = UIView()
59− super.viewWillDisappear(animated)
52+ private lazy var contentView = UIView()
60− }
53+ private var bottomConstraint: NSLayoutConstraint?
61
54
62− private func configureTapgesture(){
55+ func setUpView(){
63− let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleTap))
56+ // logIn stack with textField and label
64− view.addGestureRecognizer(tapGesture)
57+ view.addSubview(contentView)
58+ contentView.edgesToSuperview(excluding: .bottom, insets: .left(16) + .right(16) + .top(80), usingSafeArea: true)
59+ let views = [logInLabel, mailTextField]
60+ contentView.stack(views, axis: .vertical, spacing: 10)
65 }
61 }
66
62
67− @objc func handleTap(){
63+ func configureKeyboard(){
68− view.endEditing(true)
64+
65+ // configure keyboardBar setUp
66+ view.addSubview(keyboardBar)
67+ keyboardBar.height(50)
68+ keyboardBar.edgesToSuperview(excluding: [.top,.bottom])
69+ bottomConstraint = NSLayoutConstraint(item: keyboardBar, attribute: .bottom, relatedBy: .equal, toItem: view.safeAreaLayoutGuide, attribute: .bottom, multiplier: 1, constant: 0)
70+ view.addConstraint(bottomConstraint!)
71+
72+ // configure keyboardBar components
73+ keyboardBar.addSubview(logInButton)
74+ logInButton.height(50)
75+ logInButton.leftToSuperview(view.leftAnchor, offset: 16, relation: .equal, isActive: true)
76+
69 }
77 }
70
78
71− @objc func activateLogInProcess(){
79+ func logicOfLogInInputValidation() -> ((String?)->()) {
72− if logInButton.isEnabled {
80+
73− // MARK:- when log in is succeeded do I need to go there?
81+ let logic: ((String?)->()) = { [weak self] (someText) in
74− if let id = Int(mailTextField.text!){
82+ if let text = someText, !text.isEmpty, let id = Int(text) {
75− indicatorView.isHidden = false
83+ self?.logInButton.isEnabled = true
76− indicatorView.startAnimating()
77− onLogIn?(id)
78− view.endEditing(true)
79 } else {
84 } else {
80− logInButton.isEnabled = false
85+ self?.logInButton.isEnabled = false
81− logInButton.setTitleColor(LogInViewController.titleColor.withAlphaComponent(0.5), for: .normal)
82 }
86 }
83 }
87 }
88+
89+ return logic
84 }
90 }
85
91
86− func setUpView(){
92+ override func viewDidLoad() {
87− indicatorView.isHidden = true
93+ super.viewDidLoad()
88− mailTextField.delegate = self
94+ self.view.backgroundColor = .white
89− view.addSubview(keyboardBar)
95+ setUpView()
90−
96+ configureKeyboard()
91− view.addConstraintsWithFormat(format: "H:|[v0]|", views: keyboardBar)
92− view.addConstraintsWithFormat(format: "V:[v0(50)]", views: keyboardBar)
93
97
94− setUpBarComponents()
98+ let mailFieldValuesSignal: Signal<String?, NoError> = mailTextField.reactive.continuousTextValues
95
99
96− configureKeyboardBehavior()
100+ mailFieldValuesSignal.observeValues(logicOfLogInInputValidation())
97− }
98−
99− func configureKeyboardBehavior(){
100− bottomConstraint = NSLayoutConstraint(item: keyboardBar, attribute: .bottom, relatedBy: .equal, toItem: view.safeAreaLayoutGuide, attribute: .bottom, multiplier: 1, constant: 0)
101− view.addConstraint(bottomConstraint!)
102
101
103 // for keyboard notifications
102 // for keyboard notifications
104 NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotifications), name: UIResponder.keyboardWillShowNotification, object: nil)
103 NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotifications), name: UIResponder.keyboardWillShowNotification, object: nil)
105
104
106 NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotifications), name: UIResponder.keyboardWillHideNotification, object: nil)
105 NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotifications), name: UIResponder.keyboardWillHideNotification, object: nil)
107−
108− // for log in button notifications
109− NotificationCenter.default.addObserver(self, selector: #selector(inputDidChanged), name: UITextField.textDidChangeNotification, object: mailTextField)
110−
111− NotificationCenter.default.addObserver(self, selector: #selector(inputDidChanged), name: UITextField.textDidBeginEditingNotification, object: mailTextField)
112 }
106 }
113
107
114− @objc func inputDidChanged(notification: NSNotification){
115− if mailTextField.text?.isEmpty ?? true
116− {
117− logInButton.isEnabled = false
118− logInButton.setTitleColor(LogInViewController.titleColor.withAlphaComponent(0.5), for: .normal)
119− }
120− else
121− {
122− logInButton.isEnabled = true
123− logInButton.setTitleColor(LogInViewController.titleColor.withAlphaComponent(1), for: .normal)
124− }
125− }
126
108
127 @objc func handleKeyboardNotifications(notification: NSNotification){
109 @objc func handleKeyboardNotifications(notification: NSNotification){
128 if let userInfo = notification.userInfo{
110 if let userInfo = notification.userInfo{
@@ -136,18 +118,13 @@ class LogInViewController: UIViewController {
136 }
118 }
137 }
119 }
138
120
139− func setUpBarComponents(){
140− keyboardBar.addSubview(logInButton)
141− keyboardBar.addConstraintsWithFormat(format: "H:[v0(60)]-16-|", views: logInButton)
142− keyboardBar.addConstraintsWithFormat(format: "V:|[v0]|", views: logInButton)
143− }
144}
121}
145
122
146−
123+extension UIButton {
147−extension LogInViewController: UITextFieldDelegate{
124+ override open var isEnabled: Bool {
148− func textFieldShouldReturn(_ textField: UITextField) -> Bool
125+ didSet {
149− {
126+ let color = isEnabled ? self.titleLabel?.textColor.withAlphaComponent(1) : self.titleLabel?.textColor.withAlphaComponent(0.5)
150− textField.resignFirstResponder()
127+ self.setTitleColor(color, for: .normal)
151− return true
128+ }
152 }
129 }
153}
130}
GDproject/Controller/Profile/ProfileViewController.swift+14−32
@@ -30,6 +30,12 @@ class ProfileViewController: UIViewController
30
30
31 @IBOutlet weak var newMessageButton: UIButton!
31 @IBOutlet weak var newMessageButton: UIButton!
32
32
33+ var logOut: (()->())?
34+
35+ var onSettings: (()->())?
36+
37+ var onChannelsListToAddAPerson: ((Model.Users)->())?
38+
33 var protoDictionary: [Int: UIImage] = [9: #imageLiteral(resourceName: "9"), 5051: #imageLiteral(resourceName: "5051"), 69: #imageLiteral(resourceName: "69"), 42: #imageLiteral(resourceName: "42")]
39 var protoDictionary: [Int: UIImage] = [9: #imageLiteral(resourceName: "9"), 5051: #imageLiteral(resourceName: "5051"), 69: #imageLiteral(resourceName: "69"), 42: #imageLiteral(resourceName: "42")]
34
40
35 func fill(with user: Model.Users){
41 func fill(with user: Model.Users){
@@ -76,8 +82,6 @@ class ProfileViewController: UIViewController
76 {
82 {
77 super.viewDidLoad()
83 super.viewDidLoad()
78
84
79−
80−
81 posts.viewController = self
85 posts.viewController = self
82 posts.type = .NONE
86 posts.type = .NONE
83
87
@@ -99,6 +103,7 @@ class ProfileViewController: UIViewController
99 var idProfile: Int?
103 var idProfile: Int?
100
104
101 override func viewWillAppear(_ animated: Bool) {
105 override func viewWillAppear(_ animated: Bool) {
106+
102 if idProfile == nil {
107 if idProfile == nil {
103 idProfile = DataStorage.standard.getUserId()
108 idProfile = DataStorage.standard.getUserId()
104 }
109 }
@@ -111,8 +116,6 @@ class ProfileViewController: UIViewController
111 self?.user = dic[id]
116 self?.user = dic[id]
112 }
117 }
113 }
118 }
114−
115− // requst for postsforuser was here. moved because of concrr
116 }
119 }
117
120
118 setUpNavigarionBar()
121 setUpNavigarionBar()
@@ -120,56 +123,35 @@ class ProfileViewController: UIViewController
120
123
121 func setUpNavigarionBar(){
124 func setUpNavigarionBar(){
122 navigationController?.navigationBar.prefersLargeTitles = true
125 navigationController?.navigationBar.prefersLargeTitles = true
123− //navigationItem.title = "\(user?.id ?? 0)"
124 let uibarbutton = UIBarButtonItem(title: "More", style: .plain, target: self, action: #selector(showInformation))
126 let uibarbutton = UIBarButtonItem(title: "More", style: .plain, target: self, action: #selector(showInformation))
125 navigationItem.rightBarButtonItems = [uibarbutton]
127 navigationItem.rightBarButtonItems = [uibarbutton]
126 navigationItem.largeTitleDisplayMode = .always
128 navigationItem.largeTitleDisplayMode = .always
127 }
129 }
128
130
129−
130− let copyLink: UIAlertAction = {
131− let b = UIAlertAction(title: "Copy link", style: .default)
132− return b
133− }()
134−
135 @objc func showInformation(){
131 @objc func showInformation(){
136
132
137− // drafts
138− // saved
139−
140 let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
133 let optionMenu = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
134+
141 let channelAction = UIAlertAction(title: "Add to a channel", style: .default){
135 let channelAction = UIAlertAction(title: "Add to a channel", style: .default){
142 [weak self] (_) in
136 [weak self] (_) in
143−
137+ self?.onChannelsListToAddAPerson?(self!.user!)
144− let vc = self?.storyboard?.instantiateViewController(withIdentifier: simplifiedChannelsList) as! SimplifiedChannelsList
145−
146− vc.user = self?.user!
147−
148− let transition = CATransition()
149− transition.duration = 0.5
150− transition.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut)
151− transition.type = CATransitionType.moveIn
152− transition.subtype = CATransitionSubtype.fromTop
153− self?.navigationController?.view.layer.add(transition, forKey: nil)
154− self?.navigationController?.pushViewController(vc, animated: false)
155 }
138 }
139+
156 let settingsAction = UIAlertAction(title: "Setting", style: .default)
140 let settingsAction = UIAlertAction(title: "Setting", style: .default)
157 { [weak self] (_) in
141 { [weak self] (_) in
158−
142+ self?.onSettings?()
159− let vc = self?.storyboard?.instantiateViewController(withIdentifier: "SettingsViewController") as! SettingsViewController
160− self?.navigationController?.pushViewController(vc, animated: true)
161 }
143 }
162
144
163 let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)
145 let cancelAction = UIAlertAction(title: "Cancel", style: .cancel)
146+
164 let logoutAction = UIAlertAction(title: "Log out", style: .destructive)
147 let logoutAction = UIAlertAction(title: "Log out", style: .destructive)
165− {
148+ { [weak self]
166 (_) in
149 (_) in
167− DataStorage.standard.setIsLoggedIn(value: false, with: 0)
150+ self?.logOut?()
168 }
151 }
169
152
170 optionMenu.addAction(channelAction)
153 optionMenu.addAction(channelAction)
171 optionMenu.addAction(settingsAction)
154 optionMenu.addAction(settingsAction)
172− optionMenu.addAction(copyLink)
173 optionMenu.addAction(logoutAction)
155 optionMenu.addAction(logoutAction)
174 optionMenu.addAction(cancelAction)
156 optionMenu.addAction(cancelAction)
175
157
GDproject/Controller/RepeatingTimer.swiftdeleted−59
@@ -1,59 +0,0 @@
1−/// RepeatingTimer mimics the API of DispatchSourceTimer but in a way that prevents
2−/// crashes that occur from calling resume multiple times on a timer that is
3−/// already resumed (noted by https://github.com/SiftScience/sift-ios/issues/52
4−
5−import Foundation
6−
7−class RepeatingTimer {
8−
9− let timeInterval: TimeInterval
10−
11− init(timeInterval: TimeInterval) {
12− self.timeInterval = timeInterval
13− }
14−
15− private lazy var timer: DispatchSourceTimer = {
16− let t = DispatchSource.makeTimerSource()
17− t.schedule(deadline: .now() + self.timeInterval, repeating: self.timeInterval)
18− t.setEventHandler(handler: { [weak self] in
19− self?.eventHandler?()
20− })
21− return t
22− }()
23−
24− var eventHandler: (() -> Void)?
25−
26− private enum State {
27− case suspended
28− case resumed
29− }
30−
31− private var state: State = .suspended
32−
33− deinit {
34− timer.setEventHandler {}
35− timer.cancel()
36− /*
37− If the timer is suspended, calling cancel without resuming
38− triggers a crash. This is documented here https://forums.developer.apple.com/thread/15902
39− */
40− resume()
41− eventHandler = nil
42− }
43−
44− func resume() {
45− if state == .resumed {
46− return
47− }
48− state = .resumed
49− timer.resume()
50− }
51−
52− func suspend() {
53− if state == .suspended {
54− return
55− }
56− state = .suspended
57− timer.suspend()
58− }
59−}
GDproject/DataStorage.swift+1−9
@@ -40,15 +40,7 @@ class DataStorage{
40 /**
40 /**
41 Function to determine is user logged in already or not
41 Function to determine is user logged in already or not
42 */
42 */
43− var isLoggedIn: Bool = UserDefaults.standard.bool(forKey: UserDefaultsKeys.loggedIn.rawValue) {
43+ var isLoggedIn: Bool = UserDefaults.standard.bool(forKey: UserDefaultsKeys.loggedIn.rawValue)
44− didSet{
45− if isLoggedIn && getUserId() != 0 {
46− (UIApplication.shared.delegate as? AppDelegate)?.tabCoordinator.start()
47− } else {
48− (UIApplication.shared.delegate as? AppDelegate)?.logInAgain()
49− }
50− }
51− }
52}
44}
53
45
54/**
46/**
GDproject/Supporting files/AppDelegate.swift+8−44
@@ -12,57 +12,21 @@ import UIKit
12class AppDelegate: UIResponder, UIApplicationDelegate {
12class AppDelegate: UIResponder, UIApplicationDelegate {
13
13
14
14
15− var coordinator: LogInCoordinator!
16− var tabCoordinator: TabbarCoordinator!
17−
18 var window: UIWindow?
15 var window: UIWindow?
19− var rootController: UINavigationController? {
16+ var appCoordinator: ApplicationCoordinator!
20− return self.window!.rootViewController as? UINavigationController
21− }
22−
23− func logInAgain(){
24− let root = UIStoryboard.navRoot()
25− window?.rootViewController = root
26− window?.makeKeyAndVisible()
27− coordinator = LogInCoordinator(navigationController: root, window: UIApplication.shared.keyWindow!)
28− coordinator!.start()
29− }
30
17
31
18
32 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
19 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
33 {
20 {
34− coordinator = LogInCoordinator(navigationController: rootController!, window: window!)
21+ window = UIWindow(frame: UIScreen.main.bounds)
35− tabCoordinator = TabbarCoordinator(window: window!)
22+ window?.makeKeyAndVisible()
36− // TODO:- determine what to do here: log in or tabbar
23+
37− if DataStorage.standard.isLoggedIn {
24+ // window?.rootViewController = UINavigationController()
38− tabCoordinator.start()
25+
39− } else {
26+ appCoordinator = ApplicationCoordinator(window: window!)
40− coordinator.start()
27+ appCoordinator.start()
41− }
42
28
43 return true
29 return true
44 }
30 }
45−
46− func applicationWillResignActive(_ application: UIApplication) {
47− // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
48− // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
49− }
50−
51− func applicationDidEnterBackground(_ application: UIApplication) {
52− // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
53− // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
54− }
55−
56− func applicationWillEnterForeground(_ application: UIApplication) {
57− // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
58− }
59−
60− func applicationDidBecomeActive(_ application: UIApplication) {
61− // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
62− }
63−
64− func applicationWillTerminate(_ application: UIApplication) {
65− // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
66− }
67}
31}
68
32