Add a rate on the App Store button in the settings

This commit is contained in:
Thomas Ricouard 2023-01-21 07:16:20 +01:00
parent cab7116d50
commit 0eaf2ebc60
2 changed files with 8 additions and 0 deletions

View file

@ -138,6 +138,13 @@ struct SettingsTabs: View {
if let appVersion = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String {
Label("App Version: \(appVersion)", systemImage: "app.badge.checkmark")
}
if let reviewURL = URL(string: "https://apps.apple.com/app/id\(AppInfo.appStoreAppId)?action=write-review") {
Link(destination: reviewURL) {
Label("Rate Ice Cubes", systemImage: "link")
}
.tint(theme.labelColor)
}
}
.listRowBackground(theme.primaryBackgroundColor)
}

View file

@ -1,6 +1,7 @@
import Foundation
public enum AppInfo {
public static let appStoreAppId = "6444915884"
public static let clientName = "IceCubesApp"
public static let scheme = "icecubesapp://"
public static let scopes = "read write follow push"