erikng / hello Goto Github PK
View Code? Open in Web Editor NEWan onboarding app built in SwiftUI
License: Apache License 2.0
an onboarding app built in SwiftUI
License: Apache License 2.0
As titled
8c97a92 needs to be fixed
Hi Erik,
i discover this issue on Big Sur during my testing Hello 0.2.2 .
2021-07-22 18:46:22.523077+0200 hello[40018:764438] [SwiftUI] No symbol named 'gear.circle' found in system symbol set
2021-07-22 18:46:22.554990+0200 hello[40018:764438] [SwiftUI] No symbol named 'gear.circle' found in system symbol set
2021-07-22 18:46:25.067170+0200 hello[40018:764438] [SwiftUI] No symbol named 'gear.circle' found in system symbol set
2021-07-22 18:46:25.166747+0200 hello[40018:764438] [SwiftUI] No symbol named 'circle.dashed.inset.filled' found in system symbol set
Hi Erik,
I was thinking about maybe mobileconfig check will be as well interesting.
Here is some adjustment i did in your code, but still not working but maybe help, as i'm not really expert in Swift :-)
PrimaryStatus:
`// Stage Status (Dynamic Row)
struct StageRow: View {
@ObservedObject var settings: HelloHelper
var installstage: DeviceStage
@State var installedPkg = false
@State var installedProfile = false
var body: some View {
HStack {
// Icon
// TODO: Figure out how to refresh AsyncImage if it fails to download the first time
if #available(macOS 12.0, *) {
AsyncImage(url: URL(string: installstage.iconPath)) { image in
image.resizable()
} placeholder: {
Utils().randomPlaceholderColor()
.opacity(0)
}
.aspectRatio(contentMode: .fit)
.scaledToFit()
.frame(width: 40, height: 40)
} else {
WebImage(url: URL(string: installstage.iconPath))
.renderingMode(.original)
.resizable()
.aspectRatio(contentMode: .fit)
.scaledToFit()
.frame(width: 40, height: 40)
}
// Stage Name
Text(installstage.title)
.font(.body)
.fontWeight(.bold)
Spacer()
// Current Stage Status
if Utils().pathExists(path: installstage.installedPath) || PkgInfo(receipt: installstage.installedPath) , Profile(receipt: installstage.installedPath) {
Image(systemName: "checkmark.circle.fill")
.foregroundColor(.green)
Text("Completed")
.frame(width: 75)
.onAppear {
settings.applicationState[installstage.id] = "installed"
}
} else {
// First stage - auto trigger installing
if settings.applicationState.isEmpty && installstage.id == 1 {
ProgressView()
.progressViewStyle(.circular)
.scaleEffect(0.4)
Text("Installing")
.frame(width: 75)
.onAppear {
settings.applicationState[installstage.id] = "installing"
settings.applicationInstalling = installstage.title
settings.applicationInstallingIconPath = installstage.iconPath
}
// Stage has already sent its state - no need to resend
} else if settings.applicationState[installstage.id] == "installing" {
ProgressView()
.progressViewStyle(.circular)
.scaleEffect(0.4)
Text("Installing")
.frame(width: 75)
// Previous stage has completed - trigger installing
} else if settings.applicationState[installstage.id-1] == "installed" {
ProgressView()
.progressViewStyle(.circular)
.scaleEffect(0.4)
Text("Installing")
.frame(width: 75)
.onAppear {
settings.applicationState[installstage.id] = "installing"
settings.applicationInstalling = installstage.title
settings.applicationInstallingIconPath = installstage.iconPath
}
// Catchall for pending
} else {
Image(systemName: "checkmark.circle.fill")
.foregroundColor(.secondary)
Text("Pending")
.frame(width: 75)
.onAppear {
settings.applicationState[installstage.id] = "pending"
}
}
}
}
}
func PkgInfo(receipt: String) -> Bool {
DispatchQueue.main.async {
self.installedPkg = Utils().pkgInfo(receipt: receipt)
}
return self.installedPkg
}
func Profile(receipt: String) -> Bool {
DispatchQueue.main.async {
self.installedProfile = Utils().profiles(receipt: receipt)
}
return self.installedProfile
}
}`
Utils:
func profiles(receipt: String) -> Bool {
let task = Process()
task.launchPath = "/usr/bin/profiles"
task.arguments = ["-P", receipt]
let outputPipe = Pipe()
let errorPipe = Pipe()
task.standardOutput = outputPipe
task.standardError = errorPipe
do {
try task.run()
} catch {
let msg = "Error processing profiles"
print(msg)
return false
}
task.waitUntilExit()
if task.terminationStatus != 0 {
return false
} else {
return true
}
}
Thx
Good day
I have added Managed Software Centre and after it being installed , the Hello app doesn't close
How do get it to close after installation has completed ?
Or instead of closing , open the last windows of the hello app
A long provisioning workflow is just static text and some progress wheels. It's pretty boring.
The UI should either be rethought out or use make better use of the top portion paragraph.
macOS version 11.4
Xcode version: 12.5
The project at '/hello-main/hello.xcodeproj' cannot be opened because it is in a future Xcode project file format. Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode.
Editing /hello-main/hello.xcodeproj/project.pbxproj (objectVersion
) manually from 55
to 54
, allows me to open it, but some of the Beta tools and commands are not available.
A few Cannot find 'AsyncImage' in scope
errors and Cannot infer contextual base in reference to member 'link'
errors.
https://developer.apple.com/documentation/swiftui/asyncimage?changes=_6 (AsyncImage view 10.12+ only?)
Thus the macOS 10.12+ beta compatibility question.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.