Apple's Cocoa and Cocoa-Touch frameworks, respectively for OS X and iOS development, have many similarities. Many of the most frequently used classes, like NSString (Mac docs, iOS docs), NSArray (Mac docs, iOS docs) and NSDictionary (Mac docs, iOS docs) are identical or very nearly identical between the two environments.

The tag wiki for states that it is for the Cocoa framework for OS X, and that the tag should be used instead for iOS questions. However, it doesn't address which tag should be used for questions that span both frameworks.

When asking questions that involve the shared parts of the Cocoa and Cocoa-Touch frameworks, but aren't specific to either, what tags should I use? Should I apply both the and tags?

closed as off-topic by CRABOLO, Braiam, Martijn Pieters, ben is uǝq backwards, psubsee2003 Jan 2 '15 at 1:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question pertains only to a specific site in the Stack Exchange Network. Questions on Meta Stack Exchange should pertain to our network or software that drives it as a whole, within the guidelines defined in the help center. You should ask this question on the meta site where your concern originated." – CRABOLO, Braiam, Martijn Pieters, ben is uǝq backwards, psubsee2003
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Well, if your question is for something that will be running on both, then tag the question with both. Otherwise, why wouldn't you just tag the question with the one you're using? Why do you need something to cover both when you're not using both? – animuson Aug 27 '13 at 21:36
  • I would think cocoa by itself is normally sufficient, but given there is undoubtedly a much larger group following cocoa-touch, I might tag with both. Certainly tag the latter if you're going to be discussing an iOS project. – Joe Aug 27 '13 at 21:36
  • @animuson Because even though I'm only an iOS developer, some of my questions (like this one: stackoverflow.com/questions/17976839/…) may be equally relevant to OS X developers, and answerable by people who watch the Cocoa tag. – Mark Amery Aug 27 '13 at 21:37
  • @MarkAmery Note that there are differences between e. g. the lists of available features/classes/methods in Cocoa and Cocoa Touch. So, if you really want to ask about both frameworks, use both tags. – H2CO3 Aug 27 '13 at 21:38
  • This isn't particularly different from a c++ question about for loops, is it? Yes, for loops in c and c++ are the same (I think...), but you wouldn't tag a c++ for loop question with c. However, it's possible you'd add c++ even if you were in c, since you want the larger pool of people to answer your question (with the risk that the c++ people laugh you out of dodge). – Joe Aug 27 '13 at 21:44

Here's my take on it:

First, if this is a class or API specific to a particular framework, make sure you tag with that (like [core-image] or [accelerate-framework]). Some people like answering in particular areas, and don't follow the larger tags. This brings your question to the attention of experts in those frameworks and makes it easy to find in a search.

Second, if this a broader, foundational class, tagging with [objective-c] is a good choice.

Finally, when it comes to platforms, [cocoa] is the dominant tag for the Mac (with [osx] also being a viable alternative), and [ios] is the most popular now for iOS. [cocoa-touch] doesn't have quite the visibility of [ios], so I'd generally go with [ios] over that.

If you have something that touches both Mac and iOS, I see no problems with tagging it both [ios] and [cocoa] (or [ios] and [osx]). I did that in this question, and it was received well.

Not the answer you're looking for? Browse other questions tagged .