[M1 Mac, Ventura 13.3.1, Xcode 14.3]
カレンダーアプリのComplicationがしばらく経つとアプリごと消えてしまいます。同様にComplication設定しているメモアプリは無事です。
“インフォグラフ”文字盤の中央上部は純正カレンダー以外のアプリを受け付けないのかもしれません。
中央上部は純正カレンダー、右下は自製カレンダーに設定して様子を見ます。
これで消えたら以下の対策を順次試してみます。
1.プロジェクトから作り直し
2.CloudKitを導入しDateなどを適当に保存
3.文字盤を作成
4.正式にアプリ登録する(非公開)
![](https://mowareblog.net/wp-content/uploads/2023/07/incoming-ACCC47B8-3BBF-480E-A1A9-F93F8511F548.png)
![](https://mowareblog.net/wp-content/uploads/2023/07/incoming-553FECB9-9AE4-41CE-B9B9-D7D3E1791815.png)
(経過時間は不定)
![](https://mowareblog.net/wp-content/uploads/2023/07/incoming-F410766C-D178-4847-B3E8-70DE58A9DA7C.png)
struct ComplicationCircular : View {
@Environment(\.showsWidgetLabel) var showsWidgetLabel
var entry: Provider.Entry
var body: some View {
VStack (spacing: -6){
if showsWidgetLabel {
Text(getWeekday(entry.date))
.font(.system(size: 18))
.foregroundColor(.yellow)
.widgetLabel {
Text(getFormattedDate() + getFormattedWeekday() + getFormattedYear())
.foregroundColor(.blue) // 中央上部は色設定不可
}
Text(getMonth(entry.date))
.font(.system(size: 18))
.foregroundColor(.green)
Text(getDay(entry.date))
.font(.system(size: 18))
.foregroundColor(.white)
} else {
Text(getWeekday(entry.date))
.font(.system(size: 18))
.foregroundColor(.yellow)
Text(getMonth(entry.date))
.font(.system(size: 18))
.foregroundColor(.green)
Text(getDay(entry.date))
.font(.system(size: 18))
.foregroundColor(.white)
}
}
}
<以下略>