upgrade to minimum iOS 15.0 support

pull/1023/head
Ryan ZHAO 10 months ago
parent 90de873ea0
commit ecb1b83a8e

@ -6887,7 +6887,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = SessionShareExtension/Meta/Info.plist; INFOPLIST_FILE = SessionShareExtension/Meta/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -6962,7 +6962,7 @@
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = SessionShareExtension/Meta/Info.plist; INFOPLIST_FILE = SessionShareExtension/Meta/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7019,7 +7019,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = SessionNotificationServiceExtension/Meta/Info.plist; INFOPLIST_FILE = SessionNotificationServiceExtension/Meta/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7096,7 +7096,7 @@
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = SessionNotificationServiceExtension/Meta/Info.plist; INFOPLIST_FILE = SessionNotificationServiceExtension/Meta/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7151,7 +7151,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = SessionUIKit/Meta/Info.plist; INFOPLIST_FILE = SessionUIKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7231,7 +7231,7 @@
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = SessionUIKit/Meta/Info.plist; INFOPLIST_FILE = SessionUIKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7299,7 +7299,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = SignalUtilitiesKit/Meta/Info.plist; INFOPLIST_FILE = SignalUtilitiesKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7387,7 +7387,7 @@
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = SignalUtilitiesKit/Meta/Info.plist; INFOPLIST_FILE = SignalUtilitiesKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7460,7 +7460,7 @@
); );
INFOPLIST_FILE = SessionSnodeKit/Meta/Info.plist; INFOPLIST_FILE = SessionSnodeKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7561,7 +7561,7 @@
); );
INFOPLIST_FILE = SessionSnodeKit/Meta/Info.plist; INFOPLIST_FILE = SessionSnodeKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7647,7 +7647,7 @@
); );
INFOPLIST_FILE = SessionUtilitiesKit/Meta/Info.plist; INFOPLIST_FILE = SessionUtilitiesKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7753,7 +7753,7 @@
); );
INFOPLIST_FILE = SessionUtilitiesKit/Meta/Info.plist; INFOPLIST_FILE = SessionUtilitiesKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7839,7 +7839,7 @@
); );
INFOPLIST_FILE = SessionMessagingKit/Meta/Info.plist; INFOPLIST_FILE = SessionMessagingKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -7944,7 +7944,7 @@
); );
INFOPLIST_FILE = SessionMessagingKit/Meta/Info.plist; INFOPLIST_FILE = SessionMessagingKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -8174,7 +8174,7 @@
"\"$(SRCROOT)/Libraries\"/**", "\"$(SRCROOT)/Libraries\"/**",
); );
INFOPLIST_FILE = "Session/Meta/Session-Info.plist"; INFOPLIST_FILE = "Session/Meta/Session-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -8244,7 +8244,7 @@
"\"$(SRCROOT)/Libraries\"/**", "\"$(SRCROOT)/Libraries\"/**",
); );
INFOPLIST_FILE = "Session/Meta/Session-Info.plist"; INFOPLIST_FILE = "Session/Meta/Session-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@ -8295,7 +8295,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS $(inherited) -D SQLITE_HAS_CODEC -D GRDBCIPHER -D SQLITE_ENABLE_FTS5 -Xfrontend -warn-long-expression-type-checking=100"; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS $(inherited) -D SQLITE_HAS_CODEC -D GRDBCIPHER -D SQLITE_ENABLE_FTS5 -Xfrontend -warn-long-expression-type-checking=100";
@ -8358,7 +8358,7 @@
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = io.oxen.SessionTests; PRODUCT_BUNDLE_IDENTIFIER = io.oxen.SessionTests;
@ -8401,7 +8401,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
@ -8464,7 +8464,7 @@
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES; LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
@ -8505,7 +8505,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS $(inherited) -D SQLITE_HAS_CODEC -D GRDBCIPHER -D SQLITE_ENABLE_FTS5 -Xfrontend -warn-long-expression-type-checking=100"; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS $(inherited) -D SQLITE_HAS_CODEC -D GRDBCIPHER -D SQLITE_ENABLE_FTS5 -Xfrontend -warn-long-expression-type-checking=100";
@ -8567,7 +8567,7 @@
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = io.oxen.SessionUtilitiesKitTests; PRODUCT_BUNDLE_IDENTIFIER = io.oxen.SessionUtilitiesKitTests;
@ -8607,7 +8607,7 @@
GCC_OPTIMIZATION_LEVEL = 0; GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MODULEMAP_FILE = "$(SRCROOT)/SessionMessagingKit/Meta/SessionUtil.modulemap"; MODULEMAP_FILE = "$(SRCROOT)/SessionMessagingKit/Meta/SessionUtil.modulemap";
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20";
@ -8670,7 +8670,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MODULEMAP_FILE = "$(SRCROOT)/SessionMessagingKit/Meta/SessionUtil.modulemap"; MODULEMAP_FILE = "$(SRCROOT)/SessionMessagingKit/Meta/SessionUtil.modulemap";
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20"; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++20";
@ -8714,7 +8714,7 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS $(inherited) -D SQLITE_HAS_CODEC -D GRDBCIPHER -D SQLITE_ENABLE_FTS5 -Xfrontend -warn-long-expression-type-checking=100"; OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS $(inherited) -D SQLITE_HAS_CODEC -D GRDBCIPHER -D SQLITE_ENABLE_FTS5 -Xfrontend -warn-long-expression-type-checking=100";
@ -8776,7 +8776,7 @@
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = io.oxen.SessionMessagingKitTests; PRODUCT_BUNDLE_IDENTIFIER = io.oxen.SessionMessagingKitTests;

@ -110,10 +110,7 @@ final class NewClosedGroupVC: BaseVC, UITableViewDataSource, UITableViewDelegate
result.touchDelegate = self result.touchDelegate = self
result.dataSource = self result.dataSource = self
result.delegate = self result.delegate = self
result.sectionHeaderTopPadding = 0
if #available(iOS 15.0, *) {
result.sectionHeaderTopPadding = 0
}
return result return result
}() }()

@ -39,11 +39,7 @@ public struct LinkPreviewView_SwiftUI: View {
alignment: .leading alignment: .leading
) { ) {
if state is LinkPreview.SentState { if state is LinkPreview.SentState {
if #available(iOS 14.0, *) { ThemeManager.currentTheme.colorSwiftUI(for: .messageBubble_overlay).ignoresSafeArea()
ThemeManager.currentTheme.colorSwiftUI(for: .messageBubble_overlay).ignoresSafeArea()
} else {
ThemeManager.currentTheme.colorSwiftUI(for: .messageBubble_overlay)
}
} }
HStack( HStack(

@ -208,11 +208,7 @@ struct QuoteView_SwiftUI: View {
struct QuoteView_SwiftUI_Previews: PreviewProvider { struct QuoteView_SwiftUI_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
ZStack { ZStack {
if #available(iOS 14.0, *) { ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
} else {
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary)
}
QuoteView_SwiftUI( QuoteView_SwiftUI(
info: QuoteView_SwiftUI.Info( info: QuoteView_SwiftUI.Info(

@ -91,11 +91,8 @@ final class HomeVC: BaseVC, LibSessionRespondingViewController, UITableViewDataS
result.register(view: FullConversationCell.self) result.register(view: FullConversationCell.self)
result.dataSource = self result.dataSource = self
result.delegate = self result.delegate = self
result.sectionHeaderTopPadding = 0
if #available(iOS 15.0, *) {
result.sectionHeaderTopPadding = 0
}
return result return result
}() }()

@ -152,17 +152,10 @@ struct EnterAccountIdScreen: View {
) )
) { ) {
ZStack { ZStack {
if #available(iOS 14.0, *) { Text("\("messageNewDescription".localized())\(Image(systemName: "questionmark.circle"))")
Text("\("messageNewDescription".localized())\(Image(systemName: "questionmark.circle"))") .font(.system(size: Values.verySmallFontSize))
.font(.system(size: Values.verySmallFontSize)) .foregroundColor(themeColor: .textSecondary)
.foregroundColor(themeColor: .textSecondary) .multilineTextAlignment(.center)
.multilineTextAlignment(.center)
} else {
Text("messageNewDescription".localized())
.font(.system(size: Values.verySmallFontSize))
.foregroundColor(themeColor: .textSecondary)
.multilineTextAlignment(.center)
}
} }
.accessibility( .accessibility(
Accessibility( Accessibility(

@ -64,11 +64,8 @@ public class DocumentTileViewController: UIViewController, UITableViewDelegate,
result.dataSource = self result.dataSource = self
// Feels a bit weird to have content smashed all the way to the bottom edge. // Feels a bit weird to have content smashed all the way to the bottom edge.
result.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 20, right: 0) result.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 20, right: 0)
result.sectionHeaderTopPadding = 0
if #available(iOS 15.0, *) {
result.sectionHeaderTopPadding = 0
}
return result return result
}() }()

@ -91,18 +91,14 @@ class ImagePickerGridController: UICollectionViewController, PhotoLibraryDelegat
self.selectionPanGesture = selectionPanGesture self.selectionPanGesture = selectionPanGesture
collectionView.addGestureRecognizer(selectionPanGesture) collectionView.addGestureRecognizer(selectionPanGesture)
if #available(iOS 14, *) { if PHPhotoLibrary.authorizationStatus(for: .readWrite) == .limited {
if PHPhotoLibrary.authorizationStatus(for: .readWrite) == .limited { let addSeletedPhotoButton = UIBarButtonItem.init(barButtonSystemItem: .add, target: self, action: #selector(addSelectedPhoto))
let addSeletedPhotoButton = UIBarButtonItem.init(barButtonSystemItem: .add, target: self, action: #selector(addSelectedPhoto)) self.navigationItem.rightBarButtonItem = addSeletedPhotoButton
self.navigationItem.rightBarButtonItem = addSeletedPhotoButton
}
} }
} }
@objc func addSelectedPhoto(_ sender: Any) { @objc func addSelectedPhoto(_ sender: Any) {
if #available(iOS 14, *) { PHPhotoLibrary.shared().presentLimitedLibraryPicker(from: self)
PHPhotoLibrary.shared().presentLimitedLibraryPicker(from: self)
}
} }
var selectionPanGesture: UIPanGestureRecognizer? var selectionPanGesture: UIPanGestureRecognizer?

@ -34,7 +34,7 @@ class MediaInteractiveDismiss: UIPercentDrivenInteractiveTransition {
let gesture: DirectionalPanGestureRecognizer = DirectionalPanGestureRecognizer(direction: .vertical, target: self, action: #selector(handleGesture(_:))) let gesture: DirectionalPanGestureRecognizer = DirectionalPanGestureRecognizer(direction: .vertical, target: self, action: #selector(handleGesture(_:)))
// Allow panning with trackpad // Allow panning with trackpad
if #available(iOS 13.4, *) { gesture.allowedScrollTypesMask = .continuous } gesture.allowedScrollTypesMask = .continuous
view.addGestureRecognizer(gesture) view.addGestureRecognizer(gesture)
} }

@ -104,8 +104,7 @@ public class AppEnvironment {
defer { fileHandle.closeFile() } defer { fileHandle.closeFile() }
// Move to the end of the file to insert the logs // Move to the end of the file to insert the logs
if #available(iOS 13.4, *) { try fileHandle.seekToEnd() } try fileHandle.seekToEnd()
else { fileHandle.seekToEndOfFile() }
try extensionLogs try extensionLogs
.grouped(by: \.type) .grouped(by: \.type)
@ -126,14 +125,12 @@ public class AppEnvironment {
// Write the type start separator if needed // Write the type start separator if needed
if !hasWrittenStartLog { if !hasWrittenStartLog {
if #available(iOS 13.4, *) { try fileHandle.write(contentsOf: typeNameStartData) } try fileHandle.write(contentsOf: typeNameStartData)
else { fileHandle.write(typeNameStartData) }
hasWrittenStartLog = true hasWrittenStartLog = true
} }
// Write the log data to the log file // Write the log data to the log file
if #available(iOS 13.4, *) { try fileHandle.write(contentsOf: logData) } try fileHandle.write(contentsOf: logData)
else { fileHandle.write(logData) }
// Extension logs have been writen to the app logs, remove them now // Extension logs have been writen to the app logs, remove them now
try? FileManager.default.removeItem(atPath: path) try? FileManager.default.removeItem(atPath: path)
@ -141,8 +138,7 @@ public class AppEnvironment {
// Write the type end separator if needed // Write the type end separator if needed
if hasWrittenStartLog { if hasWrittenStartLog {
if #available(iOS 13.4, *) { try fileHandle.write(contentsOf: typeNameEndData) } try fileHandle.write(contentsOf: typeNameEndData)
else { fileHandle.write(typeNameEndData) }
} }
} }
} }

File diff suppressed because one or more lines are too long

@ -19,11 +19,7 @@ struct DisplayNameScreen: View {
var body: some View { var body: some View {
ZStack(alignment: .center) { ZStack(alignment: .center) {
if #available(iOS 14.0, *) { ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
} else {
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary)
}
VStack( VStack(
alignment: .leading, alignment: .leading,

@ -11,11 +11,7 @@ struct LandingScreen: View {
var body: some View { var body: some View {
ZStack(alignment: .center) { ZStack(alignment: .center) {
if #available(iOS 14.0, *) { ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
} else {
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary)
}
VStack( VStack(
alignment: .center, alignment: .center,

@ -16,11 +16,8 @@ struct LoadAccountScreen: View {
var body: some View { var body: some View {
ZStack(alignment: .topLeading) { ZStack(alignment: .topLeading) {
if #available(iOS 14.0, *) { ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
} else {
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary)
}
VStack( VStack(
spacing: 0 spacing: 0
){ ){

@ -21,11 +21,7 @@ struct LoadingScreen: View {
var body: some View { var body: some View {
ZStack(alignment: .center) { ZStack(alignment: .center) {
if #available(iOS 14.0, *) { ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
} else {
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary)
}
VStack( VStack(
alignment: .center, alignment: .center,

@ -50,11 +50,7 @@ struct PNModeScreen: View {
var body: some View { var body: some View {
ZStack(alignment: .center) { ZStack(alignment: .center) {
if #available(iOS 14.0, *) { ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary).ignoresSafeArea()
} else {
ThemeManager.currentTheme.colorSwiftUI(for: .backgroundPrimary)
}
VStack( VStack(
alignment: .leading, alignment: .leading,

@ -202,11 +202,7 @@ struct SessionCarouselView_SwiftUI_Previews: PreviewProvider {
@State static var index = 1 @State static var index = 1
static var previews: some View { static var previews: some View {
ZStack { ZStack {
if #available(iOS 14.0, *) { Color.black.ignoresSafeArea()
Color.black.ignoresSafeArea()
} else {
Color.black
}
SessionCarouselView_SwiftUI( SessionCarouselView_SwiftUI(
index: $index, index: $index,

@ -46,11 +46,8 @@ class SessionTableViewController<ViewModel>: BaseVC, UITableViewDataSource, UITa
result.registerHeaderFooterView(view: SessionFooterView.self) result.registerHeaderFooterView(view: SessionFooterView.self)
result.dataSource = self result.dataSource = self
result.delegate = self result.delegate = self
result.sectionHeaderTopPadding = 0
if #available(iOS 15.0, *) {
result.sectionHeaderTopPadding = 0
}
return result return result
}() }()

@ -95,35 +95,22 @@ public enum Permissions {
presentingViewController: UIViewController? = nil, presentingViewController: UIViewController? = nil,
onAuthorized: @escaping () -> Void onAuthorized: @escaping () -> Void
) { ) {
let authorizationStatus: PHAuthorizationStatus let authorizationStatus = PHPhotoLibrary.authorizationStatus(for: .readWrite)
if #available(iOS 14, *) { if authorizationStatus == .notDetermined {
authorizationStatus = PHPhotoLibrary.authorizationStatus(for: .readWrite) // When the user chooses to select photos (which is the .limit status),
if authorizationStatus == .notDetermined { // the PHPhotoUI will present the picker view on the top of the front view.
// When the user chooses to select photos (which is the .limit status), // Since we have the ScreenLockUI showing when we request premissions,
// the PHPhotoUI will present the picker view on the top of the front view. // the picker view will be presented on the top of the ScreenLockUI.
// Since we have the ScreenLockUI showing when we request premissions, // However, the ScreenLockUI will dismiss with the permission request alert view, so
// the picker view will be presented on the top of the ScreenLockUI. // the picker view then will dismiss, too. The selection process cannot be finished
// However, the ScreenLockUI will dismiss with the permission request alert view, so // this way. So we add a flag (isRequestingPermission) to prevent the ScreenLockUI
// the picker view then will dismiss, too. The selection process cannot be finished // from showing when we request the photo library permission.
// this way. So we add a flag (isRequestingPermission) to prevent the ScreenLockUI SessionEnvironment.shared?.isRequestingPermission = true
// from showing when we request the photo library permission.
SessionEnvironment.shared?.isRequestingPermission = true PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in
SessionEnvironment.shared?.isRequestingPermission = false
PHPhotoLibrary.requestAuthorization(for: .readWrite) { status in if [ PHAuthorizationStatus.authorized, PHAuthorizationStatus.limited ].contains(status) {
SessionEnvironment.shared?.isRequestingPermission = false onAuthorized()
if [ PHAuthorizationStatus.authorized, PHAuthorizationStatus.limited ].contains(status) {
onAuthorized()
}
}
}
}
else {
authorizationStatus = PHPhotoLibrary.authorizationStatus()
if authorizationStatus == .notDetermined {
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
onAuthorized()
}
} }
} }
} }

@ -16,11 +16,7 @@ public struct CompatibleScrollingVStack<Content> : View where Content : View {
public var body: some View { public var body: some View {
ScrollView { ScrollView {
if #available(iOS 14, *) { LazyVStack(alignment: alignment, spacing: spacing, pinnedViews: [], content:content)
LazyVStack(alignment: alignment, spacing: spacing, pinnedViews: [], content:content)
} else {
VStack(alignment: alignment, spacing: spacing, content:content)
}
} }
} }
} }

@ -66,7 +66,7 @@ public struct SessionTextField<ExplanationView>: View where ExplanationView: Vie
.font(.system(size: Values.smallFontSize)) .font(.system(size: Values.smallFontSize))
.foregroundColor(themeColor: textThemeColor) .foregroundColor(themeColor: textThemeColor)
.accessibility(self.accessibility) .accessibility(self.accessibility)
} else if #available(iOS 14.0, *) { } else {
ZStack { ZStack {
TextEditor( TextEditor(
text: $text.onChange{ value in text: $text.onChange{ value in
@ -94,19 +94,6 @@ public struct SessionTextField<ExplanationView>: View where ExplanationView: Vie
) )
} }
.fixedSize(horizontal: false, vertical: true) .fixedSize(horizontal: false, vertical: true)
} else {
SwiftUI.TextField(
"",
text: $text.onChange{ value in
if error?.isEmpty == false && text != value {
previousError = error!
error = nil
}
}
)
.font(.system(size: Values.smallFontSize))
.foregroundColor(themeColor: textThemeColor)
.accessibility(self.accessibility)
} }
} }
.padding(.horizontal, Values.largeSpacing) .padding(.horizontal, Values.largeSpacing)

@ -150,55 +150,35 @@ public enum ThemeManager {
ThemeManager.mainWindow?.tintColor = textPrimary ThemeManager.mainWindow?.tintColor = textPrimary
ThemeManager.mainWindow?.rootViewController?.setNeedsStatusBarAppearanceUpdate() ThemeManager.mainWindow?.rootViewController?.setNeedsStatusBarAppearanceUpdate()
// Update the nav bars to use the right colours (we default to the 'primary' value) let appearance = UINavigationBarAppearance()
UINavigationBar.appearance().barTintColor = ThemeManager.currentTheme.color(for: .backgroundPrimary) appearance.configureWithOpaqueBackground()
UINavigationBar.appearance().isTranslucent = false appearance.backgroundColor = ThemeManager.currentTheme.color(for: .backgroundPrimary)
UINavigationBar.appearance().tintColor = textPrimary appearance.shadowImage = ThemeManager.currentTheme.color(for: .backgroundPrimary)?.toImage()
UINavigationBar.appearance().shadowImage = ThemeManager.currentTheme.color(for: .backgroundPrimary)?.toImage() appearance.titleTextAttributes = [
UINavigationBar.appearance().titleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimary NSAttributedString.Key.foregroundColor: textPrimary
] ]
UINavigationBar.appearance().largeTitleTextAttributes = [ appearance.largeTitleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimary NSAttributedString.Key.foregroundColor: textPrimary
] ]
// Update the bar button item appearance // Apply the button item appearance as well
UIBarButtonItem.appearance().tintColor = textPrimary let barButtonItemAppearance = UIBarButtonItemAppearance(style: .plain)
barButtonItemAppearance.normal.titleTextAttributes = [ .foregroundColor: textPrimary ]
barButtonItemAppearance.disabled.titleTextAttributes = [ .foregroundColor: textPrimary ]
barButtonItemAppearance.highlighted.titleTextAttributes = [ .foregroundColor: textPrimary ]
barButtonItemAppearance.focused.titleTextAttributes = [ .foregroundColor: textPrimary ]
appearance.buttonAppearance = barButtonItemAppearance
appearance.backButtonAppearance = barButtonItemAppearance
appearance.doneButtonAppearance = barButtonItemAppearance
UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance
// Update toolbars to use the right colours // Update toolbars to use the right colours
UIToolbar.appearance().barTintColor = ThemeManager.currentTheme.color(for: .backgroundPrimary) UIToolbar.appearance().barTintColor = ThemeManager.currentTheme.color(for: .backgroundPrimary)
UIToolbar.appearance().isTranslucent = false UIToolbar.appearance().isTranslucent = false
UIToolbar.appearance().tintColor = textPrimary UIToolbar.appearance().tintColor = textPrimary
// Note: Looks like there were changes to the appearance behaviour in iOS 15, unfortunately
// this breaks parts of the old 'UINavigationBar.appearance()' logic so we need to do everything
// again using the new API...
if #available(iOS 15.0, *) {
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = ThemeManager.currentTheme.color(for: .backgroundPrimary)
appearance.shadowImage = ThemeManager.currentTheme.color(for: .backgroundPrimary)?.toImage()
appearance.titleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimary
]
appearance.largeTitleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimary
]
// Apply the button item appearance as well
let barButtonItemAppearance = UIBarButtonItemAppearance(style: .plain)
barButtonItemAppearance.normal.titleTextAttributes = [ .foregroundColor: textPrimary ]
barButtonItemAppearance.disabled.titleTextAttributes = [ .foregroundColor: textPrimary ]
barButtonItemAppearance.highlighted.titleTextAttributes = [ .foregroundColor: textPrimary ]
barButtonItemAppearance.focused.titleTextAttributes = [ .foregroundColor: textPrimary ]
appearance.buttonAppearance = barButtonItemAppearance
appearance.backButtonAppearance = barButtonItemAppearance
appearance.doneButtonAppearance = barButtonItemAppearance
UINavigationBar.appearance().standardAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance
}
// Note: 'UINavigationBar.appearance' only affects newly created nav bars so we need // Note: 'UINavigationBar.appearance' only affects newly created nav bars so we need
// to force-update any current navigation bar (unfortunately the only way to do this // to force-update any current navigation bar (unfortunately the only way to do this
// is to remove the nav controller from the view hierarchy and then re-add it) // is to remove the nav controller from the view hierarchy and then re-add it)
@ -251,28 +231,20 @@ public enum ThemeManager {
let navigationBackground: ThemeValue = (navController.viewControllers.first as? ThemedNavigation)?.navigationBackground let navigationBackground: ThemeValue = (navController.viewControllers.first as? ThemedNavigation)?.navigationBackground
else { return } else { return }
navController.navigationBar.barTintColor = ThemeManager.currentTheme.color(for: navigationBackground) let textPrimary: UIColor = (ThemeManager.currentTheme.color(for: .textPrimary) ?? .white)
navController.navigationBar.shadowImage = ThemeManager.currentTheme.color(for: navigationBackground)?.toImage() let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = ThemeManager.currentTheme.color(for: navigationBackground)
appearance.shadowImage = ThemeManager.currentTheme.color(for: navigationBackground)?.toImage()
appearance.titleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimary
]
appearance.largeTitleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimary
]
// Note: Looks like there were changes to the appearance behaviour in iOS 15, unfortunately navController.navigationBar.standardAppearance = appearance
// this breaks parts of the old 'UINavigationBar.appearance()' logic so we need to do everything navController.navigationBar.scrollEdgeAppearance = appearance
// again using the new API...
if #available(iOS 15.0, *) {
let textPrimary: UIColor = (ThemeManager.currentTheme.color(for: .textPrimary) ?? .white)
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = ThemeManager.currentTheme.color(for: navigationBackground)
appearance.shadowImage = ThemeManager.currentTheme.color(for: navigationBackground)?.toImage()
appearance.titleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimary
]
appearance.largeTitleTextAttributes = [
NSAttributedString.Key.foregroundColor: textPrimary
]
navController.navigationBar.standardAppearance = appearance
navController.navigationBar.scrollEdgeAppearance = appearance
}
} }
private static func retrieveNavigationController(from viewController: UIViewController) -> UINavigationController? { private static func retrieveNavigationController(from viewController: UIViewController) -> UINavigationController? {

@ -177,16 +177,6 @@ extension View {
} }
} }
public func hideListRowSeparator() -> some View {
if #available(iOS 15.0, *) {
return listRowSeparator(.hidden)
} else {
return onAppear {
UITableView.appearance().separatorStyle = .none
}
}
}
public func accessibility(_ accessibility: Accessibility) -> some View { public func accessibility(_ accessibility: Accessibility) -> some View {
if #available(iOSApplicationExtension 14.0, *) { if #available(iOSApplicationExtension 14.0, *) {
guard let identifier = accessibility.identifier else { guard let identifier = accessibility.identifier else {

Loading…
Cancel
Save