在 Mac OS X 上,如果我的应用程序尚未运行,则通过双击文档打开我的文档会失败
通过双击文档启动我的绘图应用程序时,Finder 会显示一个对话框,其中显示:
无法打开文档“test.jdwg”。应用程序“jDraft”无法打开“jDraft 文档”格式的文件。
此消息对话框出现在我的应用程序甚至有时间放置其启动屏幕之前,但是应用程序在后台启动(我看到启动屏幕)并且当我再次双击文档时,我的应用程序正确打开它。
作为背景,这个应用程序已经(在这方面)工作了多年。当我尝试使用JWrapper打包我的应用程序时,现在出现了这个问题。
以下是Info.plist
我的申请。
我怀疑这可能与 JWrapper 启动或派生 JVM 以运行应用程序的方式有关……很难说,因为 JWrapper 是封闭源代码,因此几乎超出了调试范围。
有没有人设法使文件关联在 Mac OS X 上与 JWrapper 一起工作?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>jDraft</string>
<key>CFBundleIdentifier</key>
<string>jwrapper.osx.jDraft</string>
<key>CFBundleVersion</key>
<string>43568712</string>
<key>CFBundleAllowMixedLocalizations</key>
<string>true</string>
<key>CFBundleExecutable</key>
<string>osxwrapper</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSUIElement</key>
<true/>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
<string>AppLogo.icns</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>jDraft Drawing 2</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeIconFile</key>
<string>jDraft-doc-jdwg.icns</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>jdwg</string>
</array>
<key>CFBundleTypeOSTypes</key>
<array>
<string>jdwg</string>
</array>
</dict>
</array>
</dict>
</plist>