I have set Xcode preference Command line Tools to Xcode14.0, but is not work,
so What's wrong with me?Environment configuration or certificate authority ?
This is My Code :
import Foundation
import SwiftUI
import AppIntents
struct ShowMyProgressIntent: AppIntent {
static var title: LocalizedStringResource = "Show Sport Progress"
@MainActor
func perform() async throws -> some IntentPerformResult {
return .finished {
ProgressView()
}
}
}
struct StartSportActivityIntent: AppIntent {
static var title: LocalizedStringResource = "Start Sport Activity"
static var openAppWhenRun: Bool = true // Open app directly
@Parameter(title: "Activity")
var activity: SportActivity
@MainActor
func perform() async throws -> some IntentPerformResult {
let model = SportActivityModel(type: activity)
ViewModel.shared.navigateTo(model: model)
return .finished(value: true)
}
}
struct SportLogShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: ShowMyProgressIntent(),
phrases: [
"Show My Progress in (.applicationName)",
"Start running now"
]
)
}
}