jevonmao / jevonmao/PermissionsSwiftUI

[BUG] - @Environment(\.scenePhase) breaks JMModal authorization Status and autoDismiss

Open
#150 2 comments 0 reactions 1 assignee Claimed by @jevonmao View on GitHub
confirmed bug
Dominant language
Swift
Stars
1.6k
Forks
92
PR merge metrics
No merged PRs in 30d

Description

When i simply put
@Environment(\.scenePhase) private var scenePhase
into the view where .JMModal is used or in a parent view

.JMModal(showModal: $showModal, for: [.camera, .microphone, .calendarFull], autoDismiss: true,
onAppear: {print("JMModal Appeared")},
onDisappear: {print("JMModal Disappeared")})

Then JMModal does not get the authorization status anymore and never disappears automatically.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.