Skip to content

Commit 7737fae

Browse files
authored
Merge pull request #4 from r-token/3.0
Version 3.0
2 parents b771199 + 8a823ec commit 7737fae

File tree

51 files changed

+2519
-1756
lines changed

Some content is hidden

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

51 files changed

+2519
-1756
lines changed

CatchUp-SwiftUI.xcodeproj/project.pbxproj

Lines changed: 126 additions & 120 deletions
Large diffs are not rendered by default.

CatchUp-SwiftUI.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 12 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1530"
4+
version = "2.2">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<AutocreatedTestPlanReference>
16+
</AutocreatedTestPlanReference>
17+
</BuildActionEntry>
18+
</BuildActionEntries>
19+
</BuildAction>
20+
<TestAction
21+
buildConfiguration = "Debug"
22+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
23+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
24+
shouldUseLaunchSchemeArgsEnv = "YES"
25+
shouldAutocreateTestPlan = "YES">
26+
</TestAction>
27+
<LaunchAction
28+
buildConfiguration = "Debug"
29+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
30+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
31+
launchStyle = "0"
32+
useCustomWorkingDirectory = "NO"
33+
ignoresPersistentStateOnLaunch = "NO"
34+
debugDocumentVersioning = "YES"
35+
debugServiceExtension = "internal"
36+
allowLocationSimulation = "YES">
37+
<BuildableProductRunnable
38+
runnableDebuggingMode = "0">
39+
<BuildableReference
40+
BuildableIdentifier = "primary"
41+
BlueprintIdentifier = "F48E37ED22C455C3008B0B8B"
42+
BuildableName = "CatchUp.app"
43+
BlueprintName = "CatchUp-SwiftUI"
44+
ReferencedContainer = "container:CatchUp-SwiftUI.xcodeproj">
45+
</BuildableReference>
46+
</BuildableProductRunnable>
47+
<CommandLineArguments>
48+
<CommandLineArgument
49+
argument = "-com.apple.CoreData.CloudKitDebug 0"
50+
isEnabled = "YES">
51+
</CommandLineArgument>
52+
<CommandLineArgument
53+
argument = "-com.apple.CoreData.Logging.stderr 0"
54+
isEnabled = "YES">
55+
</CommandLineArgument>
56+
</CommandLineArguments>
57+
</LaunchAction>
58+
<ProfileAction
59+
buildConfiguration = "Release"
60+
shouldUseLaunchSchemeArgsEnv = "YES"
61+
savedToolIdentifier = ""
62+
useCustomWorkingDirectory = "NO"
63+
debugDocumentVersioning = "YES">
64+
<MacroExpansion>
65+
<BuildableReference
66+
BuildableIdentifier = "primary"
67+
BlueprintIdentifier = "F48E37ED22C455C3008B0B8B"
68+
BuildableName = "CatchUp.app"
69+
BlueprintName = "CatchUp-SwiftUI"
70+
ReferencedContainer = "container:CatchUp-SwiftUI.xcodeproj">
71+
</BuildableReference>
72+
</MacroExpansion>
73+
</ProfileAction>
74+
<AnalyzeAction
75+
buildConfiguration = "Debug">
76+
</AnalyzeAction>
77+
<ArchiveAction
78+
buildConfiguration = "Release"
79+
revealArchiveInOrganizer = "YES">
80+
</ArchiveAction>
81+
</Scheme>

CatchUp-SwiftUI/AppDelegate.swift

Lines changed: 0 additions & 93 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info" : {
3-
"version" : 1,
4-
"author" : "xcode"
3+
"author" : "xcode",
4+
"version" : 1
55
}
6-
}
6+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "0x00",
9+
"green" : "0x00",
10+
"red" : "0x00"
11+
}
12+
},
13+
"idiom" : "universal"
14+
},
15+
{
16+
"appearances" : [
17+
{
18+
"appearance" : "luminosity",
19+
"value" : "dark"
20+
}
21+
],
22+
"color" : {
23+
"color-space" : "srgb",
24+
"components" : {
25+
"alpha" : "1.000",
26+
"blue" : "0x00",
27+
"green" : "0x00",
28+
"red" : "0x00"
29+
}
30+
},
31+
"idiom" : "universal"
32+
}
33+
],
34+
"info" : {
35+
"author" : "xcode",
36+
"version" : 1
37+
}
38+
}

CatchUp-SwiftUI/Base.lproj/LaunchScreen.storyboard

Lines changed: 0 additions & 26 deletions
This file was deleted.

CatchUp-SwiftUI/CatchUp-SwiftUI.entitlements

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>aps-environment</key>
6+
<string>development</string>
7+
<key>com.apple.developer.icloud-container-identifiers</key>
8+
<array>
9+
<string>iCloud.com.ryantoken.CatchUp</string>
10+
</array>
11+
<key>com.apple.developer.icloud-services</key>
12+
<array>
13+
<string>CloudKit</string>
14+
</array>
515
<key>com.apple.security.app-sandbox</key>
616
<true/>
717
<key>com.apple.security.network.client</key>

CatchUp-SwiftUI/CatchUpApp.swift

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// CatchUpApp.swift
3+
// CatchUp-SwiftUI
4+
//
5+
// Created by Ryan Token on 3/3/24.
6+
// Copyright © 2024 Token Solutions. All rights reserved.
7+
//
8+
9+
import SwiftData
10+
import SwiftUI
11+
12+
@main
13+
struct CatchUpApp: App {
14+
// use the SQLite file created by Core Data originally, instead of SwiftData's default.store file
15+
let url = URL.applicationSupportDirectory.appending(path: "CatchUp-SwiftUI.sqlite")
16+
let modelContainer: ModelContainer
17+
18+
@State private var dataController = DataController()
19+
20+
init() {
21+
do {
22+
modelContainer = try ModelContainer(
23+
for: SelectedContact.self,
24+
configurations: ModelConfiguration(url: url))
25+
} catch {
26+
fatalError("Failed to initialize model container.")
27+
}
28+
}
29+
30+
var body: some Scene {
31+
WindowGroup {
32+
NavigationSplitView {
33+
HomeScreen()
34+
} detail: {
35+
if let selectedContact = dataController.selectedContact {
36+
DetailScreen(contact: selectedContact)
37+
} else {
38+
NoContactSelectedScreen()
39+
}
40+
}
41+
.environment(dataController)
42+
.accentColor(.orange)
43+
}
44+
.modelContainer(modelContainer)
45+
}
46+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.files.user-selected.read-only</key>
8+
<true/>
9+
</dict>
10+
</plist>

CatchUp-SwiftUI/CoreData/CatchUp-SwiftUI.xcdatamodeld/CatchUp_SwiftUI.xcdatamodel/contents

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="16119" systemVersion="19E287" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
2+
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="22522" systemVersion="23D60" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithSwiftData="YES" userDefinedModelVersionIdentifier="">
33
<entity name="SelectedContact" representedClassName="SelectedContact" syncable="YES">
44
<attribute name="address" optional="YES" attributeType="String"/>
55
<attribute name="anniversary" optional="YES" attributeType="String"/>
@@ -23,7 +23,4 @@
2323
<attribute name="secondary_email" optional="YES" attributeType="String"/>
2424
<attribute name="secondary_phone" optional="YES" attributeType="String"/>
2525
</entity>
26-
<elements>
27-
<element name="SelectedContact" positionX="-63" positionY="-18" width="128" height="28"/>
28-
</elements>
2926
</model>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// DataController.swift
3+
// CatchUp-SwiftUI
4+
//
5+
// Created by Ryan Token on 3/31/24.
6+
// Copyright © 2024 Token Solutions. All rights reserved.
7+
//
8+
9+
import Foundation
10+
11+
@Observable
12+
class DataController {
13+
var selectedContact: SelectedContact?
14+
}

0 commit comments

Comments
 (0)