Skip to content

[1.7.0] Build error when running on older macOS versions (Github Actions): value of type 'NSToolbar' has no member 'allowsDisplayModeCustomization' #58

@pulyaevskiy

Description

@pulyaevskiy

Here is a snippet from the build log:

Running pod install...                                           2,594ms
Building macOS application...                                   
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:0000FE00-B50589B170C4DBCA, name:My Mac }
{ platform:macOS, arch:x86_64, id:0000FE00-B50589B170C4DBCA, name:My Mac }
/Users/runner/.pub-cache/hosted/pub.dev/macos_window_utils-1.7.0/macos/Classes/MainFlutterWindowManipulator.swift:418:[26](https://github.com/***************/actions/runs/14097190443/job/39486630928#step:11:27): error: value of type 'NSToolbar' has no member 'allowsDisplayModeCustomization'
              newToolbar.allowsDisplayModeCustomization = false
              ~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/.pub-cache/hosted/pub.dev/macos_window_utils-1.7.0/macos/Classes/MainFlutterWindowManipulator.swift:433:29: error: value of type 'BlockingToolbar' has no member 'allowsDisplayModeCustomization'
              customToolbar.allowsDisplayModeCustomization = false
              ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/.pub-cache/hosted/pub.dev/macos_window_utils-1.7.0/macos/Classes/MainFlutterWindowManipulator.swift:418:26: error: value of type 'NSToolbar' has no member 'allowsDisplayModeCustomization'
              newToolbar.allowsDisplayModeCustomization = false
              ~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/.pub-cache/hosted/pub.dev/macos_window_utils-1.7.0/macos/Classes/MainFlutterWindowManipulator.swift:433:[29](https://github.com/***************/actions/runs/14097190443/job/39486630928#step:11:30): error: value of type 'BlockingToolbar' has no member 'allowsDisplayModeCustomization'
              customToolbar.allowsDisplayModeCustomization = false
              ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...

** BUILD FAILED **

Build process failed
Error: Process completed with exit code 1.

Note that the workflow uses macos-latest runner with Xcode 15.4 and macos-14, I believe.

I don't get any errors when building locally, but I have Sequoia, so the allowsDisplayModeCustomization method is available.

Downgrading to 1.6.1 resolves the issue.

I see there are macos-15 runners in preview available so I can try those too with the latest version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions