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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:28:16+00:00 2026-06-16T04:28:16+00:00

My goal is to build a framework, but hide some methods and properties from

  • 0

My goal is to build a framework, but hide some methods and properties from public headers

The point is that framework has everything built in, but different versions must have some properties and methods hidden

I am looking for some method either to delete some marked properties from built headers or to avoid them to be added during the build phase.

In my mind it should be something like this:

@interface MyClass

@property (strong, nonatomic) SomeClass1* instance1;

#AVAILABLE FROM 1.0.2
@property (strong, nonatomic) SomeClass2* instance2;

#AVAILABLE FROM 1.0.3
@property (strong, nonatomic) SomeClass3* instance3;

- (void) method1;

#AVAILABLE FROM 1.0.3
- (void) method2;

@end

So if i set some predefined version value or project version value (doesn’t really matter) to 1.0.2
then instance1, instance2 and method1 SHOULD BE in the framework headers, but
instance3 and method2 will be available only in version 1.0.3 or higher

Does anyone know how to do that?

  • 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-16T04:28:17+00:00Added an answer on June 16, 2026 at 4:28 am

    You could do it with the pre-compilation step:

    a) In the project for every buildTarget create a #def value like version(#define VERSION 1.0). Every buildTarget should have a different version and will represent the different versions of your FW. To do that go to the project options, the build target options-> build settings-> PRECOMPILER MACROS

    b) Create a pre-compiler function like GREATER THAN:
    #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) v>= VERSION (that can be defined in the .pch)

    c) at the headers put

      #if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(1.0.2))
      property (strong, nonatomic) SomeClass2* instance2;
      #endif
    

    etc

    Do you think that solves your problem.

    if you do that the precompiler will jump the code that is under his version

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

Sidebar

Related Questions

My goal is to build an engine that takes the latest HL7 3.0 CDA
Goal is to make a dialog that appears on menu_key pressed, but it keeps
Goal: Produce an Excel document with information from 3 associated models that is similar
My goal is to build a simple custom guard with Guard . The gem
Okay, so my goal is to build a easy to use protocol for sending
For homework, I need to build a small java application.The main goal is to
i'd like to add a media library to a custom-made CMS that is build
I've downloaded the Zend framework stable build (1.11, I believe), uploaded to my servers,
My Goal: use webdeploy to deploy builds from TeamCity to remote IIS server I
I have a web application that use Sring IoC framework. I use the Java

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.