Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6855397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:45:12+00:00 2026-05-27T01:45:12+00:00

I have started a project in Xcode 3.x using the Create a Window-Based Application

  • 0

I have started a project in Xcode 3.x using the “Create a Window-Based Application” option. The project seems to load the main nib file by itself from the info.plist entry : “Main nib file base name”.

Now I wish to load the main nib file using a UIViewController. Can I just delete the info.plist entry and load the nib file programmatically in “application: didFinishLaunchingWithOptions:” using a view controller ?

(Now the project has been moved to Xcode 4.2. But I guess the compiler version shouldn’t matter much for this case …)

Hope that somebody knowledgable in this area could help …

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:45:13+00:00Added an answer on May 27, 2026 at 1:45 am

    If you are upgrading the same project then no you can not just do that.

    The mechanism Apple is using in their templates for getting into the app has changed between these versions.

    In 3.x the Main Interface is set to MainWindow.xib in your project settings. In this xib your app delegate is loaded as an object.

    In 4.x the main.m specifically loads the app delegate with this line:

    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    

    it’s the last argument that has changed between 3.x and 4.x

    Your best bet is to create a new project and see how the template code has it all wired up.

    UPDATE

    First off if your project is working do you really need to change it?

    If so then I’m using the template code from a fresh project

    Go to your main.m and change the implementation from

    int main(int argc, char *argv[]) 
    {
        NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
        int retVal = UIApplicationMain(argc, argv, nil, nil);
        [pool release];
        return retVal;
    }
    

    to

    int main(int argc, char *argv[])
    {
        @autoreleasepool {
            return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
        }
    }
    

    NB Change AppDelegate to the name of your app delegate class.

    You will also need to update your app delegate to create the UIWindow programatically.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    
        // Instantiate your rootViewController
    
        self.window.rootViewController = yourRootViewController;
        [self.window makeKeyAndVisible];
        return YES;
    }
    

    These are the most obvious differences I can think of, there may be some other subtitles but I’ve not used 3.x in so long I can’t remember.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project that I started in xcode 3.x It is using 3
I have started a project from an XCode template I have created. When I
We have started using Spring framework in my project. After becoming acquainted with the
I have started using Linq to SQL for a project im working on and
I have just started a new project, and I am using the Delphi 2009
I started a new project with XCode and I have set up the subversion
I have just started a project that involves me sending data using POST in
I have been using XCode 3.2.4 when started developing iOS apps but now I
I JUST started a new XCode Project. The code I have added in so
I have started using Git in the middle of my project, where the first

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.