diff --git a/macOS/Info.plist b/macOS/Info.plist index b29e021..5b2a81e 100644 --- a/macOS/Info.plist +++ b/macOS/Info.plist @@ -1,36 +1,36 @@ - SUFeedURL - https://files.writefreely.org/apps/mac/appcast.xml - SUPublicEDKey - xLenuurDaQb2/dj2ScylLmJx0gSnBmacUsOAgUjErUc= ATSApplicationFontsPath . CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName WriteFreely CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIconFile CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName WriteFreely CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion $(CURRENT_PROJECT_VERSION) LSApplicationCategoryType public.app-category.social-networking LSMinimumSystemVersion $(MACOSX_DEPLOYMENT_TARGET) + SUFeedURL + https://writefreely-files.s3.amazonaws.com/apps/mac/appcast.xml + SUPublicEDKey + xLenuurDaQb2/dj2ScylLmJx0gSnBmacUsOAgUjErUc= diff --git a/macOS/Settings/MacUpdatesView.swift b/macOS/Settings/MacUpdatesView.swift index c72f488..45f682a 100644 --- a/macOS/Settings/MacUpdatesView.swift +++ b/macOS/Settings/MacUpdatesView.swift @@ -1,93 +1,93 @@ import SwiftUI import Sparkle enum AppcastFeedUrl: String { - case release = "https://files.writefreely.org/apps/mac/appcast.xml" - case beta = "https://files.writefreely.org/apps/mac/appcast-beta.xml" + case release = "https://writefreely-files.s3.amazonaws.com/apps/mac/appcast.xml" + case beta = "https://writefreely-files.s3.amazonaws.com/apps/mac/appcast-beta.xml" } struct MacUpdatesView: View { @AppStorage("automaticallyChecksForUpdates") var automaticallyChecksForUpdates: Bool = false @AppStorage("subscribeToBetaUpdates") var subscribeToBetaUpdates: Bool = false @State private var lastUpdateCheck: Date? private let betaWarningString = """ To get brand new features before each official release, choose "Test versions." Note that test versions may have bugs \ that can cause crashes and data loss. """ static let lastUpdateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateStyle = .short formatter.timeStyle = .short formatter.doesRelativeDateFormatting = true return formatter }() var body: some View { VStack(spacing: 24) { Toggle(isOn: $automaticallyChecksForUpdates, label: { Text("Check for updates automatically") }) VStack { Button(action: { SUUpdater.shared()?.checkForUpdates(self) DispatchQueue.main.async { lastUpdateCheck = SUUpdater.shared()?.lastUpdateCheckDate } }, label: { Text("Check For Updates") }) HStack { Text("Last checked:") .font(.caption) if let lastUpdateCheck = lastUpdateCheck { Text(lastUpdateCheck, formatter: Self.lastUpdateFormatter) .font(.caption) } else { Text("Never") .font(.caption) } } } VStack(spacing: 16) { HStack(alignment: .top) { Text("Download:") Picker(selection: $subscribeToBetaUpdates, label: Text("Download:"), content: { Text("Release versions").tag(false) Text("Test versions").tag(true) }) .pickerStyle(RadioGroupPickerStyle()) .labelsHidden() } Text(betaWarningString) .frame(width: 350) .foregroundColor(.secondary) } } .padding() .onAppear { lastUpdateCheck = SUUpdater.shared()?.lastUpdateCheckDate } .onChange(of: automaticallyChecksForUpdates) { value in SUUpdater.shared()?.automaticallyChecksForUpdates = value } .onChange(of: subscribeToBetaUpdates) { value in if value { SUUpdater.shared()?.feedURL = URL(string: AppcastFeedUrl.beta.rawValue) } else { SUUpdater.shared()?.feedURL = URL(string: AppcastFeedUrl.release.rawValue) } } } } struct MacUpdatesView_Previews: PreviewProvider { static var previews: some View { MacUpdatesView() } }