Skip to content

Commit

Permalink
onAppear
Browse files Browse the repository at this point in the history
  • Loading branch information
c22dev committed Nov 28, 2023
1 parent 93c3233 commit bc62e91
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions TipsGotTrolled/TipsGotTrolledApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ struct TipsGotTrolledApp: App {
@AppStorage("isFirstLaunch") var isFirstLaunch: Bool = true
var body: some Scene {
WindowGroup {
if isFirstLaunch {
UIApplication.shared.alert(title: "Please delete Tips app then (re)install it before proceeding", body: "Hi ! It looks like it's the first time you come here. To avoid any corruption, please delete Tips app from Home Screen then reinstall it. Thanks for using this tool!", withButton: true)
isFirstLaunch = false
}
ContentView()
.onAppear {
if isFirstLaunch = true {
UIApplication.shared.alert(title: "Please delete Tips app then (re)install it before proceeding", body: "Hi ! It looks like it's the first time you come here. To avoid any corruption, please delete Tips app from Home Screen then reinstall it. Thanks for using this tool!", withButton: true)
isFirstLaunch = false
}
}
}
}
}
Expand Down

0 comments on commit bc62e91

Please sign in to comment.