diff --git a/src/Messages/OWSMessageSender.m b/src/Messages/OWSMessageSender.m index ee61b1a06..6f6cf93f1 100644 --- a/src/Messages/OWSMessageSender.m +++ b/src/Messages/OWSMessageSender.m @@ -42,11 +42,6 @@ NS_ASSUME_NONNULL_BEGIN -#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(major, minor) \ - ([[NSProcessInfo processInfo] \ - isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){ \ - .majorVersion = major, .minorVersion = minor, .patchVersion = 0 }]) - /** * OWSSendMessageOperation encapsulates all the work associated with sending a message, e.g. uploading attachments, * getting proper keys, and retrying upon failure. diff --git a/src/TSPrefix.h b/src/TSPrefix.h index b50c3222e..60593c0df 100644 --- a/src/TSPrefix.h +++ b/src/TSPrefix.h @@ -4,6 +4,7 @@ #import "Asserts.h" #import "Constraints.h" +#import "iOSVersions.h" #import "OWSAnalytics.h" #import "OWSDispatch.h" #import diff --git a/src/Util/iOSVersions.h b/src/Util/iOSVersions.h new file mode 100644 index 000000000..a50ebc125 --- /dev/null +++ b/src/Util/iOSVersions.h @@ -0,0 +1,9 @@ +// +// Copyright (c) 2017 Open Whisper Systems. All rights reserved. +// + +#import +#include + +#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(major, minor) \ + ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){.majorVersion = major, .minorVersion = minor, .patchVersion = 0}])