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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:58:26+00:00 2026-06-14T02:58:26+00:00

I’m trying to figure why it doesn’t seem application didFinishLaunchingWithOptions is being called when

  • 0

I’m trying to figure why it doesn’t seem “application didFinishLaunchingWithOptions” is being called when my app is starting up. My NSLog (@”Launch!”) statement isn’t showing up in the console, and the dictionary after it isn’t being created either. If it makes a difference I’m using Storyboarding with a Navigation controller as the initial view. I tried adding a “object” to the Navigation controller and set it to “AppDelegate” and then setting it as the referencing outlet, but that didn’t seem to make a difference either. Isn’t this method supposed to be called every time the app launches? I even reset the simulator, but still nothing.

Thanks.

//
//  AppDelegate.m
//  PersonLibraryiOS
//
//  Created by Joey on 11/7/12.
//  Copyright (c) 2012 Joey. All rights reserved.
//

#import "AppDelegate.h"
#import "AddViewController.h"
#import "Person.h"
@implementation AppDelegate
@synthesize PersonDict;

-(void)addtoDict:(Person *)newPerson
{
    [PersonDict setObject:@"newPerson" forKey:[newPerson name]];
}



- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSLog (@"Launch!");

    // Override point for customization after application launch.
    return YES;
    PersonDict = [NSMutableDictionary dictionaryWithContentsOfFile:@"diskDict"];
  • 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-06-14T02:58:28+00:00Added an answer on June 14, 2026 at 2:58 am

    EDIT: Must’ve been having a bad day when I wrote this originally. Removed the extremely unnecessary attitude from this post and clarified some things.

    If you didn’t know, return returns control to the caller of a method/subroutine. Since you return YES from the method before you create the dictionary, it never gets created and set to the property.

    Additionally, the syntax for whatever you’re trying to assign that NSMutableDictionary to is incorrect. It seems personDict is a property based on the @synthesize so:

    You’re accessing the instance variable backing it. You’re supposed to access properties using dot notation like this:

    self.personDict = [NSMutableDictionary dictionaryWithContentsOfFile:@"diskDict"];
    
    //in addToDict
    [self.personDict setObject:@"newPerson" forKey:[newPerson name]];
    

    or using the setters and getters (dot notation has the identical effect):

    [self personDict];
    [self setPersonDict];
    

    I don’t think your usage of setObject:forKey: is what you intended.

    //the object associated with the key will always be
    //the NSString "newPerson" 
    [self.personDict setObject:@"newPerson" forKey:[newPerson name]];
    //did you mean to set the object to the method argument newPerson?
    [self.personDict setObject: newPerson forKey:[newPerson name]];
    

    Also, in Objective-C, you should name properties and variables in camel case, with the first letter being lower case. Like myCoolVar, or in this case, personDict rather than PersonDict; first letter capital camel case is used for class names, like your Person class.

    Finally, if you manually @synthesize, it’s a good idea to name the backing variable _<variable name> to avoid accessing it by accident.

    @synthesize personDict = _personDict;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.