So, I've made progress on this [Xcode 16.3]. In my SceneDelegate I use:
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions API_AVAILABLE(ios(13.0)){
NSLog(@"SceneDelegate received willConnectToSession\n");
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
NSLog(@"Main_iphone Storyboard");
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main_iphone" bundle:nil];
UISceneConfiguration *configuration = [session configuration];
[configuration setStoryboard:storyboard];
}
else {
NSLog(@"Main Storyboard");
}
}
And I have two configurations in the plist:
I also put this in the appDelegate, though it doesn't seem to get called:
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options API_AVAILABLE(ios(13.0)){
NSLog(@"AppDelegate received configurationForConnectingSceneSession\n");
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
NSLog(@"Main_iphone Storyboard");
return [[UISceneConfiguration alloc] initWithName:@"iPhone Configuration" sessionRole:connectingSceneSession.role];
}
else {
NSLog(@"Main Storyboard");
return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
}
}
Everything works fine, except when running the simulator for iPhone 16 Pro Max 18.2 where I get these errors:
AX Safe category class 'SLHighlightDisambiguationPillViewAccessibility' was not found!
Class CKBrowserSwitcherViewController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API.
And no scene appears.