修复 Xcode 16 Beta 编译错误:MainActor 隔离、.allCharacters、项目兼容版本

这个提交包含在:
JGZ_YES
2026-08-12 13:26:51 +08:00
父节点 448a312e1e
当前提交 2024dcc1c3
修改 3 个文件,包含 5 行新增4 行删除
+3 -3
查看文件
@@ -123,11 +123,11 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
BuildIndependentTargetsInParallel = 1; BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1500; LastSwiftUpdateCheck = 1600;
LastUpgradeCheck = 1500; LastUpgradeCheck = 1600;
}; };
buildConfigurationList = 777777777777777702; buildConfigurationList = 777777777777777702;
compatibilityVersion = "Xcode 14.0"; compatibilityVersion = "Xcode 16.0";
developmentRegion = "zh-Hans"; developmentRegion = "zh-Hans";
hasScannedForEncodings = 0; hasScannedForEncodings = 0;
knownRegions = ("zh-Hans", en, Base); knownRegions = ("zh-Hans", en, Base);
@@ -3,6 +3,7 @@ import UserNotifications
/// 30 iOS 使 UNUserNotificationCenter /// 30 iOS 使 UNUserNotificationCenter
enum BedtimeReminder { enum BedtimeReminder {
@MainActor
static func schedule(store: Store) { static func schedule(store: Store) {
guard store.agreed, store.bedtimeReminderEnabled else { guard store.agreed, store.bedtimeReminderEnabled else {
cancel() cancel()
+1 -1
查看文件
@@ -12,7 +12,7 @@ struct FriendControlView: View {
Section { Section {
HStack { HStack {
TextField("输入朋友的控制码", text: $friendCode) TextField("输入朋友的控制码", text: $friendCode)
.textInputAutocapitalization(.characters) .textInputAutocapitalization(.allCharacters)
.disableAutocorrection(true) .disableAutocorrection(true)
Button("查询") { lookupFriend() } Button("查询") { lookupFriend() }
.buttonStyle(.borderedProminent) .buttonStyle(.borderedProminent)