• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CLI open -a myApp fileName - not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: CLI open -a myApp fileName - not working
      • From: Uli Kusterer <email@hidden>
References: 
 >CLI open -a myApp fileName - not working (From: David Hoerl <email@hidden>)

  • Prev by Date: Re: NSTableColumn Date Format
  • Next by Date: Re: Deploying Cocoa Applications
  • Previous by thread: CLI open -a myApp fileName - not working
  • Next by thread: Re: CLI open -a myApp fileName - not working
  • Index(es):
    • Date
    • Thread