diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index ab7336369..e46e9d94d 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -7,6 +7,10 @@ objects = { /* Begin PBXBuildFile section */ + 510D707422B028E1004E8F65 /* SettingsAddAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510D707322B028E1004E8F65 /* SettingsAddAccountView.swift */; }; + 510D707E22B02A4B004E8F65 /* SettingsLocalAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510D707D22B02A4B004E8F65 /* SettingsLocalAccountView.swift */; }; + 510D708022B02A5F004E8F65 /* SettingsFeedbinAccountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510D707F22B02A5F004E8F65 /* SettingsFeedbinAccountView.swift */; }; + 510D708222B041CC004E8F65 /* SettingsAccountLabelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 510D708122B041CC004E8F65 /* SettingsAccountLabelView.swift */; }; 51126DA4225FDE2F00722696 /* RSImage-Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51126DA3225FDE2F00722696 /* RSImage-Extensions.swift */; }; 5115CAF42266301400B21BCE /* AddContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51121B5A22661FEF00BC0EC1 /* AddContainerViewController.swift */; }; 5126EE97226CB48A00C22AFC /* NavigationStateController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5126EE96226CB48A00C22AFC /* NavigationStateController.swift */; }; @@ -134,6 +138,8 @@ 51EF0F8E2279C9260050506E /* AccountsAdd.xib in Resources */ = {isa = PBXBuildFile; fileRef = 51EF0F8D2279C9260050506E /* AccountsAdd.xib */; }; 51EF0F902279C9500050506E /* AccountsAddViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F8F2279C9500050506E /* AccountsAddViewController.swift */; }; 51EF0F922279CA620050506E /* AccountsAddTableCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51EF0F912279CA620050506E /* AccountsAddTableCellView.swift */; }; + 51F35D0922AFD4760003CE1B /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F35D0822AFD4760003CE1B /* SettingsView.swift */; }; + 51F35D1B22B001010003CE1B /* SettingsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F35D1A22B001010003CE1B /* SettingsViewModel.swift */; }; 51F85BE5227217D000C787DC /* RefreshIntervalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BDB2272162F00C787DC /* RefreshIntervalViewController.swift */; }; 51F85BE7227245FC00C787DC /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51F85BE6227245FC00C787DC /* AboutViewController.swift */; }; 51F85BEB22724CB600C787DC /* About.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 51F85BEA22724CB600C787DC /* About.rtf */; }; @@ -159,7 +165,6 @@ 840958632201629A002C1579 /* Subscribe to Feed.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 6581C73320CED60000F4AD34 /* Subscribe to Feed.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 840BEE4121D70E64009BBAFA /* CrashReportWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840BEE4021D70E64009BBAFA /* CrashReportWindowController.swift */; }; 840D617F2029031C009BC708 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840D617E2029031C009BC708 /* AppDelegate.swift */; }; - 840D61962029031D009BC708 /* NetNewsWire_iOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840D61952029031D009BC708 /* NetNewsWire_iOSTests.swift */; }; 84162A152038C12C00035290 /* MarkCommandValidationStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84162A142038C12C00035290 /* MarkCommandValidationStatus.swift */; }; 841ABA4E20145E7300980E11 /* NothingInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA4D20145E7300980E11 /* NothingInspectorViewController.swift */; }; 841ABA5E20145E9200980E11 /* FolderInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841ABA5D20145E9200980E11 /* FolderInspectorViewController.swift */; }; @@ -456,13 +461,6 @@ remoteGlobalIDString = 844BEE401F0AB3AB004AB7CD; remoteInfo = ArticlesDatabaseTests; }; - 840D61922029031D009BC708 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 849C64581ED37A5D003D8FC0 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 840D617B2029031C009BC708; - remoteInfo = "NetNewsWire-iOS"; - }; 849C64721ED37A5D003D8FC0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 849C64581ED37A5D003D8FC0 /* Project object */; @@ -661,6 +659,10 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 510D707322B028E1004E8F65 /* SettingsAddAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsAddAccountView.swift; sourceTree = ""; }; + 510D707D22B02A4B004E8F65 /* SettingsLocalAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsLocalAccountView.swift; sourceTree = ""; }; + 510D707F22B02A5F004E8F65 /* SettingsFeedbinAccountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsFeedbinAccountView.swift; sourceTree = ""; }; + 510D708122B041CC004E8F65 /* SettingsAccountLabelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsAccountLabelView.swift; sourceTree = ""; }; 51121AA12265430A00BC0EC1 /* NetNewsWire_iOS_target.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = NetNewsWire_iOS_target.xcconfig; sourceTree = ""; }; 51121B5A22661FEF00BC0EC1 /* AddContainerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddContainerViewController.swift; sourceTree = ""; }; 51126DA3225FDE2F00722696 /* RSImage-Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RSImage-Extensions.swift"; sourceTree = ""; }; @@ -727,6 +729,8 @@ 51EF0F8D2279C9260050506E /* AccountsAdd.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AccountsAdd.xib; sourceTree = ""; }; 51EF0F8F2279C9500050506E /* AccountsAddViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsAddViewController.swift; sourceTree = ""; }; 51EF0F912279CA620050506E /* AccountsAddTableCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountsAddTableCellView.swift; sourceTree = ""; }; + 51F35D0822AFD4760003CE1B /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; + 51F35D1A22B001010003CE1B /* SettingsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsViewModel.swift; sourceTree = ""; }; 51F85BDB2272162F00C787DC /* RefreshIntervalViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RefreshIntervalViewController.swift; sourceTree = ""; }; 51F85BE6227245FC00C787DC /* AboutViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = ""; }; 51F85BEA22724CB600C787DC /* About.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = About.rtf; sourceTree = ""; }; @@ -756,7 +760,6 @@ 840BEE4021D70E64009BBAFA /* CrashReportWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CrashReportWindowController.swift; sourceTree = ""; }; 840D617C2029031C009BC708 /* NetNewsWire.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NetNewsWire.app; sourceTree = BUILT_PRODUCTS_DIR; }; 840D617E2029031C009BC708 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 840D61912029031D009BC708 /* NetNewsWire-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "NetNewsWire-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 840D61952029031D009BC708 /* NetNewsWire_iOSTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetNewsWire_iOSTests.swift; sourceTree = ""; }; 840D61972029031D009BC708 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 84162A142038C12C00035290 /* MarkCommandValidationStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkCommandValidationStatus.swift; sourceTree = ""; }; @@ -949,13 +952,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 840D618E2029031D009BC708 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 849C645D1ED37A5D003D8FC0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1043,16 +1039,13 @@ 5183CCEB227117C70010922C /* Settings */ = { isa = PBXGroup; children = ( - 5183CCEC22711DCE0010922C /* Settings.storyboard */, - 51E595AA228DF94C00FCC42B /* SettingsTableViewCell.xib */, - 5183CCEE227125970010922C /* SettingsViewController.swift */, - 51E595AC228E1C2100FCC42B /* AddAccountViewController.swift */, - 515436892291FED9005E1CDF /* FeedbinAccountViewController.swift */, - 515436872291D75D005E1CDF /* AddLocalAccountViewController.swift */, - 51F85BE6227245FC00C787DC /* AboutViewController.swift */, - 51543684228F6753005E1CDF /* DetailAccountViewController.swift */, - 51F85BDB2272162F00C787DC /* RefreshIntervalViewController.swift */, - 51EF0F7B2277919E0050506E /* TimelineNumberOfLinesViewController.swift */, + 51F35CFD22AFD0350003CE1B /* UIKit */, + 51F35D0822AFD4760003CE1B /* SettingsView.swift */, + 51F35D1A22B001010003CE1B /* SettingsViewModel.swift */, + 510D708122B041CC004E8F65 /* SettingsAccountLabelView.swift */, + 510D707322B028E1004E8F65 /* SettingsAddAccountView.swift */, + 510D707D22B02A4B004E8F65 /* SettingsLocalAccountView.swift */, + 510D707F22B02A5F004E8F65 /* SettingsFeedbinAccountView.swift */, ); path = Settings; sourceTree = ""; @@ -1163,6 +1156,23 @@ name = Frameworks; sourceTree = ""; }; + 51F35CFD22AFD0350003CE1B /* UIKit */ = { + isa = PBXGroup; + children = ( + 5183CCEC22711DCE0010922C /* Settings.storyboard */, + 51E595AA228DF94C00FCC42B /* SettingsTableViewCell.xib */, + 5183CCEE227125970010922C /* SettingsViewController.swift */, + 51E595AC228E1C2100FCC42B /* AddAccountViewController.swift */, + 515436892291FED9005E1CDF /* FeedbinAccountViewController.swift */, + 515436872291D75D005E1CDF /* AddLocalAccountViewController.swift */, + 51F85BE6227245FC00C787DC /* AboutViewController.swift */, + 51543684228F6753005E1CDF /* DetailAccountViewController.swift */, + 51F85BDB2272162F00C787DC /* RefreshIntervalViewController.swift */, + 51EF0F7B2277919E0050506E /* TimelineNumberOfLinesViewController.swift */, + ); + path = UIKit; + sourceTree = ""; + }; 6581C73620CED60100F4AD34 /* SafariExtension */ = { isa = PBXGroup; children = ( @@ -1470,7 +1480,6 @@ 849C64601ED37A5D003D8FC0 /* NetNewsWire.app */, 849C64711ED37A5D003D8FC0 /* NetNewsWireTests.xctest */, 840D617C2029031C009BC708 /* NetNewsWire.app */, - 840D61912029031D009BC708 /* NetNewsWire-iOSTests.xctest */, 6581C73320CED60000F4AD34 /* Subscribe to Feed.appex */, ); name = Products; @@ -1864,24 +1873,6 @@ productReference = 840D617C2029031C009BC708 /* NetNewsWire.app */; productType = "com.apple.product-type.application"; }; - 840D61902029031D009BC708 /* NetNewsWire-iOSTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 840D61A62029031E009BC708 /* Build configuration list for PBXNativeTarget "NetNewsWire-iOSTests" */; - buildPhases = ( - 840D618D2029031D009BC708 /* Sources */, - 840D618E2029031D009BC708 /* Frameworks */, - 840D618F2029031D009BC708 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 840D61932029031D009BC708 /* PBXTargetDependency */, - ); - name = "NetNewsWire-iOSTests"; - productName = "NetNewsWire-iOSTests"; - productReference = 840D61912029031D009BC708 /* NetNewsWire-iOSTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; 849C645F1ED37A5D003D8FC0 /* NetNewsWire */ = { isa = PBXNativeTarget; buildConfigurationList = 849C647A1ED37A5D003D8FC0 /* Build configuration list for PBXNativeTarget "NetNewsWire" */; @@ -1955,12 +1946,6 @@ }; }; }; - 840D61902029031D009BC708 = { - CreatedOnToolsVersion = 9.3; - DevelopmentTeam = 9C84TZ7Q6Z; - ProvisioningStyle = Automatic; - TestTargetID = 840D617B2029031C009BC708; - }; 849C645F1ED37A5D003D8FC0 = { CreatedOnToolsVersion = 8.2.1; DevelopmentTeam = SHJK2V3AJG; @@ -2034,7 +2019,6 @@ 849C645F1ED37A5D003D8FC0 /* NetNewsWire */, 849C64701ED37A5D003D8FC0 /* NetNewsWireTests */, 840D617B2029031C009BC708 /* NetNewsWire-iOS */, - 840D61902029031D009BC708 /* NetNewsWire-iOSTests */, 6581C73220CED60000F4AD34 /* Subscribe to Feed */, ); }; @@ -2215,13 +2199,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 840D618F2029031D009BC708 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 849C645E1ED37A5D003D8FC0 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -2342,11 +2319,14 @@ 51F85BF52273625800C787DC /* Bundle-Extensions.swift in Sources */, 51C452A622650A3500C03939 /* Node-Extensions.swift in Sources */, 5183CCDF226F1FCC0010922C /* UINavigationController+Progress.swift in Sources */, + 510D707422B028E1004E8F65 /* SettingsAddAccountView.swift in Sources */, 51C45294226509C800C03939 /* SearchFeedDelegate.swift in Sources */, 512E09352268B25900BDCFDD /* UISplitViewController-Extensions.swift in Sources */, + 510D707E22B02A4B004E8F65 /* SettingsLocalAccountView.swift in Sources */, 51C452A022650A1900C03939 /* FeedIconDownloader.swift in Sources */, 51F85BE7227245FC00C787DC /* AboutViewController.swift in Sources */, 5154368A2291FED9005E1CDF /* FeedbinAccountViewController.swift in Sources */, + 510D708222B041CC004E8F65 /* SettingsAccountLabelView.swift in Sources */, 51C4529E22650A1900C03939 /* ImageDownloader.swift in Sources */, 51C45292226509C800C03939 /* TodayFeedDelegate.swift in Sources */, 51C452A222650A1900C03939 /* RSHTMLMetadata+Extension.swift in Sources */, @@ -2361,10 +2341,12 @@ 51C4526A226508F600C03939 /* MasterFeedTableViewCellLayout.swift in Sources */, 51C452AE2265104D00C03939 /* TimelineStringFormatter.swift in Sources */, 512E08E62268800D00BDCFDD /* FolderTreeControllerDelegate.swift in Sources */, + 51F35D0922AFD4760003CE1B /* SettingsView.swift in Sources */, 51543685228F6753005E1CDF /* DetailAccountViewController.swift in Sources */, 51C4529922650A0000C03939 /* ArticleStylesManager.swift in Sources */, 51EF0F802277A8330050506E /* MasterTimelineCellLayout.swift in Sources */, 51F85BF722749FA100C787DC /* UIFont-Extensions.swift in Sources */, + 51F35D1B22B001010003CE1B /* SettingsViewModel.swift in Sources */, 515436882291D75D005E1CDF /* AddLocalAccountViewController.swift in Sources */, 51C452AF2265108300C03939 /* ArticleArray.swift in Sources */, 51C4528E2265099C00C03939 /* SmartFeedsController.swift in Sources */, @@ -2393,14 +2375,7 @@ 51C452782265091600C03939 /* MasterTimelineCellData.swift in Sources */, 51C45259226508D300C03939 /* AppDefaults.swift in Sources */, 51C45293226509C800C03939 /* StarredFeedDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 840D618D2029031D009BC708 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 840D61962029031D009BC708 /* NetNewsWire_iOSTests.swift in Sources */, + 510D708022B02A5F004E8F65 /* SettingsFeedbinAccountView.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -2624,11 +2599,6 @@ name = Account; targetProxy = 51C451FA2264C83E00C03939 /* PBXContainerItemProxy */; }; - 840D61932029031D009BC708 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 840D617B2029031C009BC708 /* NetNewsWire-iOS */; - targetProxy = 840D61922029031D009BC708 /* PBXContainerItemProxy */; - }; 849C64731ED37A5D003D8FC0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 849C645F1ED37A5D003D8FC0 /* NetNewsWire */; @@ -2898,137 +2868,6 @@ }; name = Release; }; - 840D61A72029031E009BC708 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "NetNewsWire-iOSTests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.NetNewsWire-Evergreen.iOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NetNewsWire-iOS.app/NetNewsWire-iOS"; - }; - name = Debug; - }; - 840D61A82029031E009BC708 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ALWAYS_SEARCH_USER_PATHS = NO; - BUNDLE_LOADER = "$(TEST_HOST)"; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Automatic; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - INFOPLIST_FILE = "NetNewsWire-iOSTests/Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_BUNDLE_IDENTIFIER = "com.ranchero.NetNewsWire-Evergreen.iOSTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NetNewsWire-iOS.app/NetNewsWire-iOS"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; 849C64781ED37A5D003D8FC0 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = D5907CDD2002F0BE005947E5 /* NetNewsWire_project_debug.xcconfig */; @@ -3113,15 +2952,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 840D61A62029031E009BC708 /* Build configuration list for PBXNativeTarget "NetNewsWire-iOSTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 840D61A72029031E009BC708 /* Debug */, - 840D61A82029031E009BC708 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; 849C645B1ED37A5D003D8FC0 /* Build configuration list for PBXProject "NetNewsWire" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Shared/Timer/RefreshInterval.swift b/Shared/Timer/RefreshInterval.swift index c32746cdb..c3fb89da2 100644 --- a/Shared/Timer/RefreshInterval.swift +++ b/Shared/Timer/RefreshInterval.swift @@ -8,7 +8,7 @@ import Foundation -enum RefreshInterval: Int { +enum RefreshInterval: Int, CaseIterable { case manually = 1 case every10Minutes = 2 case every30Minutes = 3 diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index 809666f11..f91f0ca6a 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -11,6 +11,7 @@ import Account import Articles import RSCore import RSTree +import SwiftUI class MasterFeedViewController: ProgressTableViewController, UndoableCommandRunner { @@ -393,13 +394,8 @@ class MasterFeedViewController: ProgressTableViewController, UndoableCommandRunn @IBAction func settings(_ sender: UIBarButtonItem) { - let settingsNavViewController = UIStoryboard.settings.instantiateInitialViewController() as! UINavigationController - settingsNavViewController.modalPresentationStyle = .formSheet - - let settingsViewController = settingsNavViewController.topViewController as! SettingsViewController - settingsViewController.presentingParentController = self - - self.present(settingsNavViewController, animated: true) + let settings = UIHostingController(rootView: SettingsView(viewModel: SettingsViewModel())) + self.present(settings, animated: true) } diff --git a/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/Contents.json b/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/Contents.json index 327e5717e..7057e3b68 100644 --- a/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/Contents.json +++ b/iOS/Resources/Assets.xcassets/accountFeedbin.imageset/Contents.json @@ -10,6 +10,7 @@ "author" : "xcode" }, "properties" : { - "template-rendering-intent" : "template" + "template-rendering-intent" : "template", + "preserves-vector-representation" : true } } \ No newline at end of file diff --git a/iOS/Resources/Assets.xcassets/accountLocal.imageset/Contents.json b/iOS/Resources/Assets.xcassets/accountLocal.imageset/Contents.json index 4b7dc7acc..c48efa3f2 100644 --- a/iOS/Resources/Assets.xcassets/accountLocal.imageset/Contents.json +++ b/iOS/Resources/Assets.xcassets/accountLocal.imageset/Contents.json @@ -10,6 +10,7 @@ "author" : "xcode" }, "properties" : { - "template-rendering-intent" : "template" + "template-rendering-intent" : "template", + "preserves-vector-representation" : true } } \ No newline at end of file diff --git a/iOS/Settings/SettingsAccountLabelView.swift b/iOS/Settings/SettingsAccountLabelView.swift new file mode 100644 index 000000000..8c7f6d41f --- /dev/null +++ b/iOS/Settings/SettingsAccountLabelView.swift @@ -0,0 +1,40 @@ +// +// SettingsAccountLabelView.swift +// NetNewsWire-iOS +// +// Created by Maurice Parker on 6/11/19. +// Copyright © 2019 Ranchero Software. All rights reserved. +// + +import SwiftUI + +struct SettingsAccountLabelView : View { + let accountImage: String + let accountLabel: String + + var body: some View { + HStack { + Spacer() + HStack { + Image(accountImage) + .resizable() + .aspectRatio(1, contentMode: .fit) + .frame(height: 32) + Text(verbatim: accountLabel).font(.title) + + } + .layoutPriority(1) + Spacer() + } + .foregroundColor(.primary) + } +} + +#if DEBUG +struct SettingsAccountLabelView_Previews : PreviewProvider { + static var previews: some View { + SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: "On My Device") + .previewLayout(.fixed(width: 300, height: 44)) + } +} +#endif diff --git a/iOS/Settings/SettingsAddAccountView.swift b/iOS/Settings/SettingsAddAccountView.swift new file mode 100644 index 000000000..e7ec22319 --- /dev/null +++ b/iOS/Settings/SettingsAddAccountView.swift @@ -0,0 +1,30 @@ +// +// SettingsAddAccountView.swift +// NetNewsWire-iOS +// +// Created by Maurice Parker on 6/11/19. +// Copyright © 2019 Ranchero Software. All rights reserved. +// + +import SwiftUI + +struct SettingsAddAccountView : View { + var body: some View { + List { + PresentationButton(SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: "On My Device"), + destination: SettingsLocalAccountView(name: "")) + PresentationButton(SettingsAccountLabelView(accountImage: "accountFeedbin", accountLabel: "Feedbin"), + destination: SettingsFeedbinAccountView(email: "", password: "")) + } + .listStyle(.grouped) + .navigationBarTitle(Text("Add Account"), displayMode: .inline) + } +} + +#if DEBUG +struct AddAccountView_Previews : PreviewProvider { + static var previews: some View { + SettingsAddAccountView() + } +} +#endif diff --git a/iOS/Settings/SettingsFeedbinAccountView.swift b/iOS/Settings/SettingsFeedbinAccountView.swift new file mode 100644 index 000000000..f62fce8c5 --- /dev/null +++ b/iOS/Settings/SettingsFeedbinAccountView.swift @@ -0,0 +1,55 @@ +// +// SettingsFeedbinAccountView.swift +// NetNewsWire-iOS +// +// Created by Maurice Parker on 6/11/19. +// Copyright © 2019 Ranchero Software. All rights reserved. +// + +import SwiftUI + +struct SettingsFeedbinAccountView : View { + @State var email: String + @State var password: String + + var body: some View { + NavigationView { + List { + Section(header: + SettingsAccountLabelView(accountImage: "accountFeedbin", accountLabel: "Feedbin").padding() + ) { + HStack { + Spacer() + TextField($email, placeholder: Text("Email")) + Spacer() + } + HStack { + Spacer() + SecureField($password, placeholder: Text("Password")) + Spacer() + } + } + Section { + HStack { + Spacer() + Button(action: {}) { + Text("Add Account") + } + Spacer() + } + } + } + .listStyle(.grouped) + .navigationBarTitle(Text(""), displayMode: .inline) + } + } + +} + +#if DEBUG +struct SettingsFeedbinAccountView_Previews : PreviewProvider { + static var previews: some View { + SettingsFeedbinAccountView(email: "", password: "") + } +} +#endif diff --git a/iOS/Settings/SettingsLocalAccountView.swift b/iOS/Settings/SettingsLocalAccountView.swift new file mode 100644 index 000000000..2e1db27f4 --- /dev/null +++ b/iOS/Settings/SettingsLocalAccountView.swift @@ -0,0 +1,54 @@ +// +// SettingsLocalAccountView.swift +// NetNewsWire-iOS +// +// Created by Maurice Parker on 6/11/19. +// Copyright © 2019 Ranchero Software. All rights reserved. +// + +import SwiftUI +import Account + +struct SettingsLocalAccountView : View { + @State var name: String + + var body: some View { + NavigationView { + List { + Section(header: + SettingsAccountLabelView(accountImage: "accountLocal", accountLabel: "On My Device").padding() + ) { + HStack { + Spacer() + TextField($name, placeholder: Text("Name (Optional)")) + Spacer() + } + } + Section { + HStack { + Spacer() + Button(action: { self.addAccount() }) { + Text("Add Account") + } + Spacer() + } + } + } + .listStyle(.grouped) + .navigationBarTitle(Text(""), displayMode: .inline) + } + } + + func addAccount() { + let account = AccountManager.shared.createAccount(type: .onMyMac) + account.name = name + } +} + +#if DEBUG +struct SettingsLocalAccountView_Previews : PreviewProvider { + static var previews: some View { + SettingsLocalAccountView(name: "") + } +} +#endif diff --git a/iOS/Settings/SettingsView.swift b/iOS/Settings/SettingsView.swift new file mode 100644 index 000000000..629e78b25 --- /dev/null +++ b/iOS/Settings/SettingsView.swift @@ -0,0 +1,94 @@ +// +// SettingsView.swift +// NetNewsWire-iOS +// +// Created by Maurice Parker on 6/11/19. +// Copyright © 2019 Ranchero Software. All rights reserved. +// + +import SwiftUI +import Account + +struct SettingsView : View { + @ObjectBinding var viewModel: SettingsViewModel + + var body: some View { + NavigationView { + List { + + Section(header: Text("ACCOUNTS")) { + ForEach(viewModel.accounts.identified(by: \.self)) { account in + Text(verbatim: account.nameForDisplay) + } + NavigationButton(destination: SettingsAddAccountView(), isDetail: false) { + Text("Add Account") + } + } + + Section(header: Text("ABOUT")) { + + Text("About NetNewsWire") + + Button(action: { + UIApplication.shared.open(URL(string: "https://ranchero.com/netnewswire/")!, options: [:]) + }) { + Text("Website") + } + + Button(action: { + UIApplication.shared.open(URL(string: "https://github.com/brentsimmons/NetNewsWire")!, options: [:]) + }) { + Text("Github Repository") + } + + Button(action: { + UIApplication.shared.open(URL(string: "https://github.com/brentsimmons/NetNewsWire/issues")!, options: [:]) + }) { + Text("Bug Tracker") + } + + Button(action: { + UIApplication.shared.open(URL(string: "https://github.com/brentsimmons/NetNewsWire/tree/master/Technotes")!, options: [:]) + }) { + Text("Technotes") + } + + Text("Add NetNewsWire News Feed") + + } + .foregroundColor(.primary) + + Section(header: Text("TIMELINE")) { + Toggle(isOn: $viewModel.sortOldestToNewest) { + Text("Sort Oldest to Newest") + } + Stepper(value: $viewModel.timelineNumberOfLines, in: 2...6) { + Text("Number of Text Lines: \(viewModel.timelineNumberOfLines)") + } + } + + Section(header: Text("DATABASE")) { + Picker(selection: $viewModel.refreshInterval, label: Text("Refresh Interval")) { + ForEach(RefreshInterval.allCases.identified(by: \.self)) { interval in + Text(interval.description()).tag(interval) + } + } + Text("Import Subscriptions...") + Text("Export Subscriptions...") + } + + } + .listStyle(.grouped) + .navigationBarTitle(Text("Settings"), displayMode: .inline) + + } + } +} + +#if DEBUG +struct SettingsView_Previews : PreviewProvider { + static var previews: some View { + SettingsView(viewModel: SettingsViewModel()) + } +} +#endif diff --git a/iOS/Settings/SettingsViewModel.swift b/iOS/Settings/SettingsViewModel.swift new file mode 100644 index 000000000..d51735fa4 --- /dev/null +++ b/iOS/Settings/SettingsViewModel.swift @@ -0,0 +1,68 @@ +// +// SettingsViewModel.swift +// NetNewsWire-iOS +// +// Created by Maurice Parker on 6/11/19. +// Copyright © 2019 Ranchero Software. All rights reserved. +// + +import Foundation +import SwiftUI +import Combine +import Account + +class SettingsViewModel: BindableObject { + + let didChange = PassthroughSubject() + + init() { + NotificationCenter.default.addObserver(self, selector: #selector(accountsDidChange(_:)), name: .AccountsDidChange, object: nil) + } + + var accounts: [Account] { + get { + return AccountManager.shared.accounts + } + set { + } + } + + var sortOldestToNewest: Bool { + get { + return AppDefaults.timelineSortDirection == .orderedDescending + } + set { + if newValue == true { + AppDefaults.timelineSortDirection = .orderedDescending + } else { + AppDefaults.timelineSortDirection = .orderedAscending + } + didChange.send(self) + } + } + + var timelineNumberOfLines: Int { + get { + return AppDefaults.timelineNumberOfLines + } + set { + AppDefaults.timelineNumberOfLines = newValue + didChange.send(self) + } + } + + var refreshInterval: RefreshInterval { + get { + return AppDefaults.refreshInterval + } + set { + AppDefaults.refreshInterval = newValue + didChange.send(self) + } + } + + @objc func accountsDidChange(_ notification: Notification) { + didChange.send(self) + } + +} diff --git a/iOS/Settings/AboutViewController.swift b/iOS/Settings/UIKit/AboutViewController.swift similarity index 100% rename from iOS/Settings/AboutViewController.swift rename to iOS/Settings/UIKit/AboutViewController.swift diff --git a/iOS/Settings/AddAccountViewController.swift b/iOS/Settings/UIKit/AddAccountViewController.swift similarity index 100% rename from iOS/Settings/AddAccountViewController.swift rename to iOS/Settings/UIKit/AddAccountViewController.swift diff --git a/iOS/Settings/AddLocalAccountViewController.swift b/iOS/Settings/UIKit/AddLocalAccountViewController.swift similarity index 100% rename from iOS/Settings/AddLocalAccountViewController.swift rename to iOS/Settings/UIKit/AddLocalAccountViewController.swift diff --git a/iOS/Settings/DetailAccountViewController.swift b/iOS/Settings/UIKit/DetailAccountViewController.swift similarity index 100% rename from iOS/Settings/DetailAccountViewController.swift rename to iOS/Settings/UIKit/DetailAccountViewController.swift diff --git a/iOS/Settings/FeedbinAccountViewController.swift b/iOS/Settings/UIKit/FeedbinAccountViewController.swift similarity index 100% rename from iOS/Settings/FeedbinAccountViewController.swift rename to iOS/Settings/UIKit/FeedbinAccountViewController.swift diff --git a/iOS/Settings/RefreshIntervalViewController.swift b/iOS/Settings/UIKit/RefreshIntervalViewController.swift similarity index 100% rename from iOS/Settings/RefreshIntervalViewController.swift rename to iOS/Settings/UIKit/RefreshIntervalViewController.swift diff --git a/iOS/Settings/Settings.storyboard b/iOS/Settings/UIKit/Settings.storyboard similarity index 97% rename from iOS/Settings/Settings.storyboard rename to iOS/Settings/UIKit/Settings.storyboard index 60212b3b2..51dbf1d2e 100644 --- a/iOS/Settings/Settings.storyboard +++ b/iOS/Settings/UIKit/Settings.storyboard @@ -1,13 +1,11 @@ - - - - + + - - + + @@ -25,11 +23,11 @@ - +