Tuesday, April 2, 2024
HomeiOS DevelopmentAssertion Error after Xcode and iOS Improve

Assertion Error after Xcode and iOS Improve


I’ve had a mission working on my mac mini for years. I used to be working xcode model 11.3.1 for a iOS launch for model 8. I not too long ago improve to a macbook which got here loaded with Sonoma 14.3. I additionally upgraded the model of Xcode to fifteen.3 I’m not actually utilizing any UI parts. I’m receiving an assertion error on didFinishLaunchingWithOptions. I’m not testing or constructing any UI parts per se. Simply working some database assessments. Th code is follows:

#import "ProjectFive2AppDelegate.h"

#import "ProjectFive2ViewController.h"

@implementation ProjectFive2AppDelegate

@synthesize window = _window;
@synthesize viewController = _viewController;

- (BOOL)utility:(UIApplication *)utility didFinishLaunchingWithOptions: 
(NSDictionary *)launchOptions
{

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override level for personalisation after utility launch.
    self.viewController = [[ProjectFive2ViewController alloc] 
initWithNibName:@"ProjectFive2ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return YES;

}

Error message is:

***Assertion failure in UITraitCollection *UIViewControllerMissingInitialTraitCollection(UIVewController *__string, UIApplicationSystemVersion)(), UIView controller: <ProjectFive2Contreoller: 0x100edc000>’

***Terminating app because of uncaught exception ‘NSinternalConsistencyException’, purpose” ‘UIViewController is lacking its preliminary trait assortment populated throughout initialization. This can be a severe bug, seemingly triggered bu accessing properties or strategies on the view controller earlier than calling a UIViewController initializer. View controller…



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments