‘onChange(of:perform:)’ was deprecated in iOS 17.0: Use `onChange` with a two or zero parameter action closure instead.

スポンサーリンク
スポンサーリンク

エラー内容

‘onChange(of:perform:)’ was deprecated in iOS 17.0: Use `onChange` with a two or zero parameter action closure instead.

原因

onChange(of:perform:) は iOS 17 で非推奨 になり、新しい onChange の構文を使う必要があります。

対策

.onChange(of: appOpen.appOpenAdLoaded) {

oldValue, newValue in 

Task {

 await refreshPurchasedProducts() 

if

subscriptions.isEmpty {

appOpen.ShowAppOpenAd()

} else {

appOpen.AppCloseAd() }

}

}

コメント