Today, I ran into another case which was caused by exactly same mechanism but under different usage scenario.
Let’s say that you have multiple plug-ins projects for a certain host program.
You can write all the codes for all the projects, or other team mates can work on some projects while you are working on your set of projects.
Let’s say that your team decide to share same source codes with some common classes. Remember. They are all different projects for plug-ins for a same host application program.
Currently, Apple’s guideline is this. “Preventing Name Conflicts”
However, avoiding name conflict by using unique names only is not sufficient. In the scenario I said above, you want to copy some of your colleague’s codes into your codes. Because they are the same codes, you want to keep the class names. Then when the plug-ins are to be loaded, they get conflicted.
Some of Final Cut Pro plug-ins from Motion etc conflict each other. When there are conflicting classes, which one is loaded is not determined. So, when they are exactly same, it would not give you much headache, but somehow they are slightly different (because of version difference), the result of running that part of codes doesn’t ensure the behavior you expect.
I saw many people asked “name space” in Objective-C, and some opposed it. There are good reasons here and there. But mostly I believe introducing namespace do good thing more than bad thing.
Is there any strong reason Apple and GNU gcc team doesn’t introduce namespace to Objective-C?
I found out that there was another post I wrote to solve this problem. It is to use @compatibility_alias. However, when I used it, it didn’t work for me somehow.
This is a follow up to Bug ID# 9309924. After further investigation it has been determined that this is a known issue, which is currently being investigated by engineering. This issue has been filed in our bug database under the original Bug ID# 2821039. The original bug number being used to track this duplicate issue can be found in the State column, in this format: Duplicate/OrigBug#.
Thank you for submitting this bug report. We truly appreciate your assistance in helping us discover and isolate bugs.
Apple Worldwide Developer Relations