From 0eaf2ebc603bae6d210124289db9d400aaeb6c71 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Sat, 21 Jan 2023 07:16:20 +0100 Subject: [PATCH] Add a rate on the App Store button in the settings --- IceCubesApp/App/Tabs/Settings/SettingsTab.swift | 7 +++++++ Packages/Models/Sources/Models/App/App.swift | 1 + 2 files changed, 8 insertions(+) diff --git a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift index 06a0163f..4f10d5ab 100644 --- a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift +++ b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift @@ -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) } diff --git a/Packages/Models/Sources/Models/App/App.swift b/Packages/Models/Sources/Models/App/App.swift index faad4e44..dfde8390 100644 --- a/Packages/Models/Sources/Models/App/App.swift +++ b/Packages/Models/Sources/Models/App/App.swift @@ -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"