Info.plist文件指出这是一款Mac应用程序,但使用Application Loader提交时却提交了一个ipa文件。

4
我希望将我的游戏提交到Mac应用商店,但是我不断收到“Info.plist指示为Mac应用程序,但提交了一个ipa”错误提示。
以下是从开始到结束的流程:
首先,我使用libgdx packr创建了一个.app文件,使用以下命令:(文件夹包含Game.jar、icon.icns、packr.jar和openjdk)
java -jar packr.jar \
     --platform mac \
     --jdk openjdk-1.7.0-u80-unofficial-macosx-x86_64-bundle.zip \
     --executable Game \
     --classpath Game.jar \
     --mainclass com.company.MyGdxGame.desktop.DesktopLauncher \
     --vmargs Xmx1G \
     --minimizejre hard \
     --output Game.app \
     --icon icon.icns

然后我添加了NSHumanReadableCopyright、CFBundleIdentifier、CFBundleVersion、LSApplicationCategoryType,使我的info.plist看起来像这样:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>CFBundleGetInfoString</key>
  <string>Game</string>
  <key>CFBundleExecutable</key>
  <string>Game</string>
  <key>CFBundleIdentifier</key>
  <string>com.company.gameOSX</string>
  <key>CFBundleName</key>
  <string>Game</string>
  <key>CFBundleIconFile</key>
  <string>icons.icns</string>
  <key>CFBundleShortVersionString</key>
  <string>1.0</string>
  <key>NSHumanReadableCopyright</key>
  <string>Company 2016</string>
  <key>CFBundleVersion</key>
  <string>1.0</string>
  <key>LSApplicationCategoryType</key>
  <string>public.app-category.productivity</string>
  <key>CFBundleInfoDictionaryVersion</key>
  <string>6.0</string>
  <key>CFBundlePackageType</key>
  <string>APPL</string>
  <key>IFMajorVersion</key>
  <integer>0</integer>
  <key>IFMinorVersion</key>
  <integer>1</integer>
  <key>NSHighResolutionCapable</key>
  <true/>
</dict>
</plist>

然后我使用codesign对其进行编码签名

codesign -v -f -s "3rd Party Mac Developer Application: Company" --entitlements Game.entitlements Game.app

然后对内容进行代码签名

find Game.app/Contents/ -type f \( -name "*.jar" -or -name "*.dylib" \) -exec codesign --verbose -f -s "3rd Party Mac Developer Application: Company" --entitlements Game.entitlements {} \;

我的授权文件与Game.app在同一个文件夹中,看起来是这样的。
<?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>
    <!-- Activates the sandbox, required. -->
    <key>com.apple.security.app-sandbox</key>
    <true/>
</dict>
</plist>

在这一切之后,我将其打包为一个pkg。
productbuild --component Game.app /Applications -s "3rd Party Mac Developer Installer: Company" Game.pkg

我的问题是,经过所有这些步骤后,应用程序加载器仍然显示“Info.plist指示为Mac应用程序,但正在提交ipa”,尽管文件扩展名为.pkg!有什么帮助吗?

1个回答

4
我遇到了同样的问题……这似乎是Application Loader 3.6的问题。下载之前版本的Application Loader,它应该可以工作(已使用包含在xCode 7.3.1中的Application Loader 3.5进行测试)。

就是这样了!在上传之前,唯一需要做的事情就是将 pkg 放入 /Applications 文件夹中,否则会出现错误。 - J W

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接