mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Enable (quick) static analyzer for normal builds
// FREEBIE
This commit is contained in:
parent
77997639f5
commit
baacebc956
9 changed files with 28 additions and 7 deletions
|
@ -3906,6 +3906,9 @@
|
|||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
|
||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
|
||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Signal/Signal.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
|
@ -3951,6 +3954,7 @@
|
|||
PRODUCT_NAME = Signal;
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
RUN_CLANG_STATIC_ANALYZER = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Signal/src/Signal-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
|
@ -3968,6 +3972,9 @@
|
|||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES;
|
||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
|
||||
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Signal/Signal.entitlements;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
|
@ -4012,6 +4019,7 @@
|
|||
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.signal;
|
||||
PRODUCT_NAME = Signal;
|
||||
PROVISIONING_PROFILE = "";
|
||||
RUN_CLANG_STATIC_ANALYZER = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Signal/src/Signal-Bridging-Header.h";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
[self updateTableContents];
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
[self updateTableContents];
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
[self updateTableContents];
|
||||
}
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ int const OWSLinkedDevicesTableViewControllerSectionAddDevice = 1;
|
|||
return cell;
|
||||
} else {
|
||||
DDLogError(@"Unknown section: %@", indexPath);
|
||||
return nil;
|
||||
return [UITableViewCell new];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
[self updateTableContents];
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
[self updateTableContents];
|
||||
}
|
||||
|
||||
|
|
|
@ -1862,20 +1862,24 @@ typedef enum : NSUInteger {
|
|||
[self presentViewController:actionSheetController animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)tappedNonBlockingIdentityChangeForRecipientId:(nullable NSString *)signalId
|
||||
- (void)tappedNonBlockingIdentityChangeForRecipientId:(nullable NSString *)signalIdParam
|
||||
{
|
||||
if (signalId == nil) {
|
||||
if (signalIdParam == nil) {
|
||||
if (self.thread.isGroupThread) {
|
||||
// Before 2.13 we didn't track the recipient id in the identity change error.
|
||||
DDLogWarn(@"%@ Ignoring tap on legacy nonblocking identity change since it has no signal id", self.logTag);
|
||||
return;
|
||||
|
||||
} else {
|
||||
DDLogInfo(
|
||||
@"%@ Assuming tap on legacy nonblocking identity change corresponds to current contact thread: %@",
|
||||
self.logTag,
|
||||
self.thread.contactIdentifier);
|
||||
signalId = self.thread.contactIdentifier;
|
||||
signalIdParam = self.thread.contactIdentifier;
|
||||
}
|
||||
}
|
||||
|
||||
NSString *signalId = signalIdParam;
|
||||
|
||||
[self showFingerprintWithRecipientId:signalId];
|
||||
}
|
||||
|
|
|
@ -907,7 +907,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return result;
|
||||
}
|
||||
|
||||
- (NSString *)callingCodeForPossiblePhoneNumber:(NSString *)phoneNumber
|
||||
- (nullable NSString *)callingCodeForPossiblePhoneNumber:(NSString *)phoneNumber
|
||||
{
|
||||
OWSAssert([phoneNumber hasPrefix:@"+"]);
|
||||
|
||||
|
@ -924,7 +924,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
NSString *searchText = self.searchBar.text;
|
||||
|
||||
if (searchText.length < 8) {
|
||||
return nil;
|
||||
return @[];
|
||||
}
|
||||
|
||||
NSMutableSet<NSString *> *parsedPhoneNumbers = [NSMutableSet new];
|
||||
|
@ -935,7 +935,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
NSString *phoneNumberString = phoneNumber.toE164;
|
||||
|
||||
// Ignore phone numbers with an unrecognized calling code.
|
||||
NSString *callingCode = [self callingCodeForPossiblePhoneNumber:phoneNumberString];
|
||||
NSString *_Nullable callingCode = [self callingCodeForPossiblePhoneNumber:phoneNumberString];
|
||||
if (!callingCode) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue