diff --git a/App/View Controllers/AnnouncementViewController.swift b/App/View Controllers/AnnouncementViewController.swift index 1f53a1308..a12a558aa 100644 --- a/App/View Controllers/AnnouncementViewController.swift +++ b/App/View Controllers/AnnouncementViewController.swift @@ -434,12 +434,8 @@ private struct RenderModel: CustomDebugStringConvertible, Equatable, StencilCont return "ipad" case .phone: return "iphone" - case .carPlay, .tv, .unspecified: + case .carPlay, .mac, .tv, .unspecified, .vision: fallthrough - #if swift(>=5.3) - case .mac: - fallthrough - #endif @unknown default: assertionFailure("handle unknown user interface idiom") return "iphone" diff --git a/Awful.xcodeproj/project.pbxproj b/Awful.xcodeproj/project.pbxproj index b9dd49e36..c47f2bae8 100644 --- a/Awful.xcodeproj/project.pbxproj +++ b/Awful.xcodeproj/project.pbxproj @@ -1609,7 +1609,6 @@ TargetAttributes = { 1C3A143219DFC5D10022C44C = { CreatedOnToolsVersion = 6.0.1; - DevelopmentTeam = 9RR6L9X39A; }; 1C56972024C3F1900077CA62 = { CreatedOnToolsVersion = 12.0; @@ -2129,6 +2128,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = ""; INFOPLIST_FILE = "Smilies Extra/Extractor/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -2143,6 +2143,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = ""; INFOPLIST_FILE = "Smilies Extra/Extractor/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -2477,6 +2478,7 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "iPhone Developer"; INFOPLIST_FILE = App/Tests/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = ca.nolanw.Awful.Tests; @@ -2495,6 +2497,7 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_ENTITLEMENTS = ""; CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; INFOPLIST_FILE = App/Tests/Info.plist; @@ -2514,9 +2517,11 @@ PRODUCT_BUNDLE_IDENTIFIER = com.awfulapp.Awful.debug; PRODUCT_MODULE_NAME = Awful; PRODUCT_NAME = AwfulDebug; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OBJC_BRIDGING_HEADER = "App/Main/Awful-Bridging-Header.h"; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -2530,8 +2535,10 @@ PRODUCT_BUNDLE_IDENTIFIER = com.awfulapp.Awful; PRODUCT_MODULE_NAME = Awful; PRODUCT_NAME = Awful; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = YES; SWIFT_OBJC_BRIDGING_HEADER = "App/Main/Awful-Bridging-Header.h"; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; diff --git a/ImgurAnonymousAPI/Sources/ImgurAnonymousAPI/AsynchronousOperation.swift b/ImgurAnonymousAPI/Sources/ImgurAnonymousAPI/AsynchronousOperation.swift index 01e303369..eef1a1038 100644 --- a/ImgurAnonymousAPI/Sources/ImgurAnonymousAPI/AsynchronousOperation.swift +++ b/ImgurAnonymousAPI/Sources/ImgurAnonymousAPI/AsynchronousOperation.swift @@ -93,10 +93,10 @@ internal class AsynchronousOperation: Foundation.Operation { extension AsynchronousOperation { - /// Finds the first `AsynchronousOperation` among this operation's dependencies that resulted in a `T`. Throws an error if no such operation is found. - func firstDependencyValue(ofType resultType: T.Type) throws -> T { + /// Finds the first `AsynchronousOperation` among this operation's dependencies that resulted in a `U`. Throws an error if no such operation is found. + func firstDependencyValue(ofType resultType: U.Type) throws -> U { let candidates = dependencies.lazy - .compactMap { $0 as? AsynchronousOperation } + .compactMap { $0 as? AsynchronousOperation } for op in candidates.dropLast() { if let value = op.result?.value { @@ -105,7 +105,7 @@ extension AsynchronousOperation { } guard let lastResult = candidates.last?.result else { - throw MissingDependency(dependentResultValueType: T.self) + throw MissingDependency(dependentResultValueType: U.self) } return try lastResult.unwrap() diff --git a/Vendor/MRProgress/Sources/MRProgress/MRBlurView.m b/Vendor/MRProgress/Sources/MRProgress/MRBlurView.m index 00d59ebbb..ce505b231 100644 --- a/Vendor/MRProgress/Sources/MRProgress/MRBlurView.m +++ b/Vendor/MRProgress/Sources/MRProgress/MRBlurView.m @@ -84,9 +84,12 @@ - (void)didMoveToWindow { - (void)registerForNotificationCenter { NSNotificationCenter *center = NSNotificationCenter.defaultCenter; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [center addObserver:self selector:@selector(statusBarOrientationDidChange:) name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; +#pragma clang diagnostic pop } - (void)unregisterFromNotificationCenter { @@ -155,7 +158,10 @@ - (UIImage *)snapshot { // Absolute origin of receiver CGPoint origin = self.bounds.origin; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" if (UIInterfaceOrientationIsLandscape(UIApplication.sharedApplication.statusBarOrientation)) { +#pragma clang diagnostic pop origin = CGPointMake(origin.y, origin.x); } origin = [self convertPoint:origin toView:window]; diff --git a/Vendor/MRProgress/Sources/MRProgress/MRCircularProgressView.m b/Vendor/MRProgress/Sources/MRProgress/MRCircularProgressView.m index 293d6761b..cfef7610e 100644 --- a/Vendor/MRProgress/Sources/MRProgress/MRCircularProgressView.m +++ b/Vendor/MRProgress/Sources/MRProgress/MRCircularProgressView.m @@ -15,7 +15,7 @@ static NSString *const MRCircularProgressViewProgressAnimationKey = @"MRCircularProgressViewProgressAnimationKey"; -@interface MRCircularProgressView () +@interface MRCircularProgressView () @property (nonatomic, strong, readwrite) NSNumberFormatter *numberFormatter; @property (nonatomic, strong, readwrite) NSTimer *valueLabelUpdateTimer; diff --git a/Vendor/MRProgress/Sources/MRProgress/MRProgressOverlayView.m b/Vendor/MRProgress/Sources/MRProgress/MRProgressOverlayView.m index 8131e4b33..d1bf7f9b3 100644 --- a/Vendor/MRProgress/Sources/MRProgress/MRProgressOverlayView.m +++ b/Vendor/MRProgress/Sources/MRProgress/MRProgressOverlayView.m @@ -795,7 +795,8 @@ - (void)applyProgressAnimated:(BOOL)animated { NSStringFromSelector(@selector(setProgress:animated:))); #endif } - [((id)self.modeView) setProgress:self.progress]; + // `self.modeView` may not in fact be a `UIProgressView` but it's enough to tell the compiler that we want the `-setProgress:` that takes a `float` parameter. + [((UIProgressView *)self.modeView) setProgress:self.progress]; } else { NSAssert(self.mode == MRProgressOverlayViewModeDeterminateCircular || self.mode == MRProgressOverlayViewModeDeterminateHorizontalBar, diff --git a/Vendor/PullToRefresh/Package.swift b/Vendor/PullToRefresh/Package.swift index dbd7e51dd..c1370fd54 100644 --- a/Vendor/PullToRefresh/Package.swift +++ b/Vendor/PullToRefresh/Package.swift @@ -4,6 +4,9 @@ import PackageDescription let package = Package( name: "PullToRefresh", + platforms: [ + .iOS(.v13), + ], products: [ .library( name: "PullToRefresh", diff --git a/Vendor/PullToRefresh/Sources/PullToRefresh/DefaultRefreshView.swift b/Vendor/PullToRefresh/Sources/PullToRefresh/DefaultRefreshView.swift index 929d3eb83..0fcf7589c 100644 --- a/Vendor/PullToRefresh/Sources/PullToRefresh/DefaultRefreshView.swift +++ b/Vendor/PullToRefresh/Sources/PullToRefresh/DefaultRefreshView.swift @@ -11,11 +11,7 @@ import UIKit class DefaultRefreshView: UIView { fileprivate(set) lazy var activityIndicator: UIActivityIndicatorView! = { - #if swift(>=4.2) - let activityIndicator = UIActivityIndicatorView(style: .gray) - #else - let activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: .gray) - #endif + let activityIndicator = UIActivityIndicatorView(style: .medium) self.addSubview(activityIndicator) return activityIndicator }() diff --git a/Vendor/PullToRefresh/Sources/PullToRefresh/PullToRefresh.swift b/Vendor/PullToRefresh/Sources/PullToRefresh/PullToRefresh.swift index be8791a01..d17499478 100644 --- a/Vendor/PullToRefresh/Sources/PullToRefresh/PullToRefresh.swift +++ b/Vendor/PullToRefresh/Sources/PullToRefresh/PullToRefresh.swift @@ -136,7 +136,7 @@ extension PullToRefresh { fileprivate struct KVO { - static var context = "PullToRefreshKVOContext" + static var context = 0 enum ScrollViewPath { static let contentOffset = #keyPath(UIScrollView.contentOffset)