Skip to content

Commit 187d2af

Browse files
committed
cleanup and readme
1 parent 7d16fd8 commit 187d2af

File tree

17 files changed

+1535
-66
lines changed

17 files changed

+1535
-66
lines changed

HW.xcodeproj/project.pbxproj

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
D63510A41E96673600193100 /* Logging.swift in Sources */ = {isa = PBXBuildFile; fileRef = D63510A31E96673600193100 /* Logging.swift */; };
1313
D66AF2F31E96B905003E00AB /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D66AF2F21E96B905003E00AB /* Images.xcassets */; };
1414
D6846A8B1E8964800016C0F0 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6846A8A1E8964800016C0F0 /* CoreLocation.framework */; };
15-
D6846A8D1E8976A60016C0F0 /* SwiftHTTP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6846A8C1E8976A50016C0F0 /* SwiftHTTP.framework */; };
16-
D68906971E897B8300D51592 /* SwiftyJSON.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D68906961E897B8300D51592 /* SwiftyJSON.framework */; };
1715
D689069B1E8993E200D51592 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D689069A1E8993E200D51592 /* Utils.swift */; };
1816
D68AD0FF1E93048000B659E3 /* World3D.swift in Sources */ = {isa = PBXBuildFile; fileRef = D68AD0FE1E93048000B659E3 /* World3D.swift */; };
1917
D69182001E895D1500DC038E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D69181FF1E895D1500DC038E /* AppDelegate.swift */; };
2018
D69182081E895D1500DC038E /* HW.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = D69182061E895D1500DC038E /* HW.xcdatamodeld */; };
2119
D691820A1E895D1500DC038E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D69182091E895D1500DC038E /* Assets.xcassets */; };
2220
D691820D1E895D1500DC038E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D691820B1E895D1500DC038E /* LaunchScreen.storyboard */; };
21+
D698EA3A25A1166200055F36 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = D698EA3925A1166200055F36 /* SwiftyJSON.swift */; };
22+
D698EA3D25A116C400055F36 /* APIHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = D698EA3C25A116C400055F36 /* APIHelper.swift */; };
2323
D6D1AD57202BA64A007DE850 /* MapScene.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D1AD56202BA649007DE850 /* MapScene.swift */; };
2424
D6D1AD59202BA654007DE850 /* PlayerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D1AD58202BA653007DE850 /* PlayerNode.swift */; };
2525
D6D1AD5B202BA67E007DE850 /* CameraNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6D1AD5A202BA67E007DE850 /* CameraNode.swift */; };
@@ -55,6 +55,8 @@
5555
D69182091E895D1500DC038E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5656
D691820C1E895D1500DC038E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5757
D691820E1E895D1500DC038E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
58+
D698EA3925A1166200055F36 /* SwiftyJSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = "<group>"; };
59+
D698EA3C25A116C400055F36 /* APIHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIHelper.swift; sourceTree = "<group>"; };
5860
D6D1AD56202BA649007DE850 /* MapScene.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MapScene.swift; sourceTree = "<group>"; };
5961
D6D1AD58202BA653007DE850 /* PlayerNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PlayerNode.swift; sourceTree = "<group>"; };
6062
D6D1AD5A202BA67E007DE850 /* CameraNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CameraNode.swift; sourceTree = "<group>"; };
@@ -70,8 +72,6 @@
7072
buildActionMask = 2147483647;
7173
files = (
7274
D6EA44FE1E8B342700658CAF /* CoreMotion.framework in Frameworks */,
73-
D68906971E897B8300D51592 /* SwiftyJSON.framework in Frameworks */,
74-
D6846A8D1E8976A60016C0F0 /* SwiftHTTP.framework in Frameworks */,
7575
D6846A8B1E8964800016C0F0 /* CoreLocation.framework in Frameworks */,
7676
);
7777
runOnlyForDeploymentPostprocessing = 0;
@@ -110,6 +110,7 @@
110110
D68AD1021E93190400B659E3 /* Helpers */ = {
111111
isa = PBXGroup;
112112
children = (
113+
D698EA3C25A116C400055F36 /* APIHelper.swift */,
113114
D617BCAB1E89E76C008556B9 /* VectorMath.swift */,
114115
D689069A1E8993E200D51592 /* Utils.swift */,
115116
D6EA44FB1E8AC81D00658CAF /* LocationMaster.swift */,
@@ -159,6 +160,7 @@
159160
D69181FE1E895D1500DC038E /* HW */ = {
160161
isa = PBXGroup;
161162
children = (
163+
D698EA3925A1166200055F36 /* SwiftyJSON.swift */,
162164
D66AF3011E970A90003E00AB /* Assets */,
163165
D69182061E895D1500DC038E /* HW.xcdatamodeld */,
164166
D69182091E895D1500DC038E /* Assets.xcassets */,
@@ -201,7 +203,7 @@
201203
isa = PBXProject;
202204
attributes = {
203205
LastSwiftUpdateCheck = 0820;
204-
LastUpgradeCheck = 0920;
206+
LastUpgradeCheck = 1230;
205207
ORGANIZATIONNAME = "Adrian Nenu";
206208
TargetAttributes = {
207209
D69181FB1E895D1400DC038E = {
@@ -214,7 +216,7 @@
214216
};
215217
buildConfigurationList = D69181F71E895D1400DC038E /* Build configuration list for PBXProject "HW" */;
216218
compatibilityVersion = "Xcode 3.2";
217-
developmentRegion = English;
219+
developmentRegion = en;
218220
hasScannedForEncodings = 0;
219221
knownRegions = (
220222
en,
@@ -258,7 +260,8 @@
258260
);
259261
runOnlyForDeploymentPostprocessing = 0;
260262
shellPath = /bin/sh;
261-
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
263+
shellScript = "
264+
";
262265
};
263266
/* End PBXShellScriptBuildPhase section */
264267

@@ -270,8 +273,10 @@
270273
D617BCAC1E89E76C008556B9 /* VectorMath.swift in Sources */,
271274
D63510A41E96673600193100 /* Logging.swift in Sources */,
272275
D689069B1E8993E200D51592 /* Utils.swift in Sources */,
276+
D698EA3D25A116C400055F36 /* APIHelper.swift in Sources */,
273277
D69182081E895D1500DC038E /* HW.xcdatamodeld in Sources */,
274278
D6EA44F61E8A281F00658CAF /* API.swift in Sources */,
279+
D698EA3A25A1166200055F36 /* SwiftyJSON.swift in Sources */,
275280
D68AD0FF1E93048000B659E3 /* World3D.swift in Sources */,
276281
D69182001E895D1500DC038E /* AppDelegate.swift in Sources */,
277282
D6D1AD59202BA654007DE850 /* PlayerNode.swift in Sources */,
@@ -301,6 +306,7 @@
301306
isa = XCBuildConfiguration;
302307
buildSettings = {
303308
ALWAYS_SEARCH_USER_PATHS = NO;
309+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
304310
CLANG_ANALYZER_NONNULL = YES;
305311
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
306312
CLANG_CXX_LIBRARY = "libc++";
@@ -310,15 +316,18 @@
310316
CLANG_WARN_BOOL_CONVERSION = YES;
311317
CLANG_WARN_COMMA = YES;
312318
CLANG_WARN_CONSTANT_CONVERSION = YES;
319+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
313320
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
314321
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
315322
CLANG_WARN_EMPTY_BODY = YES;
316323
CLANG_WARN_ENUM_CONVERSION = YES;
317324
CLANG_WARN_INFINITE_RECURSION = YES;
318325
CLANG_WARN_INT_CONVERSION = YES;
319326
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
320328
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
321329
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
322331
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
323332
CLANG_WARN_STRICT_PROTOTYPES = YES;
324333
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -343,19 +352,21 @@
343352
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
344353
GCC_WARN_UNUSED_FUNCTION = YES;
345354
GCC_WARN_UNUSED_VARIABLE = YES;
346-
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
355+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
347356
MTL_ENABLE_DEBUG_INFO = YES;
348357
ONLY_ACTIVE_ARCH = YES;
349358
SDKROOT = iphoneos;
350359
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
351360
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
361+
SWIFT_VERSION = 5.0;
352362
};
353363
name = Debug;
354364
};
355365
D69182101E895D1500DC038E /* Release */ = {
356366
isa = XCBuildConfiguration;
357367
buildSettings = {
358368
ALWAYS_SEARCH_USER_PATHS = NO;
369+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
359370
CLANG_ANALYZER_NONNULL = YES;
360371
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
361372
CLANG_CXX_LIBRARY = "libc++";
@@ -365,15 +376,18 @@
365376
CLANG_WARN_BOOL_CONVERSION = YES;
366377
CLANG_WARN_COMMA = YES;
367378
CLANG_WARN_CONSTANT_CONVERSION = YES;
379+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
368380
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
369381
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
370382
CLANG_WARN_EMPTY_BODY = YES;
371383
CLANG_WARN_ENUM_CONVERSION = YES;
372384
CLANG_WARN_INFINITE_RECURSION = YES;
373385
CLANG_WARN_INT_CONVERSION = YES;
374386
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
387+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
375388
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
376389
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
390+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
377391
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
378392
CLANG_WARN_STRICT_PROTOTYPES = YES;
379393
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -392,10 +406,11 @@
392406
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
393407
GCC_WARN_UNUSED_FUNCTION = YES;
394408
GCC_WARN_UNUSED_VARIABLE = YES;
395-
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
409+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
396410
MTL_ENABLE_DEBUG_INFO = NO;
397411
SDKROOT = iphoneos;
398412
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
413+
SWIFT_VERSION = 5.0;
399414
VALIDATE_PRODUCT = YES;
400415
};
401416
name = Release;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Binary file not shown.

HW.xcodeproj/xcuserdata/adriannenu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Bucket
3+
uuid = "EDDEFDB2-836E-4971-9833-B4AC7FFA2B86"
34
type = "1"
45
version = "2.0">
56
<Breakpoints>
67
<BreakpointProxy
78
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
89
<BreakpointContent
10+
uuid = "F05043B2-AD9B-4330-BC6B-F6D733C0AAC3"
911
shouldBeEnabled = "No"
1012
ignoreCount = "0"
1113
continueAfterRunningActions = "No"
@@ -22,6 +24,7 @@
2224
<BreakpointProxy
2325
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
2426
<BreakpointContent
27+
uuid = "51025CE9-B882-4EC1-A161-F0358054ED57"
2528
shouldBeEnabled = "No"
2629
ignoreCount = "0"
2730
continueAfterRunningActions = "No"
@@ -38,6 +41,7 @@
3841
<BreakpointProxy
3942
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
4043
<BreakpointContent
44+
uuid = "279506F9-248E-4103-8391-7D0571E73457"
4145
shouldBeEnabled = "No"
4246
ignoreCount = "0"
4347
continueAfterRunningActions = "No"
@@ -54,6 +58,7 @@
5458
<BreakpointProxy
5559
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
5660
<BreakpointContent
61+
uuid = "8CB30E67-1E7C-4F31-ABCC-1BC15BFD4250"
5762
shouldBeEnabled = "No"
5863
ignoreCount = "0"
5964
continueAfterRunningActions = "No"
@@ -70,6 +75,7 @@
7075
<BreakpointProxy
7176
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
7277
<BreakpointContent
78+
uuid = "F62B39C2-4B90-445D-A69A-369EA908D1A6"
7379
shouldBeEnabled = "No"
7480
ignoreCount = "0"
7581
continueAfterRunningActions = "No"
@@ -86,6 +92,7 @@
8692
<BreakpointProxy
8793
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
8894
<BreakpointContent
95+
uuid = "D8D13E63-5C24-462A-992A-A216CBE96B1F"
8996
shouldBeEnabled = "No"
9097
ignoreCount = "0"
9198
continueAfterRunningActions = "No"
@@ -102,6 +109,7 @@
102109
<BreakpointProxy
103110
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
104111
<BreakpointContent
112+
uuid = "18E670CE-C9DD-4694-83CB-38619F23B8AE"
105113
shouldBeEnabled = "No"
106114
ignoreCount = "0"
107115
continueAfterRunningActions = "No"
@@ -118,6 +126,7 @@
118126
<BreakpointProxy
119127
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
120128
<BreakpointContent
129+
uuid = "C4B9CB64-9A4F-455E-B5D4-D403B6CE4063"
121130
shouldBeEnabled = "No"
122131
ignoreCount = "0"
123132
continueAfterRunningActions = "No"
@@ -134,6 +143,7 @@
134143
<BreakpointProxy
135144
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
136145
<BreakpointContent
146+
uuid = "5AAFDF93-D080-4CCE-A844-C8BED9A3E2FE"
137147
shouldBeEnabled = "No"
138148
ignoreCount = "0"
139149
continueAfterRunningActions = "No"
@@ -147,6 +157,7 @@
147157
landmarkType = "7">
148158
<Locations>
149159
<Location
160+
uuid = "5AAFDF93-D080-4CCE-A844-C8BED9A3E2FE - 445733b358c4c609"
150161
shouldBeEnabled = "No"
151162
ignoreCount = "0"
152163
continueAfterRunningActions = "No"
@@ -162,6 +173,7 @@
162173
offsetFromSymbolStart = "568">
163174
</Location>
164175
<Location
176+
uuid = "5AAFDF93-D080-4CCE-A844-C8BED9A3E2FE - 445733b358c4c609"
165177
shouldBeEnabled = "No"
166178
ignoreCount = "0"
167179
continueAfterRunningActions = "No"
@@ -182,6 +194,7 @@
182194
<BreakpointProxy
183195
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
184196
<BreakpointContent
197+
uuid = "C6D0430D-F560-4AE8-BB17-8AF0F102BF0D"
185198
shouldBeEnabled = "No"
186199
ignoreCount = "0"
187200
continueAfterRunningActions = "No"
@@ -198,15 +211,16 @@
198211
<BreakpointProxy
199212
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
200213
<BreakpointContent
214+
uuid = "14E491DD-83B1-4115-B751-B2F06377D0C8"
201215
shouldBeEnabled = "No"
202216
ignoreCount = "0"
203217
continueAfterRunningActions = "No"
204218
filePath = "HW/API.swift"
205219
timestampString = "539741463.69707"
206220
startingColumnNumber = "9223372036854775807"
207221
endingColumnNumber = "9223372036854775807"
208-
startingLineNumber = "43"
209-
endingLineNumber = "43"
222+
startingLineNumber = "20"
223+
endingLineNumber = "20"
210224
landmarkName = "API"
211225
landmarkType = "3">
212226
</BreakpointContent>

HW.xcodeproj/xcuserdata/adriannenu.xcuserdatad/xcschemes/HW.xcscheme

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0920"
3+
LastUpgradeVersion = "1230"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,10 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
3029
shouldUseLaunchSchemeArgsEnv = "YES">
31-
<Testables>
32-
</Testables>
3330
<MacroExpansion>
3431
<BuildableReference
3532
BuildableIdentifier = "primary"
@@ -39,14 +36,13 @@
3936
ReferencedContainer = "container:HW.xcodeproj">
4037
</BuildableReference>
4138
</MacroExpansion>
42-
<AdditionalOptions>
43-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4441
</TestAction>
4542
<LaunchAction
4643
buildConfiguration = "Debug"
4744
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4845
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
49-
language = ""
5046
launchStyle = "0"
5147
useCustomWorkingDirectory = "NO"
5248
ignoresPersistentStateOnLaunch = "NO"
@@ -63,8 +59,6 @@
6359
ReferencedContainer = "container:HW.xcodeproj">
6460
</BuildableReference>
6561
</BuildableProductRunnable>
66-
<AdditionalOptions>
67-
</AdditionalOptions>
6862
</LaunchAction>
6963
<ProfileAction
7064
buildConfiguration = "Release"

HW/API.swift

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,14 @@
77
//
88

99
import Foundation
10-
import SwiftHTTP
11-
import SwiftyJSON
1210

13-
class API {
14-
private static var token: String = ""
15-
16-
static func request(method: HTTPVerb, params: [String : Any]? = nil, endpoint: String, callback: @escaping (_: JSON) -> Void) {
17-
Logging.info(data: "REQUEST: \(endpoint) \(String(describing: params))")
18-
19-
let opt = HTTP.New(endpoint, method: method, parameters: params, requestSerializer: JSONParameterSerializer())
2011

21-
opt?.run { response in
22-
if let err = response.error {
23-
print("error: \(err.localizedDescription)")
24-
return //also notify app of failure as needed
25-
}
26-
27-
do {
28-
let json = try JSON(data: response.data)
29-
30-
callback(json)
31-
} catch let error {
32-
print("got an error creating the request: \(error)")
33-
}
34-
}
35-
36-
37-
}
12+
class API {
3813

3914
static func get(endpoint: String, callback: @escaping (_: JSON) -> Void) {
40-
request(method: .GET, params: [:], endpoint: endpoint, callback: callback)
15+
APIHelper.get(path: endpoint, params: nil, completion: { (_, j) in
16+
callback(j!)
17+
})
4118
}
4219

4320
}

0 commit comments

Comments
 (0)