Parcourir la source

Update app metadata and surface legal/support links across the app.

Set the production bundle identifier and wire Home, Support, Privacy Policy, and Terms links into the paywall and launcher menu so users can access required pages from key app entry points.

Made-with: Cursor
Hussain Afzal il y a 3 mois
Parent
commit
c489e65013

+ 10 - 4
google_apps.xcodeproj/project.pbxproj

@@ -251,10 +251,13 @@
 				CODE_SIGN_ENTITLEMENTS = google_apps/google_apps.entitlements;
 				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
+				DEVELOPMENT_TEAM = GSL59TLQP5;
 				ENABLE_APP_SANDBOX = YES;
 				ENABLE_USER_SELECTED_FILES = readonly;
 				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_CFBundleDisplayName = "Access all Google Apps";
+				INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
 				INFOPLIST_KEY_NSCalendarsUsageDescription = "The Calendar widget shows upcoming events from Apple Calendar (including calendars synced with Google) and opens Google Calendar for scheduling.";
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Google Maps uses your location to center the map and suggest nearby places.";
@@ -265,7 +268,7 @@
 					"@executable_path/../Frameworks",
 				);
 				MARKETING_VERSION = 1.0;
-				PRODUCT_BUNDLE_IDENTIFIER = "Mql-Dev.google-apps";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.gsuite.google-apps";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				REGISTER_APP_GROUPS = YES;
 				STRING_CATALOG_GENERATE_SYMBOLS = YES;
@@ -285,10 +288,13 @@
 				CODE_SIGN_ENTITLEMENTS = google_apps/google_apps.entitlements;
 				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 1;
+				CURRENT_PROJECT_VERSION = 2;
+				DEVELOPMENT_TEAM = GSL59TLQP5;
 				ENABLE_APP_SANDBOX = YES;
 				ENABLE_USER_SELECTED_FILES = readonly;
 				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_CFBundleDisplayName = "Access all Google Apps";
+				INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
 				INFOPLIST_KEY_NSCalendarsUsageDescription = "The Calendar widget shows upcoming events from Apple Calendar (including calendars synced with Google) and opens Google Calendar for scheduling.";
 				INFOPLIST_KEY_NSHumanReadableCopyright = "";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Google Maps uses your location to center the map and suggest nearby places.";
@@ -299,7 +305,7 @@
 					"@executable_path/../Frameworks",
 				);
 				MARKETING_VERSION = 1.0;
-				PRODUCT_BUNDLE_IDENTIFIER = "Mql-Dev.google-apps";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.gsuite.google-apps";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				REGISTER_APP_GROUPS = YES;
 				STRING_CATALOG_GENERATE_SYMBOLS = YES;

+ 33 - 0
google_apps/LauncherRootView.swift

@@ -4,6 +4,13 @@ import UniformTypeIdentifiers
 import WebKit
 
 struct LauncherRootView: View {
+    private enum ExternalPage {
+        static let home = "https://sites.google.com/view/gogleapps/home"
+        static let terms = "https://sites.google.com/view/gogleapps/terms-of-service"
+        static let privacy = "https://sites.google.com/view/gogleapps/privacy-policy"
+        static let support = "https://sites.google.com/view/gogleapps/support"
+    }
+
     enum LayoutMode {
         case grid
         case panel
@@ -124,6 +131,10 @@ struct LauncherRootView: View {
                             InAppBrowserWindowManager.shared.open(url: url, title: "Google")
                         }
                     },
+                    onOpenHomePage: { openExternalPage(ExternalPage.home) },
+                    onOpenSupportPage: { openExternalPage(ExternalPage.support) },
+                    onOpenPrivacyPolicy: { openExternalPage(ExternalPage.privacy) },
+                    onOpenTermsOfService: { openExternalPage(ExternalPage.terms) },
                     onOpenWidgets: {
                         openWidgetsHub()
                     },
@@ -511,6 +522,11 @@ struct LauncherRootView: View {
         let webURL = URL(string: "https://apps.apple.com/account/subscriptions")!
         _ = NSWorkspace.shared.open(webURL)
     }
+
+    private func openExternalPage(_ urlString: String) {
+        guard let url = URL(string: urlString) else { return }
+        _ = NSWorkspace.shared.open(url)
+    }
 }
 
 private struct TileReorderDropDelegate: DropDelegate {
@@ -543,6 +559,10 @@ private struct SearchHeader: View {
     let onToggleLayout: () -> Void
     let onOpenPremium: () -> Void
     let onOpenGoogle: () -> Void
+    let onOpenHomePage: () -> Void
+    let onOpenSupportPage: () -> Void
+    let onOpenPrivacyPolicy: () -> Void
+    let onOpenTermsOfService: () -> Void
     let onOpenWidgets: () -> Void
     let shouldHighlightWidgets: Bool
     let onRestoreApp: (UUID) -> Void
@@ -634,6 +654,19 @@ private struct SearchHeader: View {
                     Button("Open Google") {
                         onOpenGoogle()
                     }
+                    Divider()
+                    Button("Support") {
+                        onOpenSupportPage()
+                    }
+                    Button("Privacy Policy") {
+                        onOpenPrivacyPolicy()
+                    }
+                    Button("Terms of Service") {
+                        onOpenTermsOfService()
+                    }
+                    Button("Home Page") {
+                        onOpenHomePage()
+                    }
                     if !hiddenApps.isEmpty {
                         Divider()
                         Menu("Manage Hidden Apps") {

+ 34 - 9
google_apps/PremiumFeaturesView.swift

@@ -1,5 +1,6 @@
 import StoreKit
 import SwiftUI
+import AppKit
 
 struct PremiumFeaturesView: View {
     /// When presented from AppKit (`NSWindow.beginSheet`), use this to dismiss; SwiftUI `dismiss` may not close the sheet.
@@ -22,6 +23,12 @@ struct PremiumFeaturesView: View {
     @Environment(\.colorScheme) private var colorScheme
     @State private var selectedPlan: PlanOption = .perpetual
     @State private var showingSuccessAlert = false
+    
+    private enum ExternalPage {
+        static let terms = "https://sites.google.com/view/gogleapps/terms-of-service"
+        static let privacy = "https://sites.google.com/view/gogleapps/privacy-policy"
+        static let support = "https://sites.google.com/view/gogleapps/support"
+    }
 
     private let featureRows: [(String, String)] = [
         ("Desktop Widgets", "Add frequently used apps as desktop widgets"),
@@ -208,17 +215,30 @@ struct PremiumFeaturesView: View {
 
                     HStack {
                         Spacer()
-                        Text("Privacy Policy")
-                            .font(.system(size: 11, weight: .medium))
-                            .foregroundStyle(secondaryTextColor)
+                        Button("Privacy Policy") {
+                            openExternalPage(ExternalPage.privacy)
+                        }
+                        .buttonStyle(.plain)
+                        .font(.system(size: 11, weight: .medium))
+                        .foregroundStyle(secondaryTextColor)
+                        
                         Spacer()
-                        Text("Support")
-                            .font(.system(size: 11, weight: .medium))
-                            .foregroundStyle(secondaryTextColor)
+                        
+                        Button("Support") {
+                            openExternalPage(ExternalPage.support)
+                        }
+                        .buttonStyle(.plain)
+                        .font(.system(size: 11, weight: .medium))
+                        .foregroundStyle(secondaryTextColor)
+                        
                         Spacer()
-                        Text("Terms of Service")
-                            .font(.system(size: 11, weight: .medium))
-                            .foregroundStyle(secondaryTextColor)
+                        
+                        Button("Terms of Service") {
+                            openExternalPage(ExternalPage.terms)
+                        }
+                        .buttonStyle(.plain)
+                        .font(.system(size: 11, weight: .medium))
+                        .foregroundStyle(secondaryTextColor)
                         Spacer()
                     }
                     .padding(.top, 2)
@@ -251,6 +271,11 @@ struct PremiumFeaturesView: View {
             dismiss()
         }
     }
+    
+    private func openExternalPage(_ urlString: String) {
+        guard let url = URL(string: urlString) else { return }
+        _ = NSWorkspace.shared.open(url)
+    }
 
     private var backgroundGradientColors: [Color] {
         if colorScheme == .dark {