diff --git a/Mac/Resources/Credits.rtf b/Mac/Resources/Credits.rtf index 60ff2af48..08ee6ff19 100644 --- a/Mac/Resources/Credits.rtf +++ b/Mac/Resources/Credits.rtf @@ -25,7 +25,7 @@ NewsBlur syncing: {\field{\*\fldinst{HYPERLINK "https://twitter.com/quanganhdo"} Under-the-hood magic and CSS stylin\'92s: {\field{\*\fldinst{HYPERLINK "https://github.com/wevah"}}{\fldrslt Nate Weaver}}\ Newsfoot (JS footnote displayer): {\field{\*\fldinst{HYPERLINK "https://github.com/brehaut/"}}{\fldrslt Andrew Brehaut}}\ Help book: {\field{\*\fldinst{HYPERLINK "https://nostodnayr.net/"}}{\fldrslt Ryan Dotson}}\ -And featuring contributions from {\field{\*\fldinst{HYPERLINK "https://github.com/danielpunkass"}}{\fldrslt Daniel Jalkut}}, {\field{\*\fldinst{HYPERLINK "https://rhonabwy.com/"}}{\fldrslt Joe Heck}}, {\field{\*\fldinst{HYPERLINK "https://github.com/olofhellman"}}{\fldrslt Olof Hellman}}, {\field{\*\fldinst{HYPERLINK "https://blog.rizwan.dev/"}}{\fldrslt Rizwan Mohamed Ibrahim}}, {\field{\*\fldinst{HYPERLINK "https://stuartbreckenridge.com/"}}{\fldrslt Stuart Breckenridge}}, {\field{\*\fldinst{HYPERLINK "https://twitter.com/philviso"}}{\fldrslt Phil Viso}}, and {\field{\*\fldinst{HYPERLINK "https://github.com/Ranchero-Software/NetNewsWire/graphs/contributors"}}{\fldrslt many more}}!\ +And featuring contributions from {\field{\*\fldinst{HYPERLINK "https://github.com/danielpunkass"}}{\fldrslt Daniel Jalkut}}, {\field{\*\fldinst{HYPERLINK "https://rhonabwy.com/"}}{\fldrslt Joe Heck}}, {\field{\*\fldinst{HYPERLINK "https://github.com/olofhellman"}}{\fldrslt Olof Hellman}}, {\field{\*\fldinst{HYPERLINK "https://blog.rizwan.dev/"}}{\fldrslt Rizwan Mohamed Ibrahim}}, {\field{\*\fldinst{HYPERLINK "https://mynameisstuart.com/"}}{\fldrslt Stuart Breckenridge}}, {\field{\*\fldinst{HYPERLINK "https://twitter.com/philviso"}}{\fldrslt Phil Viso}}, and {\field{\*\fldinst{HYPERLINK "https://github.com/Ranchero-Software/NetNewsWire/graphs/contributors"}}{\fldrslt many more}}!\ \ \pard\pardeftab720\sa60\partightenfactor0 @@ -49,4 +49,4 @@ And featuring contributions from {\field{\*\fldinst{HYPERLINK "https://github.co \pard\pardeftab720\li360\sa60\partightenfactor0 \f1\b0 \cf2 NetNewsWire 6 is dedicated to everyone working to save democracy around the world.\ -} \ No newline at end of file +} diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 45291f1d1..d225fb800 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -4609,7 +4609,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if ! command -v swiftgen &> /dev/null\nthen\n echo \"swiftgen could not be found\"\n exit\nfi\n\narch -x86_64 swiftgen run strings -t structured-swift5 \"$PROJECT_DIR/Widget/Resources/en.lproj/Localizable.strings\" \"$PROJECT_DIR/Widget/Resources/Localizable.stringsdict\" --output \"$PROJECT_DIR/Widget/Resources/Localized.swift\";\n"; + shellScript = "if ! command -v swiftgen &> /dev/null\nthen\n echo \"swiftgen could not be found\"\n exit\nfi\n\nswiftgen run strings -t structured-swift5 \"$PROJECT_DIR/Widget/Resources/en.lproj/Localizable.strings\" \"$PROJECT_DIR/Widget/Resources/Localizable.stringsdict\" --output \"$PROJECT_DIR/Widget/Resources/Localized.swift\";\n"; }; 513F328A2593EFCE0003048F /* Delete Unnecessary Frameworks */ = { isa = PBXShellScriptBuildPhase; diff --git a/iOS/AppDefaults.swift b/iOS/AppDefaults.swift index d1e7ec909..c3935b68b 100644 --- a/iOS/AppDefaults.swift +++ b/iOS/AppDefaults.swift @@ -54,6 +54,7 @@ final class AppDefaults { static let addWebFeedAccountID = "addWebFeedAccountID" static let addWebFeedFolderName = "addWebFeedFolderName" static let addFolderAccountID = "addFolderAccountID" + static let useSystemBrowser = "useSystemBrowser" } let isDeveloperBuild: Bool = { @@ -119,6 +120,15 @@ final class AppDefaults { } } + var useSystemBrowser: Bool { + get { + return UserDefaults.standard.bool(forKey: Key.useSystemBrowser) + } + set { + UserDefaults.standard.setValue(newValue, forKey: Key.useSystemBrowser) + } + } + var lastImageCacheFlushDate: Date? { get { return AppDefaults.date(for: Key.lastImageCacheFlushDate) diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index fe6188903..cba86084f 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -250,8 +250,12 @@ class WebViewController: UIViewController { func openInAppBrowser() { guard let url = article?.preferredURL else { return } - let vc = SFSafariViewController(url: url) - present(vc, animated: true) + if AppDefaults.shared.useSystemBrowser { + UIApplication.shared.open(url, options: [:]) + } else { + let vc = SFSafariViewController(url: url) + present(vc, animated: true) + } } } @@ -344,7 +348,13 @@ extension WebViewController: WKNavigationDelegate { let components = URLComponents(url: url, resolvingAgainstBaseURL: false) if components?.scheme == "http" || components?.scheme == "https" { decisionHandler(.cancel) - openURL(url) + if AppDefaults.shared.useSystemBrowser { + UIApplication.shared.open(url, options: [:]) + } else { + let vc = SFSafariViewController(url: url) + self.present(vc, animated: true, completion: nil) + } + } else if components?.scheme == "mailto" { decisionHandler(.cancel) diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index 1a99608bd..770bc84bd 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -899,6 +899,7 @@ private extension MasterTimelineViewController { func openInBrowserAlertAction(_ article: Article, completion: @escaping (Bool) -> Void) -> UIAlertAction? { guard let _ = article.preferredURL else { return nil } + let title = NSLocalizedString("Open in Browser", comment: "Open in Browser") let action = UIAlertAction(title: title, style: .default) { [weak self] action in self?.coordinator.showBrowserForArticle(article) diff --git a/iOS/Resources/Credits.rtf b/iOS/Resources/Credits.rtf index 828314616..1124bdb6f 100644 --- a/iOS/Resources/Credits.rtf +++ b/iOS/Resources/Credits.rtf @@ -13,5 +13,5 @@ NewsBlur syncing: {\field{\*\fldinst{HYPERLINK "https://twitter.com/quanganhdo"} Under-the-hood magic and CSS stylin\'92s: {\field{\*\fldinst{HYPERLINK "https://github.com/wevah"}}{\fldrslt Nate Weaver}}\ Newsfoot (JS footnote displayer): {\field{\*\fldinst{HYPERLINK "https://github.com/brehaut/"}}{\fldrslt Andrew Brehaut}}\ Help book: {\field{\*\fldinst{HYPERLINK "https://nostodnayr.net/"}}{\fldrslt Ryan Dotson}}\ -And featuring contributions from {\field{\*\fldinst{HYPERLINK "https://github.com/danielpunkass"}}{\fldrslt Daniel Jalkut}}, {\field{\*\fldinst{HYPERLINK "https://rhonabwy.com/"}}{\fldrslt Joe Heck}}, {\field{\*\fldinst{HYPERLINK "https://github.com/olofhellman"}}{\fldrslt Olof Hellman}}, {\field{\*\fldinst{HYPERLINK "https://blog.rizwan.dev/"}}{\fldrslt Rizwan Mohamed Ibrahim}}, {\field{\*\fldinst{HYPERLINK "https://stuartbreckenridge.com/"}}{\fldrslt Stuart Breckenridge}}, {\field{\*\fldinst{HYPERLINK "https://twitter.com/philviso"}}{\fldrslt Phil Viso}}, and {\field{\*\fldinst{HYPERLINK "https://github.com/Ranchero-Software/NetNewsWire/graphs/contributors"}}{\fldrslt many more}}!\ -} \ No newline at end of file +And featuring contributions from {\field{\*\fldinst{HYPERLINK "https://github.com/danielpunkass"}}{\fldrslt Daniel Jalkut}}, {\field{\*\fldinst{HYPERLINK "https://rhonabwy.com/"}}{\fldrslt Joe Heck}}, {\field{\*\fldinst{HYPERLINK "https://github.com/olofhellman"}}{\fldrslt Olof Hellman}}, {\field{\*\fldinst{HYPERLINK "https://blog.rizwan.dev/"}}{\fldrslt Rizwan Mohamed Ibrahim}}, {\field{\*\fldinst{HYPERLINK "https://mynameisstuart.com/"}}{\fldrslt Stuart Breckenridge}}, {\field{\*\fldinst{HYPERLINK "https://twitter.com/philviso"}}{\fldrslt Phil Viso}}, and {\field{\*\fldinst{HYPERLINK "https://github.com/Ranchero-Software/NetNewsWire/graphs/contributors"}}{\fldrslt many more}}!\ +} diff --git a/iOS/Resources/Info.plist b/iOS/Resources/Info.plist index 09192d3b4..83429b287 100644 --- a/iOS/Resources/Info.plist +++ b/iOS/Resources/Info.plist @@ -2,10 +2,6 @@ - OrganizationIdentifier - $(ORGANIZATION_IDENTIFIER) - DeveloperEntitlements - $(DEVELOPER_ENTITLEMENTS) AppGroup group.$(ORGANIZATION_IDENTIFIER).NetNewsWire.iOS AppIdentifierPrefix @@ -54,6 +50,8 @@ CFBundleVersion $(CURRENT_PROJECT_VERSION) + DeveloperEntitlements + $(DEVELOPER_ENTITLEMENTS) LSApplicationQueriesSchemes mailto @@ -76,6 +74,8 @@ Restoration SelectFeed + OrganizationIdentifier + $(ORGANIZATION_IDENTIFIER) UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/iOS/Settings/Settings.storyboard b/iOS/Settings/Settings.storyboard index 393853548..c15ab7f81 100644 --- a/iOS/Settings/Settings.storyboard +++ b/iOS/Settings/Settings.storyboard @@ -1,9 +1,9 @@ - + - + @@ -21,7 +21,7 @@ - + @@ -42,14 +42,14 @@ - + - +