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

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

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

@ -51,13 +51,24 @@ struct SettingsView: View {
} else {
Button {
UIPasteboard.general.string = URLs.mail.rawValue
self.emailCopied = true
withAnimation {
self.emailCopied = true
}
} label: {
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 {
withAnimation {
self.showLogsSheet.toggle()
@ -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 {

@ -287,3 +287,7 @@
"Create your own timer" = "Créer un minuteur";
"Create your own stopwatch" = "Créer un 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