Skip to content

Commit 2a79598

Browse files
committed
Merge pull request #4 from hyperoslo/refactor/xcode-setup
Improve Xcode project
2 parents 57acffb + 05e4abc commit 2a79598

File tree

4 files changed

+83
-41
lines changed

4 files changed

+83
-41
lines changed

Example/Base Demo/Components.xcodeproj/project.pbxproj

+65-25
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,33 @@
88

99
/* Begin PBXBuildFile section */
1010
A802709A14B2B09B40B27C24 /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28622753AFF41826673AFB29 /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
11+
BD4A62441BC1A47D0037C380 /* .gitkeep in Resources */ = {isa = PBXBuildFile; fileRef = BD4A623C1BC1A47D0037C380 /* .gitkeep */; settings = {ASSET_TAGS = (); }; };
12+
BD4A62451BC1A47D0037C380 /* ComponentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4A623D1BC1A47D0037C380 /* ComponentController.swift */; settings = {ASSET_TAGS = (); }; };
13+
BD4A62461BC1A47D0037C380 /* ListComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4A623F1BC1A47D0037C380 /* ListComponent.swift */; settings = {ASSET_TAGS = (); }; };
14+
BD4A62471BC1A47D0037C380 /* components.json in Resources */ = {isa = PBXBuildFile; fileRef = BD4A62401BC1A47D0037C380 /* components.json */; settings = {ASSET_TAGS = (); }; };
15+
BD4A62481BC1A47D0037C380 /* Parser.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4A62421BC1A47D0037C380 /* Parser.swift */; settings = {ASSET_TAGS = (); }; };
16+
BD4A624B1BC1A4D20037C380 /* ListItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD4A624A1BC1A4D20037C380 /* ListItem.swift */; settings = {ASSET_TAGS = (); }; };
1117
BD6973671BBFE4FB001DC32F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD6973661BBFE4FB001DC32F /* AppDelegate.swift */; };
1218
BD69736E1BBFE4FB001DC32F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BD69736D1BBFE4FB001DC32F /* Assets.xcassets */; };
1319
BD6973711BBFE4FB001DC32F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BD69736F1BBFE4FB001DC32F /* LaunchScreen.storyboard */; };
14-
BD6F81A41BC02DFE006ADA1D /* ComponentController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD6F819F1BC02DFE006ADA1D /* ComponentController.swift */; settings = {ASSET_TAGS = (); }; };
15-
BD6F81A51BC02DFE006ADA1D /* components.json in Resources */ = {isa = PBXBuildFile; fileRef = BD6F81A01BC02DFE006ADA1D /* components.json */; settings = {ASSET_TAGS = (); }; };
16-
BD6F81A61BC02DFE006ADA1D /* ListComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD6F81A11BC02DFE006ADA1D /* ListComponent.swift */; settings = {ASSET_TAGS = (); }; };
17-
BD6F81A71BC02DFE006ADA1D /* Parser.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD6F81A21BC02DFE006ADA1D /* Parser.swift */; settings = {ASSET_TAGS = (); }; };
1820
/* End PBXBuildFile section */
1921

2022
/* Begin PBXFileReference section */
2123
28622753AFF41826673AFB29 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2224
5E70EB4CC092C66A8663C4B9 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
2325
87CF5208C24D6284F4E697DD /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
26+
BD4A623C1BC1A47D0037C380 /* .gitkeep */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
27+
BD4A623D1BC1A47D0037C380 /* ComponentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComponentController.swift; sourceTree = "<group>"; };
28+
BD4A623F1BC1A47D0037C380 /* ListComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListComponent.swift; sourceTree = "<group>"; };
29+
BD4A62401BC1A47D0037C380 /* components.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = components.json; sourceTree = "<group>"; };
30+
BD4A62421BC1A47D0037C380 /* Parser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Parser.swift; sourceTree = "<group>"; };
31+
BD4A624A1BC1A4D20037C380 /* ListItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListItem.swift; sourceTree = "<group>"; };
2432
BD6973631BBFE4FB001DC32F /* Components.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Components.app; sourceTree = BUILT_PRODUCTS_DIR; };
2533
BD6973661BBFE4FB001DC32F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2634
BD69736D1BBFE4FB001DC32F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2735
BD6973701BBFE4FB001DC32F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
2836
BD6973721BBFE4FB001DC32F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2937
BD6973781BBFE56D001DC32F /* components.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = components.json; sourceTree = "<group>"; };
30-
BD6F819F1BC02DFE006ADA1D /* ComponentController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ComponentController.swift; sourceTree = "<group>"; };
31-
BD6F81A01BC02DFE006ADA1D /* components.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = components.json; sourceTree = "<group>"; };
32-
BD6F81A11BC02DFE006ADA1D /* ListComponent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListComponent.swift; sourceTree = "<group>"; };
33-
BD6F81A21BC02DFE006ADA1D /* Parser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Parser.swift; sourceTree = "<group>"; };
3438
/* End PBXFileReference section */
3539

3640
/* Begin PBXFrameworksBuildPhase section */
@@ -45,10 +49,56 @@
4549
/* End PBXFrameworksBuildPhase section */
4650

4751
/* Begin PBXGroup section */
52+
BD4A623B1BC1A47D0037C380 /* Source */ = {
53+
isa = PBXGroup;
54+
children = (
55+
BD4A623C1BC1A47D0037C380 /* .gitkeep */,
56+
BD4A623D1BC1A47D0037C380 /* ComponentController.swift */,
57+
BD4A623E1BC1A47D0037C380 /* Components */,
58+
BD4A62401BC1A47D0037C380 /* components.json */,
59+
BD4A62411BC1A47D0037C380 /* Library */,
60+
BD4A62491BC1A4BB0037C380 /* Models */,
61+
BD4A62431BC1A47D0037C380 /* Protocols */,
62+
);
63+
name = Source;
64+
path = ../../Source;
65+
sourceTree = "<group>";
66+
};
67+
BD4A623E1BC1A47D0037C380 /* Components */ = {
68+
isa = PBXGroup;
69+
children = (
70+
BD4A623F1BC1A47D0037C380 /* ListComponent.swift */,
71+
);
72+
path = Components;
73+
sourceTree = "<group>";
74+
};
75+
BD4A62411BC1A47D0037C380 /* Library */ = {
76+
isa = PBXGroup;
77+
children = (
78+
BD4A62421BC1A47D0037C380 /* Parser.swift */,
79+
);
80+
path = Library;
81+
sourceTree = "<group>";
82+
};
83+
BD4A62431BC1A47D0037C380 /* Protocols */ = {
84+
isa = PBXGroup;
85+
children = (
86+
);
87+
path = Protocols;
88+
sourceTree = "<group>";
89+
};
90+
BD4A62491BC1A4BB0037C380 /* Models */ = {
91+
isa = PBXGroup;
92+
children = (
93+
BD4A624A1BC1A4D20037C380 /* ListItem.swift */,
94+
);
95+
path = Models;
96+
sourceTree = "<group>";
97+
};
4898
BD69735A1BBFE4FB001DC32F = {
4999
isa = PBXGroup;
50100
children = (
51-
BD6F819D1BC02DFE006ADA1D /* Source */,
101+
BD4A623B1BC1A47D0037C380 /* Source */,
52102
BD6973651BBFE4FB001DC32F /* Components */,
53103
BD6973641BBFE4FB001DC32F /* Products */,
54104
DC20B8ABF3750CE9A8F94AD8 /* Pods */,
@@ -76,18 +126,6 @@
76126
path = Components;
77127
sourceTree = "<group>";
78128
};
79-
BD6F819D1BC02DFE006ADA1D /* Source */ = {
80-
isa = PBXGroup;
81-
children = (
82-
BD6F819F1BC02DFE006ADA1D /* ComponentController.swift */,
83-
BD6F81A01BC02DFE006ADA1D /* components.json */,
84-
BD6F81A11BC02DFE006ADA1D /* ListComponent.swift */,
85-
BD6F81A21BC02DFE006ADA1D /* Parser.swift */,
86-
);
87-
name = Source;
88-
path = ../../Source;
89-
sourceTree = "<group>";
90-
};
91129
DC20B8ABF3750CE9A8F94AD8 /* Pods */ = {
92130
isa = PBXGroup;
93131
children = (
@@ -165,7 +203,8 @@
165203
isa = PBXResourcesBuildPhase;
166204
buildActionMask = 2147483647;
167205
files = (
168-
BD6F81A51BC02DFE006ADA1D /* components.json in Resources */,
206+
BD4A62441BC1A47D0037C380 /* .gitkeep in Resources */,
207+
BD4A62471BC1A47D0037C380 /* components.json in Resources */,
169208
BD6973711BBFE4FB001DC32F /* LaunchScreen.storyboard in Resources */,
170209
BD69736E1BBFE4FB001DC32F /* Assets.xcassets in Resources */,
171210
);
@@ -226,10 +265,11 @@
226265
isa = PBXSourcesBuildPhase;
227266
buildActionMask = 2147483647;
228267
files = (
229-
BD6F81A71BC02DFE006ADA1D /* Parser.swift in Sources */,
268+
BD4A624B1BC1A4D20037C380 /* ListItem.swift in Sources */,
269+
BD4A62481BC1A47D0037C380 /* Parser.swift in Sources */,
230270
BD6973671BBFE4FB001DC32F /* AppDelegate.swift in Sources */,
231-
BD6F81A41BC02DFE006ADA1D /* ComponentController.swift in Sources */,
232-
BD6F81A61BC02DFE006ADA1D /* ListComponent.swift in Sources */,
271+
BD4A62451BC1A47D0037C380 /* ComponentController.swift in Sources */,
272+
BD4A62461BC1A47D0037C380 /* ListComponent.swift in Sources */,
233273
);
234274
runOnlyForDeploymentPostprocessing = 0;
235275
};

Source/ListComponent.swift renamed to Source/Components/ListComponent.swift

-16
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,6 @@ protocol ComponentView {
66
func render() -> UIView
77
}
88

9-
struct ListItem {
10-
var title = ""
11-
var subtitle = ""
12-
var image = ""
13-
var type = ""
14-
var uri: String?
15-
16-
init(json: JSONDictionary) {
17-
self.title <- json.property("title")
18-
self.subtitle <- json.property("subtitle")
19-
self.image <- json.property("image")
20-
self.type <- json.property("type")
21-
self.uri <- json.property("uri")
22-
}
23-
}
24-
259
class ListComponent: NSObject, ComponentView {
2610

2711
lazy var tableView: UITableView = { [unowned self] in
File renamed without changes.

Source/Models/ListItem.swift

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Tailor
2+
import Sugar
3+
4+
struct ListItem {
5+
var title = ""
6+
var subtitle = ""
7+
var image = ""
8+
var type = ""
9+
var uri: String?
10+
11+
init(json: JSONDictionary) {
12+
self.title <- json.property("title")
13+
self.subtitle <- json.property("subtitle")
14+
self.image <- json.property("image")
15+
self.type <- json.property("type")
16+
self.uri <- json.property("uri")
17+
}
18+
}

0 commit comments

Comments
 (0)