Why is xcrun returning 'missing Info.plist'?

133 Views Asked by At

I am trying to upload a mac app to the Apple store but xcrun altool gives the following error:

Error: ...The package is missing an Info.plist or the CFBundlePackageType is not ‘APPL’ or ‘FMWK’...

The app bundle contains Info.plist with the CFBundlePackageType set to APPL (see below). The app is created by Tauri and signed with my Apple distribution certificate.

How do I fix this and upload my app?

Command:

xcrun altool --upload-app --file "my-app.app" --type macos -u "my-id" -p "my-password"

Error:

2023-01-17 18:14:51.476 *** Error: Error uploading 'my-app.app'.
2023-01-17 18:14:51.476 *** Error: Could not determine the package’s bundle ID. The package is missing an Info.plist or the CFBundlePackageType is not ‘APPL’ or ‘FMWK’. Unable to validate your application. (-21017)
 {
    NSLocalizedDescription = "Could not determine the package\U2019s bundle ID. The package is missing an Info.plist or the CFBundlePackageType is not \U2018APPL\U2019 or \U2018FMWK\U2019.";
    NSLocalizedFailureReason = "Unable to validate your application.";
}

my-app.app/Contents/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>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleDisplayName</key>
    <string>My App</string>
    <key>CFBundleExecutable</key>
    <string>My App</string>
    <key>CFBundleIconFile</key>
    <string>icon.icns</string>
    <key>CFBundleIdentifier</key>
    <string>my.site.my-app</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>My App</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>CFBundleVersion</key>
    <string>20230117.230842</string>
    <key>CSResourcesFileMapped</key>
    <true/>
    <key>LSApplicationCategoryType</key>
    <string>public.app-category.developer-tools</string>
    <key>LSMinimumSystemVersion</key>
    <string>10.13</string>
    <key>LSRequiresCarbon</key>
    <true/>
    <key>NSHighResolutionCapable</key>
    <true/>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright 2023</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key></key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
        </dict>
    </dict>
</dict>
</plist>
1

There are 1 best solutions below

0
toconn On BEST ANSWER

Answering my own question, you can not directly upload an app bundle (my-app.app) to the app store. You have a number of things you need to do but you will finally need to create a signed product package (my-app.pkg).

Steps:

Configure tauri.conf.json (if using Tauri)
Set a Version Number
Create the App Bundle
Create entitlements.plist
Add Provisioning Profile
Sign the App Bundle
Create Signed Package
Upload

See my full write-up on deploying an app to the app store here. This is focused on deploying a Tauri app but the basics apply to uploading any non-Xcode Mac app to the app store.