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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:27:56+00:00 2026-05-22T16:27:56+00:00

Hello I have problem with didFinishLaunching methods. I am really getting confused about what

  • 0

Hello
I have problem with didFinishLaunching methods. I am really getting confused about what was the problem and that’s why I pasted all my code. The problem was the application didn’t launch, it crashed, and it show me this message in console:

**[Demo1AppDelegate setMapViewController:]: unrecognized selector sent to instance 0x5649a30
2011-05-25 14:17:58.724 Demo1[10630:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Demo1AppDelegate setMapViewController:]: unrecognized selector sent to instance 0x5649a30'**

I am using this code
In Demo1appDelegate.h file

#import <UIKit/UIKit.h>
#import "MapViewController.h"

@interface Demo1AppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
    MapViewController *mapViewController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;

@end

And in
Demo1AppDelegate.m file

#import "Demo1AppDelegate.h"
@interface Demo1AppDelegate ()
@property (nonatomic, retain) MapViewController *mapViewController;
@end

@implementation Demo1AppDelegate

@synthesize window;


#pragma mark -
#pragma mark Application lifecycle

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

    MapViewController *viewController = [[MapViewController alloc] init];
    self.mapViewController = viewController;

    [viewController release];

    [window addSubview:self.mapViewController.view];
    [window makeKeyAndVisible];

    return YES;
}


- (void)dealloc {
    [mapViewController release];

    [window release];
    [super dealloc];
}


@end
  • 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-22T16:27:57+00:00Added an answer on May 22, 2026 at 4:27 pm

    I think

    self.mapViewController = viewController;
    

    is the problem. You do not have @synthesize for mapViewController. So you cannot access through self

    Or another option is to try this

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    
        mapViewController = [[MapViewController alloc] init];
        [window addSubview:mapViewController.view];
        [window makeKeyAndVisible];
    
        return YES;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem Hello all! I have this code which takes my jpg image loops through
hello i have a problem that's maybe difficult to descripe, i have an application,
Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
Hello guys I have a problem with my application involving Lucene java library and
Hello i have a problem with this line of code: Last Visted On :
Hello I have a problem with the following code in a GTMTestCase: - (void)testSomething
Hello I have a problem with a binding that I want to do and
hello i have a problem in getting picture from the url contained in the
hello today i have a problem how can this happen ? everything that is
hello everyone I have some problem with understanding this piece of the code: import

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.