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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:43:59+00:00 2026-06-03T10:43:59+00:00

This error very strange. I have a bunch of properties in app delegate which

  • 0

This error very strange. I have a bunch of properties in app delegate which I have no problem to access. My code worked fine without ARC, but when I turned on ARC I receive this very strange error.
Property ‘navigationController’ not found on object of type ‘AppDelegate *’

A bunch of other properties work just fine except this.

I already clean everything and restarted Xcode.

Here is the code:

AppDelegate.h:

@interface AppDelegate : UIResponder <UINavigationControllerDelegate> {
    UINavigationController *navigationController;
    NSString *appName;
}
@property (strong, nonatomic) NSString *appName;
@property (strong, nonatomic) UINavigationController *navigationController;

AppDelegate.m

    #import "AppDelegate.h"
    @synthesize navigationController, appName;

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        appName = [NSString stringWithString:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]];
        navigationController = [[UINavigationController alloc] initWithRootViewController:self.startViewController];
}

MyClass.h

@class AppDelegate;
@interface MyClass: UIResponder {
    AppDelegate *appDelegate;

}

MyClass.m

#import "AppDelegate.h"
#import "MyClass.h"

@implementation MyClass 
- (id)init
{
    self = [super init];
    if (self) {
        // Initialization code here. 
        appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; 
        [self initFacebook];
    }
    return self;
}

- (void) doStuff {
    NSLog(@"App Name:%@",appDelegate.appName); //this works fine

    //This one doesn't
    UINavigationController *myNavigationController = appDelegate.navigationController;
}

Update:
I did a workaround. Basically I created a property in MyClass called navigationViewController and I pass the object after MyClass is instantiated in AppDelegate instead of getting directly from AppDelegate in MyCLass (as shown above). I’m still puzzled, it must be a bug in the compiler. I’m still very interested in how to make the original code work.

  • 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-03T10:44:05+00:00Added an answer on June 3, 2026 at 10:44 am

    In MyClass.m, you are importing “MyClass” instead of “MyClass.h”. Could this be the problem?

    Sometimes cleaning a project is not sufficient: you may need to open the Organizer window, select your project under the Projects tab, and click the button to delete Derived Data.

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

Sidebar

Related Questions

When compiling code which uses code contracts, I have a very strange error I
it is very strange, because this error doesn't happen all the time... I have
I am getting a very strange error in my code. This assignment is for
I have a very strange error happening in an App that has been working
We have a very strange error occurring at a developer site which we are
I have a very strange error using NSMutableArray in cocos2d/xcode In my code, I
I get this error in xml file very often. here is the code in
I'm getting this worthless error in my code. it's very consistant and restarting the
I have this very strange issue with my MVC 2 project. Often times, I'll
I have a very strange problem with Android animations, I tried many different approaches

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.