xcrun altool --upload can't find Info.plist

How do I fix this xcrun error and upload my app to the app store?

I am trying to upload a mac app to the Apple store but xcrun altool tells me it can't find my Info.plist file. The app bundle has the file (/Contents/Info.plist) with the correct settings as far as I can tell (CFBundlePackageType = APPL, see below). The app is created by Tauri and signed with the Apple distribution certificate.

How do I fix this and upload my app?

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)

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>

I'll answer my own post. You can not upload an app bundle (my-app.app) directly to the App Store. You need to upload a signed product package (my-app.pkg) to the store. This involves multiple steps including adding an entitlements file, adding the provisioning file, signing the app bundle and then finally creating and signing the product package.

xcrun altool --upload can't find Info.plist
 
 
Q