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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:58:14+00:00 2026-06-01T14:58:14+00:00

The NSObject protocol comes with the stock protocol templates, but it doesn’t appear to

  • 0

The NSObject protocol comes with the stock protocol templates, but it doesn’t appear to be all that necessary for actual implementations of the protocol. Leaving it out seems to change absolutely nothing. So, is it really necessary for a protocol to inherit from it, or is it just an unnecessary add-on?

  • 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-01T14:58:16+00:00Added an answer on June 1, 2026 at 2:58 pm

    For years I (and many like me) didn’t make our protocols conform to <NSObject>. It works fine. But it can often be annoying. The most common annoyance is that you can’t use respondsToSelector: without casting back to NSObject* (which kind of defeats the whole point of a protocol). That didn’t matter back in the ObjC1 days because there was no @optional, so none of us worried about it (we didn’t use protocols much at all in those days since without @optional they weren’t that useful). Then ObjC2 came along with the wonderful addition of optional methods and suddenly respondsToSelector: mattered. It took a little while for the slower of us, but eventually we started to figure out that life was much simpler if you make your protocols conform to <NSObject>. Blessedly this has now made its way into Xcode, making it easier for everyone to do things in the more convenient way.

    But no, you don’t have to do it. It doesn’t matter in many cases. But there’s not much reason not to do it, so I recommend it.

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

Sidebar

Related Questions

I have been seeing some code around that resembles the following: @protocol MyProtocol <NSObject>
I found that I could do such things in objc: Protocol* aProtocol = @protocol(NSObject);
In the NSObject protocol, it defines a method that is similar to this: -(Class)
@protocol Eating @end @interface Eat : NSObject<Eating> { } - (id<Eating> *)me; @end @implementation
I'm doing something like this: @protocol CallbackDelegate -(void) performCallback; @end @interface MyObject : NSObject
Attempting to make a NSObject called 'Person' that will hold the login details for
You can see following in NSObject.h file // 1. here is a protocol @protocol
@protocol MyViewDelegate <NSObject> - (void) didFinishProcessing:(MyView*)myView; //compiler stops here with error @end @interface MyView
I've got a protocol: @protocol Gadget <NSObject> @property (readonly) UIView *view; - (void) attachViewToParent:(UIView
I have defined a protocol like this: @protocol RSSItemParserDelegate <NSObject> - (void)RSSItemParser:(RSSItemParser *)parser didEndParsingSuccesfully:(BOOL)success;

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.