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 7688207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:52:01+00:00 2026-05-31T19:52:01+00:00

I am working on xcode project intended to make a universal app.With the window

  • 0

I am working on xcode project intended to make a universal app.With the window based application template i got 3 AppDelegate Methods.2 for both ipad and iphone each and 1 Main AppDelegate method.When i run it for ipad ,the Main AppDelegate method is being called but when i run it for iphone environment ,the Main AppDelegate is not getting called.So how to get the controller to Main Appdelegate method while running it for Iphone environment..??

Here is description..
I have 3 appdelegate methods ,viz.prjOUMAppDelegate(main appdelegate),prjOUMAppDelegate_iPhone(for iphone),prjOUMAppDelegate_iPad(for ipad)..
I have some common methods like creating folders and moving files written in prjOUMAppDelegate(main appdelegate)method.I want it to run everytime irrespective of device ,so that i can get my folders created and some files to be moved.Its working fine when i run it for ipad(i.e creating folders and moving files ) but when i change the environment to iphone ,the prjOUMAppDelegate(main appdelegate) method is not getting called..so i dont know where iam getting wrong..

  • 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-31T19:52:03+00:00Added an answer on May 31, 2026 at 7:52 pm

    Ok, Your question is really a confusing one. I think you are looking for something like this

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
      self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        // Override point for customization after application launch.
    
     if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
          self.viewController = //Initialize the ViewController for iPhone environment 
     } 
     else {
          self.viewController =  //Initialize the ViewController for iPad environment
     }
     self.navigationController = [[UINavigationController alloc] 
                                 initWithRootViewController:self.viewController];
     [self.window addSubview:self.navigationController.view];
     [self.window makeKeyAndVisible];
     return YES;
    }
    

    If this is not the answer you are looking for then please update your question with some code.

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

Sidebar

Related Questions

I'm working on an existing Xcode 3.2.2 Universal iPhone OS project which is already
While working on an Xcode project i keep getting the spinning wheel while switching
I'm working on a school project and I'm getting some weird errors from Xcode.
Something really weird is going on with Xcode and an iPhone project I'm working
I have made a ViewController in XCode for an iPhone project I'm working on,
I'm working up a custom Xcode template, and I'd like to change the way
I'm new to xcode and the iphone sdk. I've been working with the view-based
I was working on an xcode project called Test, which I then made a
I have started working on a new Xcode project, a game to be exact.
I was working in a seemingly unrelated area of my Xcode project when I

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.