Search code examples
iphonexcodeurlidentifieruti

Why we use reversed url identifier on Xcode?


Why do we use a reversed URL identifier like com.yourcompany.noname within Xcode?


Solution

  • Same as in Java - to uniquely identify ourselves. The assumption is that if you have a URL, no-one else would use the same string.

    Now why it's reversed, it's guesswork, but I'd say the question is wrong: it's the hostnames that originally got it "wrong" starting with the most specific thing, and it perpetuated down the history. URL of the form http:com.yourcompany.noname/bigdir/littledir/file#fragment would make much more sense(*), where you start with the most global thing, and end up with the tiniest detail, just like when reading time, or arabic numerals.

    (Most date formats also did this wrong - the only logically consistent format is YYYY/MM/DD, if we use numbers like we do, with the smallest unit on the right).

    *) Also, the creator of the URL, if I remember correctly, is on the record for saying that his biggest regret is the two slashes. EDIT: found it