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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:34:06+00:00 2026-05-23T07:34:06+00:00

I updated to new Xcode 4.2 (for iOS 5), but now my project doesn’t

  • 0

I updated to new Xcode 4.2 (for iOS 5), but now my project doesn’t build anymore with the error: “‘Category’ redeclared as different symbol”. Then there is a host of errors related as ‘Request for member ‘name’ is not a structure or union and warnings like “Invalid receiver type ‘Category'”.

I guess it has to do with how I do my declarations. Regarding this (Core Data) class, I have the following declaration:

#import <CoreData/CoreData.h>

@class Article;
@interface Category :  NSManagedObject  
{
}

@property (nonatomic, retain) NSNumber * id;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * desc;
@property (nonatomic, retain) NSDate * lastUpdate;
@property (nonatomic, retain) NSSet* articles;   
@end

@interface Category (CoreDataGeneratedAccessors)
- (void)addArticlesObject:(Article *)value;
- (void)removeArticlesObject:(Article *)value;
- (void)addArticles:(NSSet *)value;
- (void)removeArticles:(NSSet *)value;

@end

—

#import "Category.h"

@implementation Category 

@dynamic id;
@dynamic name;
@dynamic desc;
@dynamic lastUpdate;
@dynamic articles;

@end

—

In another Core Data class, which has a n:n relation I use “@class Category;” to declare.
In the class where I use this class I import the header file: #import “Category.h”.

What is the best way of doing this, or what more info there is needed to find the problem. I have tried all kinds of different combinations but am confused now when and how to declare. (the code worked fine the last time I build)

  • 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-23T07:34:07+00:00Added an answer on May 23, 2026 at 7:34 am

    Your code is probably seeing things declaration from objc/runtime.h:

    typedef struct objc_category *Category;
    

    By convention, Cocoa classes are named with a two- or three-letter prefix indicating the originating person, organization or project. This helps avoid this kind of issue.

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

Sidebar

Related Questions

Since I updated XCode for the new iOS 5.0 i get a warning in
I just update to new xcode and now the project file stopped being able
I recently updated to the new version of XCode and the session start code
Updated question, see below I'm starting a new project and I would like to
As the the Question asks, I currently sport xcode 3.2.3 with iOS 4.0.1 but
I have updated my iPod to iOS5 and xcode to 4.2 but none of
I updated my iPhone to the new OS 4.0 and went to build my
I recently updated to the new version of xcode. Big big mistake I have
Xcode 3.2 provides an awesome new feature under the Build menu, Build and Archive
I upgraded (not a new install) from snow leopard to lion. Now rmagick doesn't

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.