Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
fix: cannot launch widget xcode 16
Browse files Browse the repository at this point in the history
  • Loading branch information
CanglongCl committed Sep 17, 2024
1 parent 30fbbde commit ac559b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
askForAppToLaunch = "Yes"
launchAutomaticallySubstyle = "2">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
28 changes: 3 additions & 25 deletions ResinStatusWidget/WidgetsBoundle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,25 @@
import SwiftUI
import WidgetKit

#if !os(watchOS)
struct WidgetsBundleLowerThaniOS16: WidgetBundle {
var body: some Widget {
MainWidget()
MaterialWidget()
}
}
#endif

// MARK: - WidgetsBundleiOS16

@available(iOSApplicationExtension 16.0, watchOSApplicationExtension 9.0, *)
struct WidgetsBundleiOS16: WidgetBundle {
var body: some Widget {
#if !os(watchOS)
WidgetsBundleLowerThaniOS16().body
#if canImport(ActivityKit)
if #available(iOS 16.1, *) {
ResinRecoveryActivityWidget()
}
#endif
#else
AlternativeWatchCornerResinWidget()
#if !os(watchOS)
MainWidget()
MaterialWidget()
#endif
LockScreenResinWidget()
LockScreenLoopWidget()
LockScreenAllInfoWidget()
SubWidgetsBundleiOS16().body
}
}

// MARK: - SubWidgetsBundleiOS16

// 因为一个body只能放10个
@available(iOSApplicationExtension 16.0, watchOSApplicationExtension 9.0, *)
struct SubWidgetsBundleiOS16: WidgetBundle {
var body: some Widget {
// #if !os(watchOS)
LockScreenResinTimerWidget()
LockScreenResinFullTimeWidget()
// #endif
LockScreenHomeCoinWidget()
LockScreenDailyTaskWidget()
LockScreenExpeditionWidget()
Expand Down

0 comments on commit ac559b7

Please sign in to comment.