Skip to content

Commit c18d8a6

Browse files
authored
Merge pull request #404 from session-foundation/dev
Release 2.9.2
2 parents 7f1f1e1 + fab3b56 commit c18d8a6

File tree

5 files changed

+173
-498
lines changed

5 files changed

+173
-498
lines changed

Session.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7861,7 +7861,7 @@
78617861
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
78627862
CODE_SIGN_IDENTITY = "iPhone Developer";
78637863
COMPILE_LIB_SESSION = "";
7864-
CURRENT_PROJECT_VERSION = 561;
7864+
CURRENT_PROJECT_VERSION = 563;
78657865
ENABLE_BITCODE = NO;
78667866
ENABLE_STRICT_OBJC_MSGSEND = YES;
78677867
ENABLE_TESTABILITY = YES;
@@ -7900,7 +7900,7 @@
79007900
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/include/**";
79017901
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
79027902
LIB_SESSION_SOURCE_DIR = "${SRCROOT}/../LibSession-Util";
7903-
MARKETING_VERSION = 2.9.1;
7903+
MARKETING_VERSION = 2.9.2;
79047904
ONLY_ACTIVE_ARCH = YES;
79057905
OTHER_CFLAGS = "-Werror=protocol";
79067906
OTHER_SWIFT_FLAGS = "-D DEBUG -Xfrontend -warn-long-expression-type-checking=100";
@@ -7939,7 +7939,7 @@
79397939
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
79407940
CODE_SIGN_IDENTITY = "iPhone Distribution";
79417941
COMPILE_LIB_SESSION = "";
7942-
CURRENT_PROJECT_VERSION = 561;
7942+
CURRENT_PROJECT_VERSION = 563;
79437943
ENABLE_BITCODE = NO;
79447944
ENABLE_MODULE_VERIFIER = YES;
79457945
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -7974,7 +7974,7 @@
79747974
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/include/**";
79757975
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
79767976
LIB_SESSION_SOURCE_DIR = "${SRCROOT}/../LibSession-Util";
7977-
MARKETING_VERSION = 2.9.1;
7977+
MARKETING_VERSION = 2.9.2;
79787978
ONLY_ACTIVE_ARCH = NO;
79797979
OTHER_CFLAGS = (
79807980
"-DNS_BLOCK_ASSERTIONS=1",
@@ -8483,7 +8483,7 @@
84838483
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
84848484
CODE_SIGN_IDENTITY = "iPhone Developer";
84858485
COMPILE_LIB_SESSION = YES;
8486-
CURRENT_PROJECT_VERSION = 561;
8486+
CURRENT_PROJECT_VERSION = 563;
84878487
ENABLE_BITCODE = NO;
84888488
ENABLE_STRICT_OBJC_MSGSEND = YES;
84898489
ENABLE_TESTABILITY = YES;
@@ -8524,7 +8524,7 @@
85248524
);
85258525
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
85268526
LIB_SESSION_SOURCE_DIR = "${SRCROOT}/../LibSession-Util";
8527-
MARKETING_VERSION = 2.9.1;
8527+
MARKETING_VERSION = 2.9.2;
85288528
ONLY_ACTIVE_ARCH = YES;
85298529
OTHER_CFLAGS = (
85308530
"-fobjc-arc-exceptions",
@@ -9151,7 +9151,7 @@
91519151
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
91529152
CODE_SIGN_IDENTITY = "iPhone Distribution";
91539153
COMPILE_LIB_SESSION = YES;
9154-
CURRENT_PROJECT_VERSION = 561;
9154+
CURRENT_PROJECT_VERSION = 563;
91559155
ENABLE_BITCODE = NO;
91569156
ENABLE_STRICT_OBJC_MSGSEND = YES;
91579157
GCC_NO_COMMON_BLOCKS = YES;
@@ -9187,7 +9187,7 @@
91879187
);
91889188
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
91899189
LIB_SESSION_SOURCE_DIR = "${SRCROOT}/../LibSession-Util";
9190-
MARKETING_VERSION = 2.9.1;
9190+
MARKETING_VERSION = 2.9.2;
91919191
ONLY_ACTIVE_ARCH = NO;
91929192
OTHER_CFLAGS = (
91939193
"-DNS_BLOCK_ASSERTIONS=1",

Session/Meta/AppDelegate.swift

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
322322
///
323323
/// Additionally we want to ensure that our timeout timer has enough time to run so make sure we have at least `5 seconds`
324324
/// of background execution (if we don't then the process could incorrectly run longer than it should)
325+
let remainingTime: TimeInterval = application.backgroundTimeRemaining
326+
325327
guard
326-
application.backgroundTimeRemaining < TimeInterval.greatestFiniteMagnitude &&
327-
application.backgroundTimeRemaining > 5
328+
remainingTime != TimeInterval.nan &&
329+
remainingTime < TimeInterval.greatestFiniteMagnitude &&
330+
remainingTime > 5
328331
else { return completionHandler(.failed) }
329332

330333
Log.appResumedExecution()
@@ -342,7 +345,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
342345
///
343346
/// **Note:** We **MUST** capture both `poller` and `cancellable` strongly in the event handler to ensure neither
344347
/// go out of scope until we want them to (we essentually want a retain cycle in this case)
345-
let durationRemainingMs: Int = max(1, Int((application.backgroundTimeRemaining - 5) * 1000))
348+
let durationRemainingMs: Int = max(1, Int((remainingTime - 5) * 1000))
346349
let timer: DispatchSourceTimer = DispatchSource.makeTimerSource(queue: queue)
347350
timer.schedule(deadline: .now() + .milliseconds(durationRemainingMs))
348351
timer.setEventHandler { [poller, dependencies] in

0 commit comments

Comments
 (0)