What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

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?

share|improve this 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

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

You must log in to answer this question.

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