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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:00:52+00:00 2026-06-03T00:00:52+00:00

I am trying to do mapping with Restkit and created 2 classes as below.

  • 0

I am trying to do mapping with Restkit and created 2 classes as below. I got the following errors:

  • Unknown type name “Card” in Campaign.h
  • Unknown type name “Campaign” in Card.h
  • Property with ‘retain (or strong)’ attribute must be of object type
  • … more but similar errors

My question is there a way to achieve below class declaration by re-using class.

Campaign.h

#import "Card.h"

@interface Campaign : NSObject

@property (nonatomic, strong) NSNumber* campaignId;
@property (nonatomic, strong) NSString* title;
@property (nonatomic, strong) Card* card;

@end

Card.h

#import "Campaign.h"

@interface Card : NSObject

@property (nonatomic, strong) NSNumber* cardId;
@property (nonatomic, strong) NSString* name;
@property (nonatomic, strong) Campaign* campaign;

@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-06-03T00:00:53+00:00Added an answer on June 3, 2026 at 12:00 am

    Just in case someone need it in future. Here my solution:

    Campaign.h

    @class Card;
    
    @interface Campaign : NSManagedObject
    
    @property (nonatomic, strong) NSNumber* campaignId;
    @property (nonatomic, strong) NSString* title;
    @property (nonatomic, strong) Card* card;
    
    @end
    

    Campaign.m

    #import "Card.h"
    
    @implementation Campaign
    
    ...
    
    @end
    

    Card.h

    @class Campaign;
    
    @interface Card : NSManagedObject
    
    @property (nonatomic, strong) NSNumber* cardId;
    @property (nonatomic, strong) NSString* name;
    @property (nonatomic, strong) Campaign* campaign;
    
    @end
    

    Card.m

    #import "Campaign.h"
    
    @implementation Card
    
    ...
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to ignore a property from my type when performing mapping using AutoMapper.
I'm trying to load nhibernate mapping for POCO classes at runtime with following lines:
I am trying to create a mapping file for the following Model using Fluent
I'm trying to use empty() in array mapping in php. I'm getting errors that
I'm trying to build a way of mapping from one type to another, knwoing
I am trying to follow the Android mapping tutorial and got to this part
I am trying to create a type of mind mapping software that runs on
I am getting NHibernate.MappingException while trying to do one-to-many mapping in fluent nhibernate. Below
I'm using Doctrine ODM and trying to make a custom mapping type but I'm
I'm trying to generate the correct mapping for 2 classes that have a collection

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.