我使用Unity for OSX开发了一个应用程序来打开和修改图像。现在,我希望能够通过使用“打开方式”来打开文件。我设法使该应用程序出现在该子菜单中,但无法打开:我从操作系统收到一个错误,说我的应用程序无法打开文件。我真的不知道为什么,我在OSX中没有任何背景,在网络上也找不到任何帮助。
我的目标是通过查看命令行参数来检索该文件的路径。
这是info.plist的外观:
<?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>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>StereoMacBuild</string>
<key>CFBundleGetInfoString</key>
<string>Unity Player version 2017.3.1f1 (fc1d3344e6ea). (c) 2018 Unity Technologies ApS. All rights reserved.</string>
<key>CFBundleIconFile</key>
<string>PlayerIcon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.Company.ProductName</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>CFBundleName</key>
<string>StereoProto</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>PlayerApplication</string>
<key>UnityBuildNumber</key>
<string>fc1d3344e6ea</string>
<key>LSMinimumSystemVersion</key>
<string>10.9.0</string>
</dict>
</plist>
感谢任何花些时间帮助我的人!