Skip to content

Commit 19a8b6a

Browse files
committed
chore: update some XCode settings
1 parent 62b5026 commit 19a8b6a

File tree

3 files changed

+35
-41
lines changed

3 files changed

+35
-41
lines changed

Sushitrain.xcodeproj/project.pbxproj

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 56;
6+
objectVersion = 77;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -329,7 +329,6 @@
329329
};
330330
};
331331
buildConfigurationList = 65AE11F42C39EE0E00E721D4 /* Build configuration list for PBXProject "Sushitrain" */;
332-
compatibilityVersion = "Xcode 14.0";
333332
developmentRegion = en;
334333
hasScannedForEncodings = 0;
335334
knownRegions = (
@@ -341,6 +340,7 @@
341340
"zh-Hans",
342341
);
343342
mainGroup = 65AE11F02C39EE0E00E721D4;
343+
preferredProjectObjectVersion = 77;
344344
productRefGroup = 65AE11FA2C39EE0E00E721D4 /* Products */;
345345
projectDirPath = "";
346346
projectRoot = "";
@@ -491,7 +491,7 @@
491491
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
492492
GCC_WARN_UNUSED_FUNCTION = YES;
493493
GCC_WARN_UNUSED_VARIABLE = YES;
494-
IPHONEOS_DEPLOYMENT_TARGET = 17.5;
494+
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
495495
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
496496
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
497497
MTL_FAST_MATH = YES;
@@ -551,7 +551,7 @@
551551
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
552552
GCC_WARN_UNUSED_FUNCTION = YES;
553553
GCC_WARN_UNUSED_VARIABLE = YES;
554-
IPHONEOS_DEPLOYMENT_TARGET = 17.5;
554+
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
555555
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
556556
MTL_ENABLE_DEBUG_INFO = NO;
557557
MTL_FAST_MATH = YES;
@@ -577,7 +577,6 @@
577577
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
578578
ENABLE_INCOMING_NETWORK_CONNECTIONS = YES;
579579
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
580-
ENABLE_PREVIEWS = YES;
581580
ENABLE_RESOURCE_ACCESS_PHOTO_LIBRARY = YES;
582581
ENABLE_USER_SELECTED_FILES = readwrite;
583582
GENERATE_INFOPLIST_FILE = YES;
@@ -592,7 +591,7 @@
592591
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
593592
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
594593
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
595-
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
594+
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
596595
LD_RUNPATH_SEARCH_PATHS = (
597596
"$(inherited)",
598597
"@executable_path/Frameworks",
@@ -602,12 +601,11 @@
602601
PRODUCT_BUNDLE_IDENTIFIER = "nl.t-shaped.Sushitrain";
603602
PRODUCT_NAME = "$(TARGET_NAME)";
604603
PROVISIONING_PROFILE_SPECIFIER = "";
605-
REGISTER_APP_GROUPS = NO;
606604
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
607605
SUPPORTS_MACCATALYST = NO;
608606
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
609607
SWIFT_EMIT_LOC_STRINGS = YES;
610-
SWIFT_VERSION = 5.0;
608+
SWIFT_VERSION = 6.0;
611609
TARGETED_DEVICE_FAMILY = "1,2";
612610
};
613611
name = Debug;
@@ -626,7 +624,6 @@
626624
"ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES;
627625
ENABLE_INCOMING_NETWORK_CONNECTIONS = YES;
628626
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
629-
ENABLE_PREVIEWS = YES;
630627
ENABLE_RESOURCE_ACCESS_PHOTO_LIBRARY = YES;
631628
ENABLE_USER_SELECTED_FILES = readwrite;
632629
GENERATE_INFOPLIST_FILE = YES;
@@ -641,7 +638,7 @@
641638
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
642639
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
643640
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
644-
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
641+
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
645642
LD_RUNPATH_SEARCH_PATHS = (
646643
"$(inherited)",
647644
"@executable_path/Frameworks",
@@ -651,12 +648,11 @@
651648
PRODUCT_BUNDLE_IDENTIFIER = "nl.t-shaped.Sushitrain";
652649
PRODUCT_NAME = "$(TARGET_NAME)";
653650
PROVISIONING_PROFILE_SPECIFIER = "";
654-
REGISTER_APP_GROUPS = NO;
655651
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
656652
SUPPORTS_MACCATALYST = NO;
657653
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
658654
SWIFT_EMIT_LOC_STRINGS = YES;
659-
SWIFT_VERSION = 5.0;
655+
SWIFT_VERSION = 6.0;
660656
TARGETED_DEVICE_FAMILY = "1,2";
661657
};
662658
name = Release;

Sushitrain/BackgroundManager.swift

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -337,38 +337,35 @@ import BackgroundTasks
337337
}
338338

339339
if appState.userSettings.watchdogNotificationEnabled {
340-
notificationCenter.getNotificationSettings { @MainActor settings in
341-
let status = settings.authorizationStatus
342-
if status == .authorized || status == .provisional {
343-
let content = UNMutableNotificationContent()
344-
content.title = String(localized: "Synchronisation did not run")
345-
content.body = String(
346-
localized:
347-
"Background synchronization last ran more than \(Int(interval / 3600)) hours ago. Open the app to synchronize."
348-
)
349-
content.interruptionLevel = .passive
350-
content.sound = .none
351-
content.badge = 1
352-
let trigger = UNTimeIntervalNotificationTrigger(
353-
timeInterval: interval, repeats: true)
354-
let request = UNNotificationRequest(
355-
identifier: Self.watchdogNotificationID, content: content,
356-
trigger: trigger)
357-
notificationCenter.add(request) { err in
358-
if let err = err {
359-
Log.warn(
360-
"Could not add watchdog notification: \(err.localizedDescription)"
361-
)
362-
}
363-
else {
364-
Log.info("Watchdog notification added")
365-
}
366-
}
340+
let settings = await notificationCenter.notificationSettings()
341+
342+
let status = settings.authorizationStatus
343+
if status == .authorized || status == .provisional {
344+
let content = UNMutableNotificationContent()
345+
content.title = String(localized: "Synchronisation did not run")
346+
content.body = String(
347+
localized:
348+
"Background synchronization last ran more than \(Int(interval / 3600)) hours ago. Open the app to synchronize."
349+
)
350+
content.interruptionLevel = .passive
351+
content.sound = .none
352+
content.badge = 1
353+
let trigger = UNTimeIntervalNotificationTrigger(
354+
timeInterval: interval, repeats: true)
355+
let request = UNNotificationRequest(
356+
identifier: Self.watchdogNotificationID, content: content,
357+
trigger: trigger)
358+
do {
359+
try await notificationCenter.add(request)
360+
Log.info("Watchdog notification added")
367361
}
368-
else {
369-
Log.warn("Watchdog not enabled or denied, not reinstalling")
362+
catch {
363+
Log.warn("Could not add watchdog notification: \(error.localizedDescription)")
370364
}
371365
}
366+
else {
367+
Log.warn("Watchdog not enabled or denied, not reinstalling")
368+
}
372369
}
373370
}
374371

SushitrainGlass.icon/icon.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"color-space-for-untagged-svg-colors" : "display-p3",
23
"fill-specializations" : [
34
{
45
"value" : {

0 commit comments

Comments
 (0)