-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ScribbleLabApp/auth
Create AppClip and create Reset Password View
- Loading branch information
Showing
27 changed files
with
814 additions
and
253 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
ScribbleLab AppClip/Assets.xcassets/AccentColor.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
ScribbleLab AppClip/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"platform" : "ios", | ||
"size" : "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// | ||
// ContentView.swift | ||
// ScribbleLab AppClip | ||
// | ||
// Created by Nevio Hirani on 01.11.23. | ||
// | ||
|
||
import SwiftUI | ||
import SwiftData | ||
|
||
struct ContentView: View { | ||
@Environment(\.modelContext) private var modelContext | ||
@Query private var items: [Item] | ||
|
||
var body: some View { | ||
NavigationSplitView { | ||
List { | ||
ForEach(items) { item in | ||
NavigationLink { | ||
Text("Item at \(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))") | ||
} label: { | ||
Text(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard)) | ||
} | ||
} | ||
.onDelete(perform: deleteItems) | ||
} | ||
.toolbar { | ||
ToolbarItem(placement: .navigationBarTrailing) { | ||
EditButton() | ||
} | ||
ToolbarItem { | ||
Button(action: addItem) { | ||
Label("Add Item", systemImage: "plus") | ||
} | ||
} | ||
} | ||
} detail: { | ||
Text("Select an item") | ||
} | ||
} | ||
|
||
private func addItem() { | ||
withAnimation { | ||
let newItem = Item(timestamp: Date()) | ||
modelContext.insert(newItem) | ||
} | ||
} | ||
|
||
private func deleteItems(offsets: IndexSet) { | ||
withAnimation { | ||
for index in offsets { | ||
modelContext.delete(items[index]) | ||
} | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
ContentView() | ||
.modelContainer(for: Item.self, inMemory: true) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Item.swift | ||
// ScribbleLab AppClip | ||
// | ||
// Created by Nevio Hirani on 01.11.23. | ||
// | ||
|
||
import Foundation | ||
import SwiftData | ||
|
||
@Model | ||
final class Item { | ||
var timestamp: Date | ||
|
||
init(timestamp: Date) { | ||
self.timestamp = timestamp | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
ScribbleLab AppClip/Preview Content/Preview Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.developer.parent-application-identifiers</key> | ||
<array> | ||
<string>$(AppIdentifierPrefix)com.nhstudio.ScribbleLab</string> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// ScribbleLab_AppClipApp.swift | ||
// ScribbleLab AppClip | ||
// | ||
// Created by Nevio Hirani on 01.11.23. | ||
// | ||
|
||
import SwiftUI | ||
import SwiftData | ||
|
||
@main | ||
struct ScribbleLab_AppClipApp: App { | ||
var sharedModelContainer: ModelContainer = { | ||
let schema = Schema([ | ||
Item.self, | ||
]) | ||
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) | ||
|
||
do { | ||
return try ModelContainer(for: schema, configurations: [modelConfiguration]) | ||
} catch { | ||
fatalError("Could not create ModelContainer: \(error)") | ||
} | ||
}() | ||
|
||
var body: some Scene { | ||
WindowGroup { | ||
ContentView() | ||
} | ||
.modelContainer(sharedModelContainer) | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.