Skip to content

Commit 46fdae4

Browse files
Update Version Number to 1.4.0
1 parent 462ee15 commit 46fdae4

File tree

13 files changed

+848
-138
lines changed

13 files changed

+848
-138
lines changed
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: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
"info" : {
32+
"author" : "xcode",
33+
"version" : 1
34+
}
35+
}
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+
}
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+
}

QRControl/Info.plist

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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>NSExtension</key>
6+
<dict>
7+
<key>NSExtensionPointIdentifier</key>
8+
<string>com.apple.widgetkit-extension</string>
9+
</dict>
10+
</dict>
11+
</plist>

QRControl/QRControl.swift

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//
2+
// QRControl.swift
3+
// QRControl
4+
//
5+
// Created by Vaibhav Satishkumar on 3/19/25.
6+
//
7+
8+
import WidgetKit
9+
import SwiftUI
10+
11+
// Note: WidgetKit requires a TimelineProvider with TimelineEntry
12+
// This is the absolute minimum implementation required
13+
struct Provider: TimelineProvider {
14+
struct Entry: TimelineEntry { let date = Date() }
15+
16+
func placeholder(in context: Context) -> Entry { Entry() }
17+
func getSnapshot(in context: Context, completion: @escaping (Entry) -> ()) { completion(Entry()) }
18+
func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) {
19+
completion(Timeline(entries: [Entry()], policy: .never))
20+
}
21+
}
22+
23+
struct QRControl: Widget {
24+
let kind: String = "QRControl"
25+
26+
var body: some WidgetConfiguration {
27+
StaticConfiguration(kind: kind, provider: Provider()) { _ in
28+
// Simple QR code UI
29+
VStack {
30+
Image(systemName: "qrcode.viewfinder")
31+
.font(.system(size: 40))
32+
.foregroundColor(.blue)
33+
34+
Text("Scan QR Code")
35+
.font(.caption)
36+
}
37+
.containerBackground(.fill.tertiary, for: .widget)
38+
}
39+
.configurationDisplayName("QR Scanner")
40+
.description("Quick access to scan QR codes")
41+
.supportedFamilies([.systemSmall])
42+
}
43+
}

QRControl/QRControlBundle.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// QRControlBundle.swift
3+
// QRControl
4+
//
5+
// Created by Vaibhav Satishkumar on 3/19/25.
6+
//
7+
8+
import WidgetKit
9+
import SwiftUI
10+
11+
@main
12+
struct QRControlBundle: WidgetBundle {
13+
var body: some Widget {
14+
QRControl()
15+
QRControlControl()
16+
}
17+
}

QRControl/QRControlControl.swift

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//
2+
// QRControlControl.swift
3+
// QRControl
4+
//
5+
// Created by Vaibhav Satishkumar on 3/19/25.
6+
//
7+
8+
import AppIntents
9+
import SwiftUI
10+
import WidgetKit
11+
12+
struct QRControlControl: ControlWidget {
13+
var body: some ControlWidgetConfiguration {
14+
StaticControlConfiguration(
15+
kind: "com.click.QRShare.QRControl"
16+
) {
17+
ControlWidgetButton(action: ScanQRCodeIntent()) {
18+
Label("Scan QR Code", systemImage: "qrcode.viewfinder")
19+
}
20+
}
21+
.displayName("Scan QR Code")
22+
.description("Quickly open the QR Share Pro QR code scanner.")
23+
}
24+
}
25+
26+
struct ScanQRCodeIntent: AppIntent {
27+
static var title: LocalizedStringResource = "Scan QR Code"
28+
29+
func perform() async throws -> some IntentResult {
30+
// When this intent is performed, it will launch your app
31+
// The app can then detect that it was launched from this intent
32+
// and navigate to the QR scanner
33+
return .result()
34+
}
35+
}

0 commit comments

Comments
 (0)