You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever a guest VM is powered off in UTM on iOS, the app exits to the home screen. This impractical for several reasons:
it looks to the user as if UTM has crashed when it has in fact exited without error
need to relaunch the app every time to test different VM configuration
limits use of UTM in Split View because UTM exiting causes iPadOS to go back to the home screen
the app still appears in the app switcher despite it actually not running anymore (least important point)
The very first of these points can be addressed by calling [UIApplication suspend] instead of exit(0). This results in a graceful animation to the Home Screen. UTM may then call exit(0) when in the background.
-(void)doExit
{
// animate to home screen
UIApplication *app = [UIApplication sharedApplication];
[app performSelector:@selector(suspend)];
// wait 2 seconds while app is going background
[NSThreadsleepForTimeInterval:2.0];
// exit app when app is in backgroundexit(0);
}
}
Resolving the issue entirely, meaning returning to the VM list after the VM powers down, seems more challenging to implement. Currently when a VM is started, a new ViewController takes over the key UIWindow and (as far as I can tell) no reference is kept to the VM list view.
So to implement going back either a NavigationController of sorts must be introduced to be able to navigate back, or the VM list view must be re-created after the VM powers down and a new UIWindow created that shows the list.
The text was updated successfully, but these errors were encountered:
Whenever a guest VM is powered off in UTM on iOS, the app exits to the home screen. This impractical for several reasons:
The very first of these points can be addressed by calling
[UIApplication suspend]
instead ofexit(0)
. This results in a graceful animation to the Home Screen. UTM may then callexit(0)
when in the background.Code example from StackOverflow:
Resolving the issue entirely, meaning returning to the VM list after the VM powers down, seems more challenging to implement. Currently when a VM is started, a new ViewController takes over the key
UIWindow
and (as far as I can tell) no reference is kept to the VM list view.So to implement going back either a
NavigationController
of sorts must be introduced to be able to navigate back, or the VM list view must be re-created after the VM powers down and a newUIWindow
created that shows the list.The text was updated successfully, but these errors were encountered: