Skip to content

Commit d4d8bc6

Browse files
committed
Codebase improvements and Swiftlint addition
1 parent 7fc0385 commit d4d8bc6

File tree

89 files changed

+2238
-2562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2238
-2562
lines changed
Lines changed: 42 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
11

2-
# Created by https://www.gitignore.io/api/xcode,swift
3-
# Edit at https://www.gitignore.io/?templates=xcode,swift
2+
# Created by https://www.toptal.com/developers/gitignore/api/xcode,cocoapods,carthage,swift
3+
# Edit at https://www.toptal.com/developers/gitignore?templates=xcode,cocoapods,carthage,swift
4+
5+
### Carthage ###
6+
# Carthage
7+
#
8+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
9+
# Carthage/Checkouts
10+
11+
Carthage/Build
12+
13+
### CocoaPods ###
14+
## CocoaPods GitIgnore Template
15+
16+
# CocoaPods - Only use to conserve bandwidth / Save time on Pushing
17+
# - Also handy if you have a large number of dependant pods
18+
# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE
19+
Pods/
420

521
### Swift ###
622
# Xcode
7-
#
823
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
924

10-
## Build generated
25+
## User settings
26+
xcuserdata/
27+
28+
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
29+
*.xcscmblueprint
30+
*.xccheckout
31+
32+
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
1133
build/
1234
DerivedData/
13-
14-
## Various settings
35+
*.moved-aside
1536
*.pbxuser
1637
!default.pbxuser
1738
*.mode1v3
@@ -20,15 +41,11 @@ DerivedData/
2041
!default.mode2v3
2142
*.perspectivev3
2243
!default.perspectivev3
23-
xcuserdata/
24-
25-
## Other
26-
*.moved-aside
27-
*.xccheckout
28-
*.xcscmblueprint
2944

3045
## Obj-C/Swift specific
3146
*.hmap
47+
48+
## App packaging
3249
*.ipa
3350
*.dSYM.zip
3451
*.dSYM
@@ -42,9 +59,12 @@ playground.xcworkspace
4259
# Packages/
4360
# Package.pins
4461
# Package.resolved
62+
# *.xcodeproj
63+
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
64+
# hence it is not needed unless you have added a package configuration file to your project
65+
# .swiftpm
66+
4567
.build/
46-
# Add this line if you want to avoid checking in Xcode SPM integration.
47-
# .swiftpm/xcode
4868

4969
# CocoaPods
5070
# We recommend against adding the Pods directory to your .gitignore. However
@@ -58,15 +78,15 @@ playground.xcworkspace
5878
# Add this line if you want to avoid checking in source code from Carthage dependencies.
5979
# Carthage/Checkouts
6080

61-
Carthage/Build
81+
Carthage/Build/
6282

6383
# Accio dependency management
6484
Dependencies/
6585
.accio/
6686

6787
# fastlane
68-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
69-
# screenshots whenever they are needed.
88+
# It is recommended to not store the screenshots in the git repo.
89+
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
7090
# For more information about the recommended setup visit:
7191
# https://docs.fastlane.tools/best-practices/source-control/#source-control
7292

@@ -85,20 +105,17 @@ iOSInjectionProject/
85105
# Xcode
86106
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
87107

88-
## User settings
89108

90-
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
91109

92-
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
93110

94-
## Xcode Patch
111+
## Gcc Patch
112+
/*.gcno
113+
114+
### Xcode Patch ###
95115
*.xcodeproj/*
96116
!*.xcodeproj/project.pbxproj
97117
!*.xcodeproj/xcshareddata/
98118
!*.xcworkspace/contents.xcworkspacedata
99-
/*.gcno
100-
101-
### Xcode Patch ###
102119
**/xcshareddata/WorkspaceSettings.xcsettings
103120

104-
# End of https://www.gitignore.io/api/xcode,swift
121+
# End of https://www.toptal.com/developers/gitignore/api/xcode,cocoapods,carthage,swift

Example/NestedCloudKitCodable.xcodeproj/project.pbxproj

Lines changed: 1018 additions & 0 deletions
Large diffs are not rendered by default.

NestedCloudKitCodable.xcodeproj/xcshareddata/xcschemes/NestedCKCodableWatch.xcscheme renamed to Example/NestedCloudKitCodable.xcodeproj/xcshareddata/xcschemes/NestedCloudKitCodable-Example.xcscheme

Lines changed: 34 additions & 37 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 = "1130"
3+
LastUpgradeVersion = "1160"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -14,23 +14,23 @@
1414
buildForAnalyzing = "YES">
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
17-
BlueprintIdentifier = "635FE22A21B05D6300C2BC5F"
18-
BuildableName = "NestedCKCodableWatch.app"
19-
BlueprintName = "NestedCKCodableWatch"
17+
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
18+
BuildableName = "NestedCloudKitCodable_Example.app"
19+
BlueprintName = "NestedCloudKitCodable_Example"
2020
ReferencedContainer = "container:NestedCloudKitCodable.xcodeproj">
2121
</BuildableReference>
2222
</BuildActionEntry>
2323
<BuildActionEntry
2424
buildForTesting = "YES"
2525
buildForRunning = "YES"
26-
buildForProfiling = "YES"
27-
buildForArchiving = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
2828
buildForAnalyzing = "YES">
2929
<BuildableReference
3030
BuildableIdentifier = "primary"
31-
BlueprintIdentifier = "631B89FF21A6E4FB0045FADC"
32-
BuildableName = "NestedCKCodableExamples.app"
33-
BlueprintName = "NestedCKCodableExamples"
31+
BlueprintIdentifier = "607FACE41AFB9204008FA782"
32+
BuildableName = "NestedCloudKitCodable_Tests.xctest"
33+
BlueprintName = "NestedCloudKitCodable_Tests"
3434
ReferencedContainer = "container:NestedCloudKitCodable.xcodeproj">
3535
</BuildableReference>
3636
</BuildActionEntry>
@@ -44,13 +44,23 @@
4444
<MacroExpansion>
4545
<BuildableReference
4646
BuildableIdentifier = "primary"
47-
BlueprintIdentifier = "635FE22A21B05D6300C2BC5F"
48-
BuildableName = "NestedCKCodableWatch.app"
49-
BlueprintName = "NestedCKCodableWatch"
47+
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
48+
BuildableName = "NestedCloudKitCodable_Example.app"
49+
BlueprintName = "NestedCloudKitCodable_Example"
5050
ReferencedContainer = "container:NestedCloudKitCodable.xcodeproj">
5151
</BuildableReference>
5252
</MacroExpansion>
5353
<Testables>
54+
<TestableReference
55+
skipped = "NO">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "607FACE41AFB9204008FA782"
59+
BuildableName = "NestedCloudKitCodable_Tests.xctest"
60+
BlueprintName = "NestedCloudKitCodable_Tests"
61+
ReferencedContainer = "container:NestedCloudKitCodable.xcodeproj">
62+
</BuildableReference>
63+
</TestableReference>
5464
</Testables>
5565
</TestAction>
5666
<LaunchAction
@@ -63,46 +73,33 @@
6373
debugDocumentVersioning = "YES"
6474
debugServiceExtension = "internal"
6575
allowLocationSimulation = "YES">
66-
<RemoteRunnable
67-
runnableDebuggingMode = "2"
68-
BundleIdentifier = "com.apple.Carousel"
69-
RemotePath = "/NestedCKCodableExamples">
76+
<BuildableProductRunnable
77+
runnableDebuggingMode = "0">
7078
<BuildableReference
7179
BuildableIdentifier = "primary"
72-
BlueprintIdentifier = "635FE22A21B05D6300C2BC5F"
73-
BuildableName = "NestedCKCodableWatch.app"
74-
BlueprintName = "NestedCKCodableWatch"
80+
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
81+
BuildableName = "NestedCloudKitCodable_Example.app"
82+
BlueprintName = "NestedCloudKitCodable_Example"
7583
ReferencedContainer = "container:NestedCloudKitCodable.xcodeproj">
7684
</BuildableReference>
77-
</RemoteRunnable>
85+
</BuildableProductRunnable>
7886
</LaunchAction>
7987
<ProfileAction
8088
buildConfiguration = "Release"
8189
shouldUseLaunchSchemeArgsEnv = "YES"
8290
savedToolIdentifier = ""
8391
useCustomWorkingDirectory = "NO"
8492
debugDocumentVersioning = "YES">
85-
<RemoteRunnable
86-
runnableDebuggingMode = "2"
87-
BundleIdentifier = "com.apple.Carousel"
88-
RemotePath = "/NestedCKCodableExamples">
93+
<BuildableProductRunnable
94+
runnableDebuggingMode = "0">
8995
<BuildableReference
9096
BuildableIdentifier = "primary"
91-
BlueprintIdentifier = "635FE22A21B05D6300C2BC5F"
92-
BuildableName = "NestedCKCodableWatch.app"
93-
BlueprintName = "NestedCKCodableWatch"
97+
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
98+
BuildableName = "NestedCloudKitCodable_Example.app"
99+
BlueprintName = "NestedCloudKitCodable_Example"
94100
ReferencedContainer = "container:NestedCloudKitCodable.xcodeproj">
95101
</BuildableReference>
96-
</RemoteRunnable>
97-
<MacroExpansion>
98-
<BuildableReference
99-
BuildableIdentifier = "primary"
100-
BlueprintIdentifier = "635FE22A21B05D6300C2BC5F"
101-
BuildableName = "NestedCKCodableWatch.app"
102-
BlueprintName = "NestedCKCodableWatch"
103-
ReferencedContainer = "container:NestedCloudKitCodable.xcodeproj">
104-
</BuildableReference>
105-
</MacroExpansion>
102+
</BuildableProductRunnable>
106103
</ProfileAction>
107104
<AnalyzeAction
108105
buildConfiguration = "Debug">

Example/NestedCloudKitCodable.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// AppDelegate.swift
3+
// NestedCloudKitCodable
4+
//
5+
// Created by ggirotto on 08/25/2020.
6+
// Copyright (c) 2020 ggirotto. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
@UIApplicationMain
12+
class AppDelegate: UIResponder, UIApplicationDelegate {
13+
14+
var window: UIWindow?
15+
16+
func application(_ application: UIApplication,
17+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18+
// Override point for customization after application launch.
19+
return true
20+
}
21+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
3+
<device id="retina4_7" orientation="portrait">
4+
<adaptation id="fullscreen"/>
5+
</device>
6+
<dependencies>
7+
<deployment identifier="iOS"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
9+
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
10+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
11+
</dependencies>
12+
<objects>
13+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
14+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
15+
<view contentMode="scaleToFill" id="iN0-l3-epB">
16+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
17+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18+
<subviews>
19+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 CocoaPods. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
20+
<rect key="frame" x="20" y="439" width="441" height="21"/>
21+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
22+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
23+
<nil key="highlightedColor"/>
24+
</label>
25+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="NestedCloudKitCodable" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
26+
<rect key="frame" x="20" y="140" width="441" height="43"/>
27+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
28+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
29+
<nil key="highlightedColor"/>
30+
</label>
31+
</subviews>
32+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
33+
<constraints>
34+
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
35+
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
36+
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
37+
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
38+
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
39+
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
40+
</constraints>
41+
<nil key="simulatedStatusBarMetrics"/>
42+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
43+
<point key="canvasLocation" x="548" y="455"/>
44+
</view>
45+
</objects>
46+
</document>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
3+
<device id="retina4_7" orientation="portrait">
4+
<adaptation id="fullscreen"/>
5+
</device>
6+
<dependencies>
7+
<deployment identifier="iOS"/>
8+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
9+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10+
</dependencies>
11+
<scenes>
12+
<!--View Controller-->
13+
<scene sceneID="ufC-wZ-h7g">
14+
<objects>
15+
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="NestedCloudKitCodable_Example" customModuleProvider="target" sceneMemberID="viewController">
16+
<layoutGuides>
17+
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
18+
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
19+
</layoutGuides>
20+
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
21+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
22+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
23+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
24+
</view>
25+
</viewController>
26+
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
27+
</objects>
28+
</scene>
29+
</scenes>
30+
</document>

0 commit comments

Comments
 (0)