diff --git a/TipsGotTrolled/TipsGotTrolledApp.swift b/TipsGotTrolled/TipsGotTrolledApp.swift index 796ea9c..517e192 100644 --- a/TipsGotTrolled/TipsGotTrolledApp.swift +++ b/TipsGotTrolled/TipsGotTrolledApp.swift @@ -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 + } + } } } }