java - Info.plist 表示是 Mac app,但是用 Application Loader 提交时提交的是 ipa

标签 java macos libgdx app-store mac-app-store

我想将我的游戏提交到 Mac 应用程序商店,但我不断收到“Info.plist 指示 Mac 应用程序,但提交的是 ipa”。

这是从开始到结束的过程:

首先,我使用 libgdx 创建一个 .app 文件 packr使用此命令:(文件夹中有 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 -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

我的问题是,在这一切之后,Application Loader 给我“Info.plist 表示一个 Mac 应用程序,但提交一个 ipa”,即使文件扩展名是 .pkg!有帮助吗?

最佳答案

我遇到了同样的问题...这似乎是 Application Loader 3.6 的问题。

下载以前版本的 Application Loader,它应该可以工作(使用 xCode 7.3.1 附带的 Application Loader 3.5 进行测试)。

关于java - Info.plist 表示是 Mac app,但是用 Application Loader 提交时提交的是 ipa,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40056967/

相关文章:

java - 如何为一个 Java 类创建两个接口(interface),一个是只读的,一个是可读写的?

bash - 在 shell 脚本 OS X 中设置环境变量

android - 当我在 Android 设备上运行程序时,我的 APK 存储在哪里?

android - 在 LibGDX 中生成一个随机数

java - 使用两个类路径编译 servlet

java - 带 Break 的无法到达语句

java - 在 applet 或 Google AppEngine 中托管 Java 编译器?

macos - 终端启动错误: object 0x7fe089600420: pointer being freed was not allocated

cocoa - IO蓝牙同步读取

java - 为什么 Pixmap 的圆差为 1?