diff --git a/AreYouSleeping.xcodeproj/project.pbxproj b/AreYouSleeping.xcodeproj/project.pbxproj index 16ed6eb..63b5883 100644 --- a/AreYouSleeping.xcodeproj/project.pbxproj +++ b/AreYouSleeping.xcodeproj/project.pbxproj @@ -123,11 +123,11 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1500; - LastUpgradeCheck = 1500; + LastSwiftUpdateCheck = 1600; + LastUpgradeCheck = 1600; }; buildConfigurationList = 777777777777777702; - compatibilityVersion = "Xcode 14.0"; + compatibilityVersion = "Xcode 16.0"; developmentRegion = "zh-Hans"; hasScannedForEncodings = 0; knownRegions = ("zh-Hans", en, Base); diff --git a/AreYouSleeping/Services/BedtimeReminder.swift b/AreYouSleeping/Services/BedtimeReminder.swift index fae03ac..4cd999e 100644 --- a/AreYouSleeping/Services/BedtimeReminder.swift +++ b/AreYouSleeping/Services/BedtimeReminder.swift @@ -3,6 +3,7 @@ import UserNotifications /// 睡前 30 分钟提醒调度器(iOS 使用 UNUserNotificationCenter) enum BedtimeReminder { + @MainActor static func schedule(store: Store) { guard store.agreed, store.bedtimeReminderEnabled else { cancel() diff --git a/AreYouSleeping/Views/FriendControlView.swift b/AreYouSleeping/Views/FriendControlView.swift index e02a934..c08395d 100644 --- a/AreYouSleeping/Views/FriendControlView.swift +++ b/AreYouSleeping/Views/FriendControlView.swift @@ -12,7 +12,7 @@ struct FriendControlView: View { Section { HStack { TextField("输入朋友的控制码", text: $friendCode) - .textInputAutocapitalization(.characters) + .textInputAutocapitalization(.allCharacters) .disableAutocorrection(true) Button("查询") { lookupFriend() } .buttonStyle(.borderedProminent)