diff --git a/Tusker.xcodeproj/project.pbxproj b/Tusker.xcodeproj/project.pbxproj index 1a48c8e7..9b324709 100644 --- a/Tusker.xcodeproj/project.pbxproj +++ b/Tusker.xcodeproj/project.pbxproj @@ -1703,7 +1703,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1200; - LastUpgradeCheck = 1020; + LastUpgradeCheck = 1250; ORGANIZATIONNAME = Shadowfacts; TargetAttributes = { D61099AA2144B0CC00432DC2 = { @@ -2346,6 +2346,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -2408,6 +2409,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; diff --git a/Tusker.xcodeproj/xcshareddata/xcschemes/Pachyderm.xcscheme b/Tusker.xcodeproj/xcshareddata/xcschemes/Pachyderm.xcscheme index 96c9bec7..03a51284 100644 --- a/Tusker.xcodeproj/xcshareddata/xcschemes/Pachyderm.xcscheme +++ b/Tusker.xcodeproj/xcshareddata/xcschemes/Pachyderm.xcscheme @@ -1,6 +1,6 @@ - - - - Bool func didSelectAssets(_ assets: [PHAsset]) func captureFromCamera() diff --git a/Tusker/Screens/Asset Picker/AssetPickerViewController.swift b/Tusker/Screens/Asset Picker/AssetPickerViewController.swift index 4bcad314..91ceacb7 100644 --- a/Tusker/Screens/Asset Picker/AssetPickerViewController.swift +++ b/Tusker/Screens/Asset Picker/AssetPickerViewController.swift @@ -9,7 +9,7 @@ import UIKit import Photos -protocol AssetPickerViewControllerDelegate: class { +protocol AssetPickerViewControllerDelegate: AnyObject { func assetPicker(_ assetPicker: AssetPickerViewController, shouldAllowAssetOfType type: CompositionAttachmentData.AttachmentType) -> Bool func assetPicker(_ assetPicker: AssetPickerViewController, didSelectAttachments attachments: [CompositionAttachmentData]) } diff --git a/Tusker/Screens/Compose/ComposeDrawingViewController.swift b/Tusker/Screens/Compose/ComposeDrawingViewController.swift index 213cde6f..a3258955 100644 --- a/Tusker/Screens/Compose/ComposeDrawingViewController.swift +++ b/Tusker/Screens/Compose/ComposeDrawingViewController.swift @@ -9,7 +9,7 @@ import UIKit import PencilKit -protocol ComposeDrawingViewControllerDelegate: class { +protocol ComposeDrawingViewControllerDelegate: AnyObject { func composeDrawingViewControllerClose(_ drawingController: ComposeDrawingViewController) func composeDrawingViewController(_ drawingController: ComposeDrawingViewController, saveDrawing drawing: PKDrawing) } diff --git a/Tusker/Screens/Compose/ComposeHostingController.swift b/Tusker/Screens/Compose/ComposeHostingController.swift index 7e765052..824b491b 100644 --- a/Tusker/Screens/Compose/ComposeHostingController.swift +++ b/Tusker/Screens/Compose/ComposeHostingController.swift @@ -11,7 +11,7 @@ import Combine import Pachyderm import PencilKit -protocol ComposeHostingControllerDelegate: class { +protocol ComposeHostingControllerDelegate: AnyObject { func dismissCompose(mode: ComposeUIState.DismissMode) -> Bool } diff --git a/Tusker/Screens/Compose/ComposeTextViewCaretScrolling.swift b/Tusker/Screens/Compose/ComposeTextViewCaretScrolling.swift index 2a9cd0fe..565d2f5a 100644 --- a/Tusker/Screens/Compose/ComposeTextViewCaretScrolling.swift +++ b/Tusker/Screens/Compose/ComposeTextViewCaretScrolling.swift @@ -8,7 +8,7 @@ import UIKit -protocol ComposeTextViewCaretScrolling: class { +protocol ComposeTextViewCaretScrolling: AnyObject { var caretScrollPositionAnimator: UIViewPropertyAnimator? { get set } } diff --git a/Tusker/Screens/Compose/ComposeUIState.swift b/Tusker/Screens/Compose/ComposeUIState.swift index 49462008..279fb6fd 100644 --- a/Tusker/Screens/Compose/ComposeUIState.swift +++ b/Tusker/Screens/Compose/ComposeUIState.swift @@ -8,7 +8,7 @@ import SwiftUI -protocol ComposeUIStateDelegate: class { +protocol ComposeUIStateDelegate: AnyObject { var assetPickerDelegate: AssetPickerViewControllerDelegate? { get } func dismissCompose(mode: ComposeUIState.DismissMode) @@ -60,6 +60,6 @@ extension ComposeUIState { } } -protocol ComposeAutocompleteHandler: class { +protocol ComposeAutocompleteHandler: AnyObject { func autocomplete(with string: String) } diff --git a/Tusker/Screens/Compose/EmojiPickerCollectionViewController.swift b/Tusker/Screens/Compose/EmojiPickerCollectionViewController.swift index 238a2a46..0757189f 100644 --- a/Tusker/Screens/Compose/EmojiPickerCollectionViewController.swift +++ b/Tusker/Screens/Compose/EmojiPickerCollectionViewController.swift @@ -11,7 +11,7 @@ import Pachyderm private let reuseIdentifier = "EmojiCell" -protocol EmojiPickerCollectionViewControllerDelegate: class { +protocol EmojiPickerCollectionViewControllerDelegate: AnyObject { func selectedEmoji(_ emoji: Emoji) } diff --git a/Tusker/Screens/Drafts/DraftsTableViewController.swift b/Tusker/Screens/Drafts/DraftsTableViewController.swift index 70f6457c..2da8b53c 100644 --- a/Tusker/Screens/Drafts/DraftsTableViewController.swift +++ b/Tusker/Screens/Drafts/DraftsTableViewController.swift @@ -8,7 +8,7 @@ import UIKit -protocol DraftsTableViewControllerDelegate: class { +protocol DraftsTableViewControllerDelegate: AnyObject { func draftSelectionCanceled() func shouldSelectDraft(_ draft: Draft, completion: @escaping (Bool) -> Void) func draftSelected(_ draft: Draft) diff --git a/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.swift b/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.swift index 70fcaa12..39d6fcba 100644 --- a/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.swift +++ b/Tusker/Screens/Fast Account Switcher/FastAccountSwitcherViewController.swift @@ -8,7 +8,7 @@ import UIKit -protocol FastAccountSwitcherViewControllerDelegate: class { +protocol FastAccountSwitcherViewControllerDelegate: AnyObject { func fastAccountSwitcher(_ fastAccountSwitcher: FastAccountSwitcherViewController, triggerZoneContains point: CGPoint) -> Bool } diff --git a/Tusker/Screens/Main/MainSidebarViewController.swift b/Tusker/Screens/Main/MainSidebarViewController.swift index f72c7092..dd021d18 100644 --- a/Tusker/Screens/Main/MainSidebarViewController.swift +++ b/Tusker/Screens/Main/MainSidebarViewController.swift @@ -9,7 +9,7 @@ import UIKit import Pachyderm -protocol MainSidebarViewControllerDelegate: class { +protocol MainSidebarViewControllerDelegate: AnyObject { func sidebarRequestPresentCompose(_ sidebarViewController: MainSidebarViewController) func sidebar(_ sidebarViewController: MainSidebarViewController, didSelectItem item: MainSidebarViewController.Item) } diff --git a/Tusker/Screens/Main/MainTabBarViewController.swift b/Tusker/Screens/Main/MainTabBarViewController.swift index 601c3c77..ceebf63d 100644 --- a/Tusker/Screens/Main/MainTabBarViewController.swift +++ b/Tusker/Screens/Main/MainTabBarViewController.swift @@ -7,7 +7,6 @@ // import UIKit -import SwiftUI class MainTabBarViewController: UITabBarController, UITabBarControllerDelegate { diff --git a/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift b/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift index 726d04f2..a39dc661 100644 --- a/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift +++ b/Tusker/Screens/Onboarding/InstanceSelectorTableViewController.swift @@ -10,7 +10,7 @@ import UIKit import Combine import Pachyderm -protocol InstanceSelectorTableViewControllerDelegate: class { +protocol InstanceSelectorTableViewControllerDelegate: AnyObject { func didSelectInstance(url: URL) } diff --git a/Tusker/Screens/Search/SearchResultsViewController.swift b/Tusker/Screens/Search/SearchResultsViewController.swift index 604b25c8..96b6496f 100644 --- a/Tusker/Screens/Search/SearchResultsViewController.swift +++ b/Tusker/Screens/Search/SearchResultsViewController.swift @@ -14,7 +14,7 @@ fileprivate let accountCell = "accountCell" fileprivate let statusCell = "statusCell" fileprivate let hashtagCell = "hashtagCell" -protocol SearchResultsViewControllerDelegate: class { +protocol SearchResultsViewControllerDelegate: AnyObject { func selectedSearchResult(account accountID: String) func selectedSearchResult(hashtag: Hashtag) func selectedSearchResult(status statusID: String) diff --git a/Tusker/Screens/Timeline/InstanceTimelineViewController.swift b/Tusker/Screens/Timeline/InstanceTimelineViewController.swift index 9f33be9f..235d9cba 100644 --- a/Tusker/Screens/Timeline/InstanceTimelineViewController.swift +++ b/Tusker/Screens/Timeline/InstanceTimelineViewController.swift @@ -8,7 +8,7 @@ import UIKit -protocol InstanceTimelineViewControllerDelegate: class { +protocol InstanceTimelineViewControllerDelegate: AnyObject { func didSaveInstance(url: URL) func didUnsaveInstance(url: URL) } diff --git a/Tusker/Screens/Utilities/Previewing.swift b/Tusker/Screens/Utilities/Previewing.swift index 260cc15d..36e30b28 100644 --- a/Tusker/Screens/Utilities/Previewing.swift +++ b/Tusker/Screens/Utilities/Previewing.swift @@ -10,7 +10,7 @@ import UIKit import SafariServices import Pachyderm -protocol MenuPreviewProvider: class { +protocol MenuPreviewProvider: AnyObject { typealias PreviewProviders = (content: UIContextMenuContentPreviewProvider, actions: () -> [UIMenuElement]) diff --git a/Tusker/Views/Attachments/AttachmentView.swift b/Tusker/Views/Attachments/AttachmentView.swift index 6c4d4475..8a41cf61 100644 --- a/Tusker/Views/Attachments/AttachmentView.swift +++ b/Tusker/Views/Attachments/AttachmentView.swift @@ -11,7 +11,7 @@ import Pachyderm import Gifu import AVFoundation -protocol AttachmentViewDelegate: class { +protocol AttachmentViewDelegate: AnyObject { func attachmentViewGallery(startingAt index: Int) -> GalleryViewController? func attachmentViewPresent(_ vc: UIViewController, animated: Bool) } diff --git a/Tusker/Views/BaseEmojiLabel.swift b/Tusker/Views/BaseEmojiLabel.swift index 63b69a3b..a4e66147 100644 --- a/Tusker/Views/BaseEmojiLabel.swift +++ b/Tusker/Views/BaseEmojiLabel.swift @@ -11,7 +11,7 @@ import Pachyderm private let emojiRegex = try! NSRegularExpression(pattern: ":(\\w+):", options: []) -protocol BaseEmojiLabel: class { +protocol BaseEmojiLabel: AnyObject { var emojiIdentifier: String? { get set } var emojiRequests: [ImageCache.Request] { get set } var emojiFont: UIFont { get }