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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:30:32+00:00 2026-05-25T09:30:32+00:00

I have a class whose methods are determined at runtime, as indicated in my

  • 0

I have a class whose methods are determined at runtime, as indicated in my question here. This works great, but now I have a bunch of warnings that look like the following littering my code:

Class method '+objectIsNotNil:' not found (return type defaults to 'id')

While these warnings don’t actually affect the build process, they’re very annoying and make it harder to spot relevant warnings. Is there some way to disable them, but only for the Assert class (maybe some kind of macro)? If this isn’t possible, then is there some way to turn them off for the entire 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-25T09:30:33+00:00Added an answer on May 25, 2026 at 9:30 am

    One alternative would be to use performSelector:withObject: instead of the direct method call.
    So instead of:

    [Assert objectIsNotNil:object];
    

    You could have:

    [Assert performSelector:@selector(objectIsNotNil:) withObject:object];
    

    It does not look quite as nice but it will remove the warnings. Furthermore, this pattern will work for any selector you want. To make things look a little better you could use macros in the following way:

    #define ASSERT_PRECONDITION(sel, obj)  [Assert performSelector:@selector(sel) withObject:obj]
    

    This way your assert would look like this:

    ASSERT_PRECONDITION(objectIsNotNil:, object);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a file X.h which defines a class X, whose methods are
I have a class whose constructor takes a const reference to a string. This
I have a class whose methods require that a certain class field exists correctly.
i have a class whose equality is based on 2 fields such that if
We have a class whose semantic behaviour is like the following :- struct Sample
I have a class whose functionality I'd like to depend on a set of
I have a CurrentUser class with a static property whose value was stored in
I have a Struts + Velocity structure like for example, a Person class, whose
I have a UIViewController whose view has a custom subview. This custom subview needs
I have a view helper file, app/helpers/analysis_helper.rb, whose toplevel methods I've been using in

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.