How to define allowed file extensions in Info.plist?

1 view
Skip to first unread message

Ulf Dunkel

unread,
May 24, 2011, 10:05:39 AM5/24/11
to Cocoa Development, Xcode-Users Users
I wonder how to define that an app should only be able to read and write
these types of files:

.csv
.dat
.txt

I tried everything I could find in the documentation for
CFBundleDocumentTypes but cannot manage to get it to work properly.

I also tried to configure it in the app's target's Properties section
named Document Types, no success.

Can someone please show me how to?

---UlfDunkel
_______________________________________________

Cocoa-dev mailing list (Coco...@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev-garchive-98506%40googlegroups.com

This email sent to cocoa-dev-ga...@googlegroups.com

Kyle Sluder

unread,
May 24, 2011, 11:10:23 AM5/24/11
to Ulf Dunkel, Cocoa Development, Xcode-Users Users
On Tue, May 24, 2011 at 7:05 AM, Ulf Dunkel <dun...@calamus.net> wrote:
> Can someone please show me how to?

Post your Info.plist.

--Kyle Sluder

Ulf Dunkel

unread,
May 24, 2011, 4:35:57 PM5/24/11
to Cocoa Development, Xcode-Users Users
Hi Christiaan.

> This is a list for questions about the use of the xcode tool set, so you're at the wrong list.

You may have seen that I have xposted to cocoa-dev and xcode-users
because I wasn't sure if this refers to cocoa (CFBundleTypeExtensions)
or Xcode, where you can set up these parameters in the handy Target
Properties section Document Types, too.


> Also I'd advice you to read up a bit about asking good questions (just google it), because even if this was the right list you'd probably not get any useful answer (the answer BTW is: then you didn't do it correctly, as described in the docs).

Wow, good point. This is almost true for every question which is asked
in both lists. Take a cookie from the jar. :-)

Ulf Dunkel

unread,
May 24, 2011, 4:38:21 PM5/24/11
to Cocoa Development, Xcode-Users Users
Hi Kyle.

On 24.05.2011 17:10, Kyle Sluder wrote:
> On Tue, May 24, 2011 at 7:05 AM, Ulf Dunkel<dun...@calamus.net> wrote:
>> Can someone please show me how to?

Here is the relevant part of the Info.plist with the current settings
for just one file extension (.csv):

<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>CSV</string>
</array>
<key>CFBundleTypeIconFile</key>
<string></string>
<key>CFBundleTypeName</key>
<string>CSVDoc</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>????</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>NSDocumentClass</key>
<string>CSVDocument</string>
</dict>
</array>

I would like to have three file types set available automatically: .csv,
.txt, .dat.

Any help is really appreciated.

---UlfDunkel

boxworkjobs

unread,
May 24, 2011, 10:52:21 AM5/24/11
to Cocoa Development

Note: by administrator request please respond to this Ad offline.

Cocoa Developer

Box is looking for a talented, passionate developer that can help us innovate in the high end digital asset management sphere. A core focus will be on Flowork 3, the third iteration of Box’s state-of-the-art asset management software. The developer will be joining a small, experienced research and development team responsible for spearheading and developing new technology initiatives.

Responsibilities

Develop Cocoa and WebKit based client software
Participate in design activities with team members
Discuss requirements with end users
Contribute to the development and design of user interfaces
Implement, test, debug, document and integrate new User Interface components into existing code base
Requirements

B.S. in Computer Science or related field preferred (or equivalent experience)
5 years experience in Cocoa development
Expert level knowledge of Cocoa/Objective-C
Direct work experience with shipped Cocoa products
Experience with customizing Cocoa controls
Strong interest in user interface development and design
Ability to work on-location in Manhattan (no off-site consultants please)
Useful experience

WebKit and Javascript integration in Cocoa
Image Processing
OpenGL and Quartz
Subversion or git
Working knowledge of modern, frontend technologies, including core JavaScript, third party JavaScript libraries (e.g. jQuery, YUI, Mootools) and CSS3
Job Benefits

Competitive salary
Be part of a small, creative team with the freedom to learn and apply cutting edge technologies
Work in a large, bright Manhattan office
Work on Mac Pros with 30" monitors
Contribute to an exciting product suite that will make a significant impact on digital production and asset management
About Box

Box is a creative agency founded by Pascal Dangin that offers integrated services for photography and cinematography, allowing clients to go further with their ideas, visual concepts and overall image development. Recognized as the leader in post production services for the fashion industry, work by Box regularly appears on the covers and pages of major publications, fine art books, museums, television networks and online, as well as some of the worlds leading advertising campaign.

Located in the Meatpacking District of Manhattan, Box employs a software development team working on various projects involving Cocoa, Python, JavaScript, CSS and HTML.

Please no agencies, third parties or consultants; this is a full time position.

Please email a resume and cover letter (pdf, Word or plain text format) to boxwo...@boxstudios.com.

http://www.boxstudios.com/jobs/#cocoadeveloper

Box
412 West 14th street
New York, NY 10014

Alexander Spohr

unread,
May 25, 2011, 10:38:13 AM5/25/11
to Ulf Dunkel, Cocoa Development, Xcode-Users Users
Ulf, das ist ein Array, warum tust Du also nicht einfach alle Extensions da rein?
Oder habe ich Deine Frage nicht verstanden?

Gruß,
atze

> http://lists.apple.com/mailman/options/cocoa-dev/atze%40freeport.de
>
> This email sent to at...@freeport.de

Alexander Spohr

unread,
May 25, 2011, 11:06:11 AM5/25/11
to Cocoa Development
Sorry for replying in German. I wanted to reply off list only but hit 'reply to all'.

Translation:
That’s an array. Why don’t you just put all your extensions into it?

_______________________________________________

Cocoa-dev mailing list (Coco...@lists.apple.com)

Help/Unsubscribe/Update your Subscription:

Ulf Dunkel

unread,
May 25, 2011, 2:33:09 PM5/25/11
to Alexander Spohr, Cocoa Development
Thank you for knocking my head on the table, Atze. That simple solution
made my day. (Sometimes the Xcode project settings interface drives me
nuts.)

- - - - -

On 25.05.2011 17:06, Alexander Spohr wrote:
> Sorry for replying in German. I wanted to reply off list only but hit 'reply to all'.
>
> Translation:
> That’s an array. Why don’t you just put all your extensions into it?

_______________________________________________

Reply all
Reply to author
Forward
0 new messages