adds share app + write review links + translations

main
Laurent 2 years ago
parent ea6293799c
commit 4a37aac048
  1. 12
      LeCountdown.xcodeproj/project.pbxproj
  2. 1
      LeCountdown/Utils/URLs.swift
  3. 2
      LeCountdown/Views/ContentView.swift
  4. 19
      LeCountdown/Views/SettingsView.swift
  5. 4
      LeCountdown/fr.lproj/Localizable.strings

@ -1727,7 +1727,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.17; MARKETING_VERSION = 1.0.18;
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown; PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -1764,7 +1764,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.17; MARKETING_VERSION = 1.0.18;
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown; PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -1870,7 +1870,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 1.0.17; MARKETING_VERSION = 1.0.18;
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown.LaunchWidget; PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown.LaunchWidget;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
@ -1898,7 +1898,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 1.0.17; MARKETING_VERSION = 1.0.18;
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown.LaunchWidget; PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown.LaunchWidget;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
@ -1925,7 +1925,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 1.0.17; MARKETING_VERSION = 1.0.18;
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown.LaunchIntents; PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown.LaunchIntents;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
@ -1952,7 +1952,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 1.0.17; MARKETING_VERSION = 1.0.18;
PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown.LaunchIntents; PRODUCT_BUNDLE_IDENTIFIER = com.staxriver.LeCountdown.LaunchIntents;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES; SKIP_INSTALL = YES;

@ -9,4 +9,5 @@ import Foundation
enum URLs: String { enum URLs: String {
case mail = "hello@getenchanted.app" case mail = "hello@getenchanted.app"
case appLink = "https://apps.apple.com/app/enchant-amazing-timers/id6446093767"
} }

@ -189,7 +189,7 @@ struct MainToolbarView: ToolbarContent {
NavigationStack { NavigationStack {
SettingsView() SettingsView()
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
}.presentationDetents([.height(290.0)]) }.presentationDetents([.height(360.0)])
}) })
} }
Button { Button {

@ -51,12 +51,23 @@ struct SettingsView: View {
} else { } else {
Button { Button {
UIPasteboard.general.string = URLs.mail.rawValue UIPasteboard.general.string = URLs.mail.rawValue
self.emailCopied = true withAnimation {
self.emailCopied = true
}
} label: { } label: {
LabeledContent("Contact us", value: "tap to copy email") LabeledContent("Contact us", value: "tap to copy email")
} }
} }
} }
ShareLink(item: URLs.appLink.rawValue) {
Label("Share app", systemImage: "square.and.arrow.up")
}
Button {
self._requestReview()
} label: {
Label("Write a review!", systemImage: "scribble")
}
Button { Button {
withAnimation { withAnimation {
@ -78,6 +89,12 @@ struct SettingsView: View {
} }
fileprivate func _requestReview() {
guard let writeReviewURL = URL(string: "https://apps.apple.com/app/id6446093767?action=write-review")
else { return }
UIApplication.shared.open(writeReviewURL, options: [:], completionHandler: nil)
}
} }
struct SettingsView_Previews: PreviewProvider { struct SettingsView_Previews: PreviewProvider {

@ -287,3 +287,7 @@
"Create your own timer" = "Créer un minuteur"; "Create your own timer" = "Créer un minuteur";
"Create your own stopwatch" = "Créer un chronomètre"; "Create your own stopwatch" = "Créer un chronomètre";
"Create your first timer or stopwatch!" = "Créer votre premier minuteur ou chronomètre !"; "Create your first timer or stopwatch!" = "Créer votre premier minuteur ou chronomètre !";
"Share app" = "Partager l'app";
"Copied" = "Copié";
"tap to copy email" = "Tapez pour copier l'email";
"Write a review!" = "Écrivez un avis !";

Loading…
Cancel
Save