This is a minimal repro case for a SwiftUI app that exhibits what I think is a system bug.
On my iPhone 12 mini running iOS 14.4 (18D52), the following steps:
- Tap the big camera button to bring up the photo library
- Focus the search field, notice some jittery layout updates
- Scroll the grid of photos
results in the library sheet suddenly disappearing and this message appearing in the console:
2021-01-29 18:19:24.092589-0800 ImagePicker[26722:2433281] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
2021-01-29 18:19:24.092687-0800 ImagePicker[26722:2433467] [lifecycle] [u 7279BB2E-926D-4BC1-A512-78CF64DD6DA6:m (null)] [com.apple.mobileslideshow.photo-picker(1.0)] Connection to plugin interrupted while in use.
2021-01-29 18:19:24.093862-0800 ImagePicker[26722:2433567] [lifecycle] [u 7279BB2E-926D-4BC1-A512-78CF64DD6DA6:m (null)] [com.apple.mobileslideshow.photo-picker(1.0)] Connection to plugin invalidated while in use.
2021-01-29 18:19:24.094082-0800 ImagePicker[26722:2433281] [Generic] -[PUPhotoPickerHostViewController viewServiceDidTerminateWithError:] Error Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
Curious if you ever found a fix for this? I've run into the exact same issue, same errors and everything and I'm testing on an iPhone 12 Pro Max. I even tried implementing the newer PHPicker/PhotosUI and get the same result.
Testing on an iPhone 7 (with the same iOS version as the iPhone 12), I don't encounter any issues at all, and everything behaves as expected.
I submitted a ticket to Apple in April, since I also assumed it's a bug.