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

  • Home
  • SEARCH
  • 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 7616307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:51:28+00:00 2026-05-31T02:51:28+00:00

Previously i posted a question in SO , without knowing what caused this error.

  • 0

Previously i posted a question in SO, without knowing what caused this error. Later i created a new project and re-created the error. Here’s what it says;

I am getting an error called Unknown type name Exam. I have a question posted under a different heading. But now i found what the problem is (SO i created another question, hope people will not object this move, and provide me a solution to my problem 🙂 )

I created a fresh project to find what went wrong.

I created a NSObject class called Exam.

in the AppDelegate.h i added the following;

  #import <UIKit/UIKit.h>
#import "Exam.h"
@interface AppDelegate : UIResponder <UIApplicationDelegate, UITabBarControllerDelegate>{
   Exam *ex;
}

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) Exam *ex;
@property (strong, nonatomic) UITabBarController *tabBarController;

@end

in AppDelegate.m i have only synthesis ex, so i am not pasting that code here.

Now in the Exam class (NSObject class), i have the following code;

#import "AppDelegate.h"
#import <Foundation/Foundation.h>

@interface Exam : NSObject {
   AppDelegate*APP; <-- here i get Unknown type AppDelegate.
}

@end

As soon as i create the AppDelegate object here, i get the errors.

note: I am using ARC

  • 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-31T02:51:29+00:00Added an answer on May 31, 2026 at 2:51 am

    change Exam.h to

    #import <Foundation/Foundation.h>
    
        @class AppDelegate
    
        @interface Exam : NSObject {
           AppDelegate*APP; <-- here i get Unknown type AppDelegate.
        }
    
        @end
    

    then your Exam.m above @implementation do this

        #import "AppDelegate.h"
    // Rest is same
        @implementation ... 
    

    Currently you are importing Exam.h in Appdelgate.h and AppDelegate.h in Exam.h ..this makes both the classes import each other before executing itself.. which cause compiler errors..since each class refers to the other..

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

Sidebar

Related Questions

I have posted a question on here previously asking similar advise, but this project
This is a new understanding of a question I posted previously: I have a
I've seen this question posted here previously but I'm not satisfied that I understand
I previously posted here: Controlling Access for Trial Subscription Since this is a new
I have posted similar question previously, but this time I am providing some code
sorry for my English. I previously posted this question as: Multiple ViewModels request same
This is an extension of a previously posted question. I'm trying to recursively build
This is a follow on from a previously posted question: How to generate a
This is a follow up to my related question posted previously. My .NET application
I posted this question previously and now have the localized strings loaded (the ones

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.