Skip to content

macOS: Frameworks for code assets have wrong layout, causing AppStore rejections #178623

@simolus3

Description

@simolus3

As mentioned in Anatomy of Framework Bundles, framework bundles for macOS are supposed to look like this:

// MyFramework.framework/ frameworkDir
// MyFramework -> Versions/Current/MyFramework dylibLink
// Resources -> Versions/Current/Resources resourcesLink
// Versions/ versionsDir
// A/ versionADir
// MyFramework dylibFile
// Resources/ resourcesDir
// Info.plist
// Current -> A currentLink

However, this:

await resourcesLink.create(
fileSystem.path.relative(resourcesDir.path, from: resourcesLink.parent.path),
);

Makes the Resources link point to Versions/A/Resources instead of Versions/Current/Resources, which is rejected when uploading macOS apps to the App Store.

To reproduce:

  1. Add a new Flutter project, depend on a package contributing code assets. E.g. this one as an example.
  2. Follow the usual steps for macOS publishing.
  3. Try to build and release to AppStoreConnect, notice the following error: ITMS-90291: Malformed Framework - The framework bundle sqlite3arm64macos (flutter_integration_tests.app/Contents/Frameworks/sqlite3arm64macos.framework) must contain a symbolic link 'Resources' -> 'Versions/Current/Resources'.

The fix is trivial and I'm happy to send a PR, just creating this issue to follow the requirements from the PR template :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform-macBuilding on or for macOS specificallyteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions