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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:42:30+00:00 2026-05-31T01:42:30+00:00

I read Objective–C can easily lead to name collisions due it’s nature, so it

  • 0

I read Objective–C can easily lead to name collisions due it’s nature, so it is a best–practice to prefix your code.

How do you solve this issue if your MyAwesomeApp iOS application which is using two external libraries FooLibrary and BarLibrary results name collisions, because internally also FooLibrary happens to use BarLibrary?

At first one might suggest to remove either one of the references to BarLibrary, but you can’t do that, because although both are BarLibrary, they are actually two different versions of it, so FooLibrary depends on BarLibrary(v1) implementation whereas your MyAwesomeApp depends on BarLibrary(v2) implementation.

At this point I realized two distinct versions of the same library are two different things really and so they shouldn’t co–exist in the same project in the first place.

Is there any other way of solving this puzzle other than refactoring (by renaming things) someone else’s code please?

  • 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-31T01:42:31+00:00Added an answer on May 31, 2026 at 1:42 am

    If the other library is using a library that is likely to be shared, e.g. a JSON library, and they are compiling a library for you to include, then they should really put their own prefixes on the library.

    I’ve seen it done this way with Urban Airship, for example. They use JSONKit (or some JSON library), but they prefix all the JSONKit usages with UA – so that when I use a different version of JSONKit, they compile and run together.

    I’ve also seen it done with Reachability … everyone seems to have their own version of this…

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

Sidebar

Related Questions

How can I read the data from read stream in Objective-C? The code below
Using Objective-C, how can I give/take the permissions for all user to read a
I need code for read json data from url in ios (objective c) If
Actually I have read about that I can write Objective-C app on Linux (using
You can declare a method in objective-c and name each parameter twice , basically.
My objective is to read in to the command line the name of a
When ARC came to Objective-C, I did my best to read through the Objective-C
I'm pretty new to Objective-C. I've read through a similar question but I can't
I read here Learn C Before Objective-C? Usually I then replace some Obj-C code
I've just read all of objective-c global constants variables Q&A but I found them

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.