Re: CLI open -a myApp fileName - not working
Re: CLI open -a myApp fileName - not working
- Subject: Re: CLI open -a myApp fileName - not working
- From: Lester Dowling <email@hidden>
- Date: Sat, 17 Jun 2006 16:12:29 +1000
On 17/06/2006, at 11:39 AM, David Hoerl wrote:
I often use the CLI command "open -a Preview somefile.tif" and it
works just fine. When I try it with my app, I get the following:
open -a /fullPathTo/myApp file.tif
2006-06-16 19:31:23.150 open[13149] LSOpenFromURLSpec() returned -1
for application /fullPathTo/myApp path /anotherfullPath/file.tif.
[snip]
This sort of mimiced what TextEdit uses:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>tif</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>tif.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/tif</string>
</array>
<key>CFBundleTypeName</key>
<string></string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
Try substituting the tiff entry in your Info.plist with one that you
know works, like for example, from Safari's Info.plist:
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>tiff</string>
<string>tif</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>document.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>image/tiff</string>
</array>
<key>CFBundleTypeName</key>
<string>TIFF image</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>TIFF</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
That ought to get your app back online.
Regards,
Lester
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden