Skip to content

Conversation

trevor-e
Copy link
Member

@trevor-e trevor-e commented Sep 23, 2025

Every .app inside of the Product/Applications directory needs a corresponding Info.plist file since we use this to gather important information about the app. Currently we are allowing these uploads to take place which then immediately fail during processing -- not the greatest UX. It would be better to fail immediately so the user knows there is an issue since this means something went wrong with packaging their app.

Worth noting: technically there's a way to embed this file directly in the Mach-O binary but that is seldom used and we don't support parsing that in launchpad either.

Now we will fail and produce an error log:

  ERROR   2025-09-23 10:28:40.771928 -04:00 Invalid XCArchive: Missing required Info.plist file in .app bundle: /Users/telkins/Downloads/<redacted>.app.xcarchive/Products/Applications/<redacted>.app
error: File is not a recognized supported build format (APK, AAB, XCArchive, or IPA): /Users/telkins/Downloads/<redacted>.app.xcarchive

Resolves EME-311

@trevor-e trevor-e requested review from a team and szokeasaurusrex as code owners September 23, 2025 14:42
Copy link

linear bot commented Sep 23, 2025

}

// All .app bundles in Products/Applications/*.app should have an Info.plist file
let applications_dir = path.join("Products").join("Applications");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's the case that the .app needs to be in Products/Applications That is the default but it there is a ApplicationPath key in the archives Info.plist that determines the folder (it always starts with Products but the Applications part can differ) It looks like right now this code only checks the Info.plist if the app is in Products/Applications and otherwise allows any app? Should we ensure the .app still has an Info.plist even if the xcarchive uses a custom ApplicaitonPath?

Copy link
Member Author

@trevor-e trevor-e Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I updated this to glob for all .app dirs within Products/**/*.app so we are no longer coupled to the Applications folder. I want to avoid having to parse the top-level plist file since that will further couple us to macOS tooling.

Comment on lines 71 to 73
error!("Invalid XCArchive: Missing required Info.plist file at XCArchive root");
return false;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: I would recommend changing the function signature for this function to a Result<()>, and also updating the method name accordingly.

Then, rather than logging the error and returning false, you can just use anyhow::bail! to return the errors directly.

In the case where you currently return true, you'd instead return Ok(()).

Copy link
Member Author

@trevor-e trevor-e Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah nice I see what you mean, I was a bit confused by the anyhow lib at first. I updated it to propagate errors up so now it fails with the error as you suggested instead of a separate log:

  DEBUG   2025-09-24 14:19:46.752468 -04:00 Validating build format for: <redacted>.app.xcarchive
error: Invalid XCArchive: Missing required Info.plist file in .app bundle: /Users/telkins/Downloads/<redacted>.app.xcarchive/Products/Applications/<redacted>.app

@trevor-e trevor-e requested a review from a team as a code owner September 24, 2025 18:21
@trevor-e trevor-e merged commit 93dcac7 into master Sep 24, 2025
25 checks passed
@trevor-e trevor-e deleted the telkins/check-info-plist branch September 24, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants