views:

72

answers:

2

hello,

I want to know which is the equivalent concept of Java packages in iPhone. Is it bundling or Static library?

+3  A: 

Java Packages imply namespace, which doesn't exist in Objective-C. However, XCode supports "Groups" for managing common code (basically placed in their own directory). Libraries are typically delivered as a Framework.

This are added to a project as a "framework". For example, Address Book, OpenGL or Third Party.

MarkPowell
+2  A: 

Java packages are used to avoids namespace collision, which is a situation where two pieces of code have the same name but do different things.

To do this in objective C - add prefix your class names with initials. All class created in cocoa framework have a prefix 'NS'. You can define your own prefix for your code.

Girish Kolari