objective c - Creating an application that can open files of a given format -


I have an app that has been written in Obj-C. Info.plist has a list of file types, which can open the app. I'm pretty sure that this is working because when I try to drag an unacceptable type of file, the app is not highlighted, but when I drag a file of an acceptable type, it highlights it and Leaves me / P>

When I leave, the app starts, right, still, I get a dialog:

The document "foo.tiff" could not be opened. DocView can not open the file in "TIFF file" format.

I have this in my info.plist

  & lt; Key & gt; CF Band Type Extension & lt; / Key & gt; & Lt; Array & gt; & Lt; String & gt; TIF & lt; / String & gt; & Lt; String & gt; Tiff & lt; / String & gt; & Lt; / Array & gt; & Lt; Key & gt; CFBundleTypeIconFile & lt; / Key & gt; & Lt; String & gt; TIFFFile.icns & lt; / String & gt; & Lt; Key & gt; CFBundleTypeName & lt; / Key & gt; & Lt; String & gt; TIFF file & lt; / String & gt; & Lt; Key & gt; CFBundleTypeOSTypes & lt; / Key & gt; & Lt; Array & gt; & Lt; String & gt; TIFF & lt; / String & gt; & Lt; / Array & gt; & Lt; Key & gt; CFBundleTypeRole & lt; / Key & gt; & Lt; String & gt; Viewer & lt; / String & gt; & Lt; Key & gt; LSHandlerRank & lt; / Key & gt; & Lt; String & gt; Document / & lt; / String & gt;  

Thanks.

Does your app actually handle opening files?

If this is a NSDcast application, then you have to implement file reading methods like readFromData: ofType: error: . In a simple NSAPPin, your app representative should handle it in applications: OpenFile: . In both cases, you need to return yes to accept that you have successfully opened the file.

If you have implemented this, what message are you sending?


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -