Search code examples
javamacoslibgdxapp-storemac-app-store

The Info.plist indicates a Mac app, but submitting an ipa when submitting with Application Loader


I want to submit my game to the mac app store but I keep getting "The Info.plist indicates a Mac app, but submitting an ipa".

Here's the process from start to finish:

First I create a .app file with libgdx packr with this command: (the folder has Game.jar, icon.icns, packr.jar, and 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

Then I add NSHumanReadableCopyright, CFBundleIdentifier, CFBundleVersion, LSApplicationCategoryType making my info.plist look like this:

<?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>

After that I codesign it using

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

Then codesign the contents

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 {} \;

My entitlement file is in the same folder as the Game.app and looks like this

<?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>

After all this I pack it into a pkg

productbuild --component Game.app /Applications -s "3rd Party Mac Developer Installer: Company" Game.pkg

My problem is that after ALL this, Application Loader gives me "The Info.plist indicates a Mac app, but submitting an ipa" even though the file extension is .pkg! Any help?


Solution

  • I was having the same issue... it seems to be a problem with Application Loader 3.6.

    Download a previous version of Application Loader and it should work (tested with Application Loader 3.5 that is included with xCode 7.3.1).