sentryco/UpgradeAlert

Add screenshots

Opened this issue · 0 comments

eonist commented

macOS:

Add UITestSugar package

Add this to UITest

ScreenShotMaker.screenShotWindow(name: "alert", testCase: self, window: app.windows.firstMatch)

Add this to AppDelegate:

 UpgradeAlert.config = {
         .init(
            isRequired: false, // Require users to update
            alertTitle: "Update available", // alert title
            alertMessage: { _, version in "MyApp version \(version) is available on the AppStore." }, // An optional message which you want to show to the user when user will be alerted for the force update.,
            laterButtonTitle: "Later", // skip button title
            updateButtonTitle: "Update Now" // go to appstore btn
         )
      }()
      DispatchQueue.main.async {
         UpgradeAlert.showAlert(appInfo: .init(version: "1.0.1", trackViewUrl: "https://apps.apple.com/app/id/com.MyCompany.MyApp"))