Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit ad315cf

Browse files
committed
0 parents  commit ad315cf

File tree

22 files changed

+1160
-0
lines changed

22 files changed

+1160
-0
lines changed

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Xcode
2+
#
3+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4+
5+
## User settings
6+
xcuserdata/
7+
8+
## Obj-C/Swift specific
9+
*.hmap
10+
11+
## App packaging
12+
*.ipa
13+
*.dSYM.zip
14+
*.dSYM
15+
16+
# Swift Package Manager
17+
#
18+
Packages/
19+
Package.pins
20+
Package.resolved
21+
22+
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
23+
# hence it is not needed unless you have added a package configuration file to your project
24+
# .swiftpm
25+
26+
.build/
27+
28+
# fastlane
29+
#
30+
# It is recommended to not store the screenshots in the git repo.
31+
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
32+
# For more information about the recommended setup visit:
33+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
34+
35+
fastlane/report.xml
36+
fastlane/Preview.html
37+
fastlane/screenshots/**/*.png
38+
fastlane/test_output
39+
40+
# Code Injection
41+
#
42+
# After new code Injection tools there's a generated folder /iOSInjectionProject
43+
# https://github.com/johnno1962/injectionforxcode
44+
45+
iOSInjectionProject/
46+
47+
# Workspace data
48+
49+
project.xcworkspace/

App.xcodeproj/project.pbxproj

Lines changed: 437 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1320"
4+
version = "1.3">
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+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "913D46462770E46800ABE7D3"
18+
BuildableName = "App.app"
19+
BlueprintName = "App"
20+
ReferencedContainer = "container:App.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "913D46462770E46800ABE7D3"
48+
BuildableName = "App.app"
49+
BlueprintName = "App"
50+
ReferencedContainer = "container:App.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "913D46462770E46800ABE7D3"
65+
BuildableName = "App.app"
66+
BlueprintName = "App"
67+
ReferencedContainer = "container:App.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

App/AppConfig.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import Foundation
2+
import RealmSwift
3+
4+
/// Store the Realm app details to use when instantiating the app and
5+
/// when using the `@AsyncOpen` property wrapper to open the realm.
6+
struct AppConfig {
7+
var appId: String
8+
var baseUrl: String
9+
}
10+
11+
12+
/// Read the Realm.plist file and store the app ID and baseUrl to use elsewhere.
13+
func loadAppConfig() -> AppConfig {
14+
guard let path = Bundle.main.path(forResource: "Realm", ofType: "plist") else {
15+
fatalError("Could not load Realm.plist file!")
16+
}
17+
// Any errors here indicate that the Realm.plist file has not been formatted properly.
18+
// Expected key/values:
19+
// "appId": "your Realm app ID"
20+
let data = NSData(contentsOfFile: path)! as Data
21+
let realmPropertyList = try! PropertyListSerialization.propertyList(from: data, format: nil) as! [String: Any]
22+
let appId = realmPropertyList["appId"]! as! String
23+
let baseUrl = realmPropertyList["baseUrl"]! as! String
24+
return AppConfig(appId: appId, baseUrl: baseUrl)
25+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"scale" : "2x",
6+
"size" : "20x20"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"scale" : "3x",
11+
"size" : "20x20"
12+
},
13+
{
14+
"idiom" : "iphone",
15+
"scale" : "2x",
16+
"size" : "29x29"
17+
},
18+
{
19+
"idiom" : "iphone",
20+
"scale" : "3x",
21+
"size" : "29x29"
22+
},
23+
{
24+
"idiom" : "iphone",
25+
"scale" : "2x",
26+
"size" : "40x40"
27+
},
28+
{
29+
"idiom" : "iphone",
30+
"scale" : "3x",
31+
"size" : "40x40"
32+
},
33+
{
34+
"idiom" : "iphone",
35+
"scale" : "2x",
36+
"size" : "60x60"
37+
},
38+
{
39+
"idiom" : "iphone",
40+
"scale" : "3x",
41+
"size" : "60x60"
42+
},
43+
{
44+
"idiom" : "ipad",
45+
"scale" : "1x",
46+
"size" : "20x20"
47+
},
48+
{
49+
"idiom" : "ipad",
50+
"scale" : "2x",
51+
"size" : "20x20"
52+
},
53+
{
54+
"idiom" : "ipad",
55+
"scale" : "1x",
56+
"size" : "29x29"
57+
},
58+
{
59+
"idiom" : "ipad",
60+
"scale" : "2x",
61+
"size" : "29x29"
62+
},
63+
{
64+
"idiom" : "ipad",
65+
"scale" : "1x",
66+
"size" : "40x40"
67+
},
68+
{
69+
"idiom" : "ipad",
70+
"scale" : "2x",
71+
"size" : "40x40"
72+
},
73+
{
74+
"idiom" : "ipad",
75+
"scale" : "1x",
76+
"size" : "76x76"
77+
},
78+
{
79+
"idiom" : "ipad",
80+
"scale" : "2x",
81+
"size" : "76x76"
82+
},
83+
{
84+
"idiom" : "ipad",
85+
"scale" : "2x",
86+
"size" : "83.5x83.5"
87+
},
88+
{
89+
"idiom" : "ios-marketing",
90+
"scale" : "1x",
91+
"size" : "1024x1024"
92+
}
93+
],
94+
"info" : {
95+
"author" : "xcode",
96+
"version" : 1
97+
}
98+
}

App/Assets.xcassets/Contents.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

App/Item.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import RealmSwift
2+
3+
class Item: Object, ObjectKeyIdentifiable {
4+
@Persisted(primaryKey: true) var _id: ObjectId
5+
@Persisted var isComplete = false
6+
@Persisted var summary: String
7+
@Persisted var owner_id: String
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

App/Realm.plist

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>baseUrl</key>
6+
<string>https://realm.mongodb.com</string>
7+
<key>appId</key>
8+
<string>todo-sync-pcmwt</string>
9+
</dict>
10+
</plist>

0 commit comments

Comments
 (0)