Post

Replies

Boosts

Views

Activity

Issue: Device Dock pops up on switching the app to or from Single App mode
I have an issue while unlocking the app from Single App mode. Device Dock is popping up on top of my app and this is disturbing the experience of my app. I have already done MDM configuration and the indented functionality is working fine with the below code, the app is successfully switching to single app mode and back. The sample code below reproduces the issue. Tap on Lock, the completion blocks returns true and the app is successfully switched to single app mode. Tap on Unlock, the completion block returns true and the app is successfully switched from the single app mode. Now the device dock is popped up on top of the app. struct LockApp: App { var body: some Scene { WindowGroup { VStack { Button("Lock", systemImage: "lock") { UIAccessibility.requestGuidedAccessSession(enabled: true) { success in print("App has been locked", success) } } .buttonStyle(.borderedProminent) Button("UnLock", systemImage: "lock.open") { UIAccessibility.requestGuidedAccessSession(enabled: false) { success in print("App has been unlocked", success) } } .buttonStyle(.borderedProminent) } } } } Xcode Version: 16.0 Device: iPad Pro 12.9 inch 6th gen. OS: 18.1 Is this intended behaviour? Has anyone come across this issue?
1
1
167
Oct ’24