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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:35:20+00:00 2026-06-15T18:35:20+00:00

In apple documentation Unlike class names, protocol names don’t have global visibility. They live

  • 0

In apple documentation Unlike class names, protocol names don’t have global visibility. They live in their own namespace.

What does this mean as documentation does not elaborate it. I have tried and I have make two protocols with same name but they are in different files compiler shows warning duplicate protocol.
When I import both protocols in single file the first protocol import hides other protocol deceleration. So first imported protocol method works. Other gives warning

So what does this line mean? I am not able to understand it properly.

  • 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-15T18:35:22+00:00Added an answer on June 15, 2026 at 6:35 pm

    In other programming languages, you can have the same class name in different directories or packages.

    In Objective C, class names are global and there fore there is no name space concept. The names have to be unique. There cannot be two Employee classes.

    But for protocols, you can have a same protocol defined in different files and based on which files you import, you have visibility into that protocol.

    If you do not import that header file, you do not know about that protocol. – This is probably what is meant in the documentation when it says “Protocols do not have global visibility”

    Also at the same time, if you have two definitions of the same protocol, only the first one will be respected. Infact the compiler will show you a clear warning to this fact.

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

Sidebar

Related Questions

I have read the Apple documentation. They list the apps registered, yet in their
I have read the Apple documentation, and many postings on the subject on SO,
According to Apple documentation and other documentation I have read about on disk encryption
I have read in the Apple Documentation that we can use optional parameters in
I have searched apple's documentation and other posts on Stack Overflow, but I'm still
I have followed Apple's documentation on localizing iPhone software, using the genstrings ruby script
In the apple documentation, they show a notification where there's no view button, just
I have been reading all the Apple documentation on how to handle various events
I have read about NSPasteBoard in the Apple documentation, and how it allows for
I found the apple documentation to be unclear. I have experience of 2 years

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.