Skip to content

Commit 33d4d6b

Browse files
author
harshit
committed
Initial Commit
0 parents  commit 33d4d6b

File tree

5 files changed

+383
-0
lines changed

5 files changed

+383
-0
lines changed
+294
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 48;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
EF7C59781F37506C00AB919C /* StaticFamily.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF7C59771F37506C00AB919C /* StaticFamily.swift */; };
11+
EF7C597A1F37508000AB919C /* StaticPerson.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF7C59791F37508000AB919C /* StaticPerson.swift */; };
12+
/* End PBXBuildFile section */
13+
14+
/* Begin PBXCopyFilesBuildPhase section */
15+
EF7C59681F37505400AB919C /* CopyFiles */ = {
16+
isa = PBXCopyFilesBuildPhase;
17+
buildActionMask = 2147483647;
18+
dstPath = "include/$(PRODUCT_NAME)";
19+
dstSubfolderSpec = 16;
20+
files = (
21+
);
22+
runOnlyForDeploymentPostprocessing = 0;
23+
};
24+
/* End PBXCopyFilesBuildPhase section */
25+
26+
/* Begin PBXFileReference section */
27+
EF7C596A1F37505400AB919C /* libStaticFamily.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libStaticFamily.a; sourceTree = BUILT_PRODUCTS_DIR; };
28+
EF7C59761F37506C00AB919C /* StaticFamily-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StaticFamily-Bridging-Header.h"; sourceTree = "<group>"; };
29+
EF7C59771F37506C00AB919C /* StaticFamily.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticFamily.swift; sourceTree = "<group>"; };
30+
EF7C59791F37508000AB919C /* StaticPerson.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaticPerson.swift; sourceTree = "<group>"; };
31+
/* End PBXFileReference section */
32+
33+
/* Begin PBXFrameworksBuildPhase section */
34+
EF7C59671F37505400AB919C /* Frameworks */ = {
35+
isa = PBXFrameworksBuildPhase;
36+
buildActionMask = 2147483647;
37+
files = (
38+
);
39+
runOnlyForDeploymentPostprocessing = 0;
40+
};
41+
/* End PBXFrameworksBuildPhase section */
42+
43+
/* Begin PBXGroup section */
44+
EF7C59611F37505400AB919C = {
45+
isa = PBXGroup;
46+
children = (
47+
EF7C596C1F37505400AB919C /* StaticFamily */,
48+
EF7C596B1F37505400AB919C /* Products */,
49+
);
50+
sourceTree = "<group>";
51+
};
52+
EF7C596B1F37505400AB919C /* Products */ = {
53+
isa = PBXGroup;
54+
children = (
55+
EF7C596A1F37505400AB919C /* libStaticFamily.a */,
56+
);
57+
name = Products;
58+
sourceTree = "<group>";
59+
};
60+
EF7C596C1F37505400AB919C /* StaticFamily */ = {
61+
isa = PBXGroup;
62+
children = (
63+
EF7C59771F37506C00AB919C /* StaticFamily.swift */,
64+
EF7C59761F37506C00AB919C /* StaticFamily-Bridging-Header.h */,
65+
EF7C59791F37508000AB919C /* StaticPerson.swift */,
66+
);
67+
path = StaticFamily;
68+
sourceTree = "<group>";
69+
};
70+
/* End PBXGroup section */
71+
72+
/* Begin PBXNativeTarget section */
73+
EF7C59691F37505400AB919C /* StaticFamily */ = {
74+
isa = PBXNativeTarget;
75+
buildConfigurationList = EF7C59731F37505400AB919C /* Build configuration list for PBXNativeTarget "StaticFamily" */;
76+
buildPhases = (
77+
EF7C59661F37505400AB919C /* Sources */,
78+
EF7C59671F37505400AB919C /* Frameworks */,
79+
EF7C59681F37505400AB919C /* CopyFiles */,
80+
);
81+
buildRules = (
82+
);
83+
dependencies = (
84+
);
85+
name = StaticFamily;
86+
productName = StaticFamily;
87+
productReference = EF7C596A1F37505400AB919C /* libStaticFamily.a */;
88+
productType = "com.apple.product-type.library.static";
89+
};
90+
/* End PBXNativeTarget section */
91+
92+
/* Begin PBXProject section */
93+
EF7C59621F37505400AB919C /* Project object */ = {
94+
isa = PBXProject;
95+
attributes = {
96+
LastUpgradeCheck = 0900;
97+
ORGANIZATIONNAME = MasterCard;
98+
TargetAttributes = {
99+
EF7C59691F37505400AB919C = {
100+
CreatedOnToolsVersion = 9.0;
101+
LastSwiftMigration = 0900;
102+
};
103+
};
104+
};
105+
buildConfigurationList = EF7C59651F37505400AB919C /* Build configuration list for PBXProject "StaticFamily" */;
106+
compatibilityVersion = "Xcode 8.0";
107+
developmentRegion = en;
108+
hasScannedForEncodings = 0;
109+
knownRegions = (
110+
en,
111+
);
112+
mainGroup = EF7C59611F37505400AB919C;
113+
productRefGroup = EF7C596B1F37505400AB919C /* Products */;
114+
projectDirPath = "";
115+
projectRoot = "";
116+
targets = (
117+
EF7C59691F37505400AB919C /* StaticFamily */,
118+
);
119+
};
120+
/* End PBXProject section */
121+
122+
/* Begin PBXSourcesBuildPhase section */
123+
EF7C59661F37505400AB919C /* Sources */ = {
124+
isa = PBXSourcesBuildPhase;
125+
buildActionMask = 2147483647;
126+
files = (
127+
EF7C597A1F37508000AB919C /* StaticPerson.swift in Sources */,
128+
EF7C59781F37506C00AB919C /* StaticFamily.swift in Sources */,
129+
);
130+
runOnlyForDeploymentPostprocessing = 0;
131+
};
132+
/* End PBXSourcesBuildPhase section */
133+
134+
/* Begin XCBuildConfiguration section */
135+
EF7C59711F37505400AB919C /* Debug */ = {
136+
isa = XCBuildConfiguration;
137+
buildSettings = {
138+
ALWAYS_SEARCH_USER_PATHS = NO;
139+
CLANG_ANALYZER_NONNULL = YES;
140+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
141+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
142+
CLANG_CXX_LIBRARY = "libc++";
143+
CLANG_ENABLE_MODULES = YES;
144+
CLANG_ENABLE_OBJC_ARC = YES;
145+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
146+
CLANG_WARN_BOOL_CONVERSION = YES;
147+
CLANG_WARN_COMMA = YES;
148+
CLANG_WARN_CONSTANT_CONVERSION = YES;
149+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
150+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
151+
CLANG_WARN_EMPTY_BODY = YES;
152+
CLANG_WARN_ENUM_CONVERSION = YES;
153+
CLANG_WARN_INFINITE_RECURSION = YES;
154+
CLANG_WARN_INT_CONVERSION = YES;
155+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
156+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
157+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
158+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
159+
CLANG_WARN_STRICT_PROTOTYPES = YES;
160+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
161+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
162+
CLANG_WARN_UNREACHABLE_CODE = YES;
163+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
164+
CODE_SIGN_IDENTITY = "iPhone Developer";
165+
COPY_PHASE_STRIP = NO;
166+
DEBUG_INFORMATION_FORMAT = dwarf;
167+
ENABLE_STRICT_OBJC_MSGSEND = YES;
168+
ENABLE_TESTABILITY = YES;
169+
GCC_C_LANGUAGE_STANDARD = gnu11;
170+
GCC_DYNAMIC_NO_PIC = NO;
171+
GCC_NO_COMMON_BLOCKS = YES;
172+
GCC_OPTIMIZATION_LEVEL = 0;
173+
GCC_PREPROCESSOR_DEFINITIONS = (
174+
"DEBUG=1",
175+
"$(inherited)",
176+
);
177+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
178+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
179+
GCC_WARN_UNDECLARED_SELECTOR = YES;
180+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
181+
GCC_WARN_UNUSED_FUNCTION = YES;
182+
GCC_WARN_UNUSED_VARIABLE = YES;
183+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
184+
MTL_ENABLE_DEBUG_INFO = YES;
185+
ONLY_ACTIVE_ARCH = YES;
186+
SDKROOT = iphoneos;
187+
};
188+
name = Debug;
189+
};
190+
EF7C59721F37505400AB919C /* Release */ = {
191+
isa = XCBuildConfiguration;
192+
buildSettings = {
193+
ALWAYS_SEARCH_USER_PATHS = NO;
194+
CLANG_ANALYZER_NONNULL = YES;
195+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
196+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
197+
CLANG_CXX_LIBRARY = "libc++";
198+
CLANG_ENABLE_MODULES = YES;
199+
CLANG_ENABLE_OBJC_ARC = YES;
200+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
201+
CLANG_WARN_BOOL_CONVERSION = YES;
202+
CLANG_WARN_COMMA = YES;
203+
CLANG_WARN_CONSTANT_CONVERSION = YES;
204+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
205+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
206+
CLANG_WARN_EMPTY_BODY = YES;
207+
CLANG_WARN_ENUM_CONVERSION = YES;
208+
CLANG_WARN_INFINITE_RECURSION = YES;
209+
CLANG_WARN_INT_CONVERSION = YES;
210+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
211+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
212+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
213+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
214+
CLANG_WARN_STRICT_PROTOTYPES = YES;
215+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
216+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
217+
CLANG_WARN_UNREACHABLE_CODE = YES;
218+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
219+
CODE_SIGN_IDENTITY = "iPhone Developer";
220+
COPY_PHASE_STRIP = NO;
221+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
222+
ENABLE_NS_ASSERTIONS = NO;
223+
ENABLE_STRICT_OBJC_MSGSEND = YES;
224+
GCC_C_LANGUAGE_STANDARD = gnu11;
225+
GCC_NO_COMMON_BLOCKS = YES;
226+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
227+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
228+
GCC_WARN_UNDECLARED_SELECTOR = YES;
229+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
230+
GCC_WARN_UNUSED_FUNCTION = YES;
231+
GCC_WARN_UNUSED_VARIABLE = YES;
232+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
233+
MTL_ENABLE_DEBUG_INFO = NO;
234+
SDKROOT = iphoneos;
235+
VALIDATE_PRODUCT = YES;
236+
};
237+
name = Release;
238+
};
239+
EF7C59741F37505400AB919C /* Debug */ = {
240+
isa = XCBuildConfiguration;
241+
buildSettings = {
242+
CLANG_ENABLE_MODULES = YES;
243+
DEVELOPMENT_TEAM = AA4LHDPYCR;
244+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
245+
OTHER_LDFLAGS = "-ObjC";
246+
PRODUCT_NAME = "$(TARGET_NAME)";
247+
SKIP_INSTALL = YES;
248+
SWIFT_OBJC_BRIDGING_HEADER = "StaticFamily/StaticFamily-Bridging-Header.h";
249+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
250+
SWIFT_VERSION = 3.0;
251+
TARGETED_DEVICE_FAMILY = "1,2";
252+
};
253+
name = Debug;
254+
};
255+
EF7C59751F37505400AB919C /* Release */ = {
256+
isa = XCBuildConfiguration;
257+
buildSettings = {
258+
CLANG_ENABLE_MODULES = YES;
259+
DEVELOPMENT_TEAM = AA4LHDPYCR;
260+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
261+
OTHER_LDFLAGS = "-ObjC";
262+
PRODUCT_NAME = "$(TARGET_NAME)";
263+
SKIP_INSTALL = YES;
264+
SWIFT_OBJC_BRIDGING_HEADER = "StaticFamily/StaticFamily-Bridging-Header.h";
265+
SWIFT_VERSION = 3.0;
266+
TARGETED_DEVICE_FAMILY = "1,2";
267+
};
268+
name = Release;
269+
};
270+
/* End XCBuildConfiguration section */
271+
272+
/* Begin XCConfigurationList section */
273+
EF7C59651F37505400AB919C /* Build configuration list for PBXProject "StaticFamily" */ = {
274+
isa = XCConfigurationList;
275+
buildConfigurations = (
276+
EF7C59711F37505400AB919C /* Debug */,
277+
EF7C59721F37505400AB919C /* Release */,
278+
);
279+
defaultConfigurationIsVisible = 0;
280+
defaultConfigurationName = Release;
281+
};
282+
EF7C59731F37505400AB919C /* Build configuration list for PBXNativeTarget "StaticFamily" */ = {
283+
isa = XCConfigurationList;
284+
buildConfigurations = (
285+
EF7C59741F37505400AB919C /* Debug */,
286+
EF7C59751F37505400AB919C /* Release */,
287+
);
288+
defaultConfigurationIsVisible = 0;
289+
defaultConfigurationName = Release;
290+
};
291+
/* End XCConfigurationList section */
292+
};
293+
rootObject = EF7C59621F37505400AB919C /* Project object */;
294+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>StaticFamily.xcscheme</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//
2+
// Use this file to import your target's public headers that you would like to expose to Swift.
3+
//
4+

StaticFamily/StaticFamily.swift

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//
2+
// StaticFamily.swift
3+
// StaticFamily
4+
//
5+
// Created by Shah, Harshit on 8/6/17.
6+
// Copyright © 2017 MasterCard. All rights reserved.
7+
//
8+
9+
import Foundation
10+
import Foundation
11+
open class StaticFamily : Codable, Printable
12+
{
13+
let familyName: String
14+
var familyMembers: [StaticPerson] = []
15+
enum CodingKeys: String, CodingKey {
16+
case familyName
17+
case familyMembers
18+
}
19+
public init(familyName:String, members:[StaticPerson]?)
20+
{
21+
self.familyName = familyName
22+
if let _ = members
23+
{
24+
familyMembers.append(contentsOf: members!)
25+
}
26+
}
27+
public func addFamilyMember(member:StaticPerson)
28+
{
29+
familyMembers.append(member)
30+
}
31+
open func printData() {
32+
print("FamilyName \(familyName)")
33+
let _ = familyMembers.map({ $0.printData()})
34+
}
35+
// public required init(from decoder: Decoder) throws {
36+
// let values = try decoder.container(keyedBy: CodingKeys.self)
37+
// familyName = try values.decode(String.self, forKey: .familyName)
38+
// familyMembers = try values.decode([StaticPerson].self, forKey: .familyMembers)
39+
// }
40+
41+
42+
}

StaticFamily/StaticPerson.swift

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// StaticPerson.swift
3+
// StaticFamily
4+
//
5+
// Created by Shah, Harshit on 8/6/17.
6+
// Copyright © 2017 MasterCard. All rights reserved.
7+
//
8+
9+
import Foundation
10+
public protocol Printable
11+
{
12+
func printData()
13+
}
14+
15+
open class StaticPerson : Printable, Codable
16+
{
17+
let name: String
18+
let age: Int
19+
public init(name:String,age:Int)
20+
{
21+
self.name = name
22+
self.age = age
23+
}
24+
public func printData() {
25+
print("Person " +
26+
"Name: \(name) " +
27+
"Age: \(age)")
28+
}
29+
}

0 commit comments

Comments
 (0)