It seems that the problem is caused by a UIWindow still being around after destroying the view’s UIViewComponentPeer, because (since iOS 13) a UIWindow is not deallocated until it’s removed from its UIWindowScene.
So a possible fix is in juce_ios_UIViewComponentPeer.mm:565
if (! isSharedWindow)
{
[((JuceUIWindow*) window) setOwner: nil];
if (@available(iOS 13.0, *)) {
window.windowScene = nil;
}
[window release];
}
I just ran into this crash on our iOS app. It happened when closing the bluetooth devices pop-up. The fix above fixed the crash, but oddly enough when that window is showing, the iOS status top bar also shows, even though it’s usually hidden. It does go away when you close the bluetooth pop-up…
Will the above fix be in develop relatively soon? Thanks!
It does fix the crash , but I still see the status bar, which is a bit odd but not really an issue. I’m also noticing these messages in the debugger every time I open the bluetooth dialog, which I don’t think I was seeing when using directly the JUCE version 6.0.8 commit…
Unbalanced calls to begin/end appearance transitions for <JuceUIViewController: 0x10fda1ab0>.