divadretlaw / CustomAlert

🔔 Custom Alert for SwiftUI
MIT License
190 stars 18 forks source link

使用customAlert 会使 onAppear方法 触发多次 #21

Closed AbenAllen closed 2 months ago

AbenAllen commented 2 months ago

Xcode 15.0 发现手机系统 15.4 、17.5.1 项目最低支持14.0

divadretlaw commented 2 months ago

Hello, thank you for reporting an issue.

If I understand you correctly the issue that onAppear was possibly called multiple times, was an issue in how WindowKit reads the UIWindowScene, which is needed to display the custom alert on the correct window scene.

This has been improved, and hopefully fixed, in (WindowKit 2.4.0)[https://github.com/divadretlaw/WindowKit/releases/tag/2.4.0]

Custom Alert 3.7.2 has been released that should fix your issue.

AbenAllen commented 2 months ago

您好我已收到您的来信!