Skip to content

Commit 5b25b4d

Browse files
committed
Add demo app
1 parent 5991cd7 commit 5b25b4d

File tree

11 files changed

+862
-0
lines changed

11 files changed

+862
-0
lines changed

Demo/Demo.xcodeproj/project.pbxproj

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

Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"platform" : "ios",
6+
"size" : "1024x1024"
7+
},
8+
{
9+
"appearances" : [
10+
{
11+
"appearance" : "luminosity",
12+
"value" : "dark"
13+
}
14+
],
15+
"idiom" : "universal",
16+
"platform" : "ios",
17+
"size" : "1024x1024"
18+
},
19+
{
20+
"appearances" : [
21+
{
22+
"appearance" : "luminosity",
23+
"value" : "tinted"
24+
}
25+
],
26+
"idiom" : "universal",
27+
"platform" : "ios",
28+
"size" : "1024x1024"
29+
},
30+
{
31+
"idiom" : "mac",
32+
"scale" : "1x",
33+
"size" : "16x16"
34+
},
35+
{
36+
"idiom" : "mac",
37+
"scale" : "2x",
38+
"size" : "16x16"
39+
},
40+
{
41+
"idiom" : "mac",
42+
"scale" : "1x",
43+
"size" : "32x32"
44+
},
45+
{
46+
"idiom" : "mac",
47+
"scale" : "2x",
48+
"size" : "32x32"
49+
},
50+
{
51+
"idiom" : "mac",
52+
"scale" : "1x",
53+
"size" : "128x128"
54+
},
55+
{
56+
"idiom" : "mac",
57+
"scale" : "2x",
58+
"size" : "128x128"
59+
},
60+
{
61+
"idiom" : "mac",
62+
"scale" : "1x",
63+
"size" : "256x256"
64+
},
65+
{
66+
"idiom" : "mac",
67+
"scale" : "2x",
68+
"size" : "256x256"
69+
},
70+
{
71+
"idiom" : "mac",
72+
"scale" : "1x",
73+
"size" : "512x512"
74+
},
75+
{
76+
"idiom" : "mac",
77+
"scale" : "2x",
78+
"size" : "512x512"
79+
}
80+
],
81+
"info" : {
82+
"author" : "xcode",
83+
"version" : 1
84+
}
85+
}
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+
}

Demo/Demo/ContentView.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//
2+
// ContentView.swift
3+
// Demo
4+
//
5+
// Created by Chen Hai Teng on 4/21/25.
6+
//
7+
8+
import SwiftUI
9+
import CoreGraphicsExtension
10+
11+
struct ContentView: View {
12+
var body: some View {
13+
VStack {
14+
Image(systemName: "globe")
15+
.imageScale(.large)
16+
.foregroundStyle(.tint)
17+
Text("Hello, world!")
18+
}
19+
.padding()
20+
}
21+
}
22+
23+
#Preview {
24+
ContentView()
25+
}

Demo/Demo/Demo.entitlements

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>

Demo/Demo/DemoApp.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// DemoApp.swift
3+
// Demo
4+
//
5+
// Created by Chen Hai Teng on 4/21/25.
6+
//
7+
8+
import SwiftUI
9+
10+
@main
11+
struct DemoApp: App {
12+
var body: some Scene {
13+
WindowGroup {
14+
ContentView()
15+
}
16+
}
17+
}

Demo/DemoTests/DemoTests.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// DemoTests.swift
3+
// DemoTests
4+
//
5+
// Created by Chen Hai Teng on 4/21/25.
6+
//
7+
8+
import Testing
9+
10+
struct DemoTests {
11+
12+
@Test func example() async throws {
13+
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
14+
}
15+
16+
}

Demo/DemoUITests/DemoUITests.swift

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// DemoUITests.swift
3+
// DemoUITests
4+
//
5+
// Created by Chen Hai Teng on 4/21/25.
6+
//
7+
8+
import XCTest
9+
10+
final class DemoUITests: XCTestCase {
11+
12+
override func setUpWithError() throws {
13+
// Put setup code here. This method is called before the invocation of each test method in the class.
14+
15+
// In UI tests it is usually best to stop immediately when a failure occurs.
16+
continueAfterFailure = false
17+
18+
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
19+
}
20+
21+
override func tearDownWithError() throws {
22+
// Put teardown code here. This method is called after the invocation of each test method in the class.
23+
}
24+
25+
@MainActor
26+
func testExample() throws {
27+
// UI tests must launch the application that they test.
28+
let app = XCUIApplication()
29+
app.launch()
30+
31+
// Use XCTAssert and related functions to verify your tests produce the correct results.
32+
}
33+
34+
@MainActor
35+
func testLaunchPerformance() throws {
36+
// This measures how long it takes to launch your application.
37+
measure(metrics: [XCTApplicationLaunchMetric()]) {
38+
XCUIApplication().launch()
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)