diff --git a/ntfy.xcodeproj/project.pbxproj b/ntfy.xcodeproj/project.pbxproj index f11323b..5526708 100644 --- a/ntfy.xcodeproj/project.pbxproj +++ b/ntfy.xcodeproj/project.pbxproj @@ -542,7 +542,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = ntfy/ntfy.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_ASSET_PATHS = "\"ntfy/Assets/Preview Content\""; DEVELOPMENT_TEAM = YXQ4AMS4B4; ENABLE_PREVIEWS = YES; @@ -559,7 +559,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1; + MARKETING_VERSION = 1.2; PRODUCT_BUNDLE_IDENTIFIER = io.heckel.ntfy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -576,7 +576,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = ntfy/ntfy.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_ASSET_PATHS = "\"ntfy/Assets/Preview Content\""; DEVELOPMENT_TEAM = YXQ4AMS4B4; ENABLE_PREVIEWS = YES; @@ -593,7 +593,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1; + MARKETING_VERSION = 1.2; PRODUCT_BUNDLE_IDENTIFIER = io.heckel.ntfy; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -607,7 +607,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = ntfyNSE/ntfyNSE.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = YXQ4AMS4B4; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = ntfyNSE/Info.plist; @@ -619,7 +619,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.1; + MARKETING_VERSION = 1.2; PRODUCT_BUNDLE_IDENTIFIER = io.heckel.ntfy.ntfyNSE; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -634,7 +634,7 @@ buildSettings = { CODE_SIGN_ENTITLEMENTS = ntfyNSE/ntfyNSE.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = YXQ4AMS4B4; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = ntfyNSE/Info.plist; @@ -646,7 +646,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 1.1; + MARKETING_VERSION = 1.2; PRODUCT_BUNDLE_IDENTIFIER = io.heckel.ntfy.ntfyNSE; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/ntfy/Info.plist b/ntfy/Info.plist index ac9e0a1..f1f6093 100644 --- a/ntfy/Info.plist +++ b/ntfy/Info.plist @@ -2,13 +2,13 @@ + AppBaseURL + $(APP_BASE_URL) NSAppTransportSecurity NSAllowsArbitraryLoads - AppBaseURL - $(APP_BASE_URL) UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/ntfy/Views/SettingsView.swift b/ntfy/Views/SettingsView.swift index efc600f..856f6fb 100644 --- a/ntfy/Views/SettingsView.swift +++ b/ntfy/Views/SettingsView.swift @@ -186,30 +186,29 @@ struct UserTableView: View { .navigationBarTitleDisplayMode(.inline) .toolbar { ToolbarItem(placement: .navigationBarLeading) { - // Sigh, for iOS 14 we need to add a "Delete" menu item, because it doesn't support - // swipe actions. Quite annoying. - - if #available(iOS 15.0, *) { - Button(action: cancelAction) { - Text("Cancel") + if selectedUser == nil { + Button("Cancel") { + cancelAction() } } else { - if selectedUser == nil { + Menu { Button("Cancel") { cancelAction() } - } else { - Menu { - Button("Cancel") { - cancelAction() + if #available(iOS 15.0, *) { + Button(role: .destructive) { + deleteAction() + } label: { + Text("Delete") } + } else { Button("Delete") { deleteAction() } - } label: { - Image(systemName: "ellipsis.circle") - .padding([.leading], 40) } + } label: { + Image(systemName: "ellipsis.circle") + .padding([.leading], 40) } } } @@ -276,21 +275,9 @@ struct UserRowView: View { @ObservedObject var user: User var body: some View { - if #available(iOS 15.0, *) { - userRow - .swipeActions(edge: .trailing) { - Button(role: .destructive) { - store.delete(user: user) - } label: { - Label("Delete", systemImage: "trash.circle") - } - } - } else { - userRow - } - } - - private var userRow: some View { + // I tried to add a swipe action here to delete, but for some strange reason it doesn't work, + // even though in the subscription list it does. + HStack { Image(systemName: "person.fill") VStack(alignment: .leading, spacing: 0) { diff --git a/ntfy/Views/SubscriptionAddView.swift b/ntfy/Views/SubscriptionAddView.swift index 5eac8df..2fc8645 100644 --- a/ntfy/Views/SubscriptionAddView.swift +++ b/ntfy/Views/SubscriptionAddView.swift @@ -18,7 +18,6 @@ struct SubscriptionAddView: View { @State private var addError: String? @State private var loginError: String? - private var subscriptionManager: SubscriptionManager { return SubscriptionManager(store: store) } @@ -45,7 +44,7 @@ struct SubscriptionAddView: View { VStack(alignment: .leading, spacing: 0) { Form { Section( - footer: Text("Topics are not password protected, so choose a name that's not easy to guess. Once subscribed, you can PUT/POST notifications") + footer: Text("Topics may not be password-protected, so choose a name that's not easy to guess. Once subscribed, you can PUT/POST notifications") ) { TextField("Topic name, e.g. phil_alerts", text: $topic) .disableAutocapitalization() @@ -53,7 +52,7 @@ struct SubscriptionAddView: View { } Section( footer: - (useAnother) ? Text("Support for self-hosted servers is currently limited. To ensure instant delivery, be sure to set upstream-base-url in your server's config, otherwise messages may arrive with significant delay. Auth is not yet supported.") : Text("") + (useAnother) ? Text("To ensure instant delivery from your self-hosted server, be sure to set upstream-base-url in your server's config, otherwise messages may arrive with significant delay.") : Text("") ) { Toggle("Use another server", isOn: $useAnother) if useAnother { diff --git a/ntfyNSE/Info.plist b/ntfyNSE/Info.plist index 5b43cab..4c4a3e0 100644 --- a/ntfyNSE/Info.plist +++ b/ntfyNSE/Info.plist @@ -2,13 +2,13 @@ + AppBaseURL + $(APP_BASE_URL) NSAppTransportSecurity NSAllowsArbitraryLoads - AppBaseURL - $(APP_BASE_URL) NSExtension NSExtensionPointIdentifier