Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
// Created by Matt Heaney on 01/03/2025.
//

import AppKit
import SwiftUI

struct AppClipGeneratorView: View {

//MARK: Dependancies
//MARK: Dependencies

@State var viewModel = AppClipGeneratorViewModel()

Expand Down Expand Up @@ -155,12 +156,21 @@ struct AppClipGeneratorView: View {
ProgressView()
.scaleEffect(0.5)
}
}.frame(width: 200, height: 30)
}.frame(width: 250, height: 30)
}
.disabled(viewModel.state == .loading)

Button {
if let url = URL(string: "https://download.developer.apple.com/Developer_Tools/App_Clip_Code_Generator/App_Clip_Code_Generator.dmg") {
NSWorkspace.shared.open(url)
}
} label: {
Text("Download AppClipCodeGenerator")
.frame(width: 250, height: 30)
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link doesn't seem to work for me 👀

Can this button also only appear if the app cannot find the tool installed please. The if statement below where it shows the label should cover that logic.


if viewModel.shouldShowInstallationMessage {
Text("AppClipCodeGenerator from Apple is required to use this tool. Please download it from https://developer.apple.com/download")
Text("AppClipCodeGenerator from Apple is required to use this tool. You can find it and more about App Clips at https://developer.apple.com/app-clips/resources/")
.font(.caption2)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import SwiftUI
@Observable
class AppClipGeneratorViewModel {

//MARK: Dependancies
//MARK: Dependencies
let appClipToolManager = AppClipToolManager()
let appClipCodeManager = AppClipCodeManager()

Expand Down