through terminal you can make it with a command - \"SetFile -a B filename\"
programmatically i think i should set one of the attributes through [[NSFileManager defa
You do not set a bundle attribute. You define your document types in your application's Info.plist file, and this is where you specify whether your document's are packages or plain files.
You can do this from within Xcode by selecting "Get Info" on your application target; switch to the "Properties" tab, then under "Document Types" add a document, give it a Name, set its file extension, choose an Icon file, then check the "Package" checkmark.