Using Flutter I have to change MacOS apps name in dock. How can I do that?

Viewed 21

hello I'm using flutter to make a macOS app. My project name was sayac and when I run the app as macOS app in both window name and dock name (when I hover mouse on icon) says sayac but I want to change that to zikirmatik. I changed CFBundleName in Info.plist and window name is zikirmatik now but dock name is still named sayac. How can I also change that ?

1 Answers

From documentation:

The configuration for the product identifiers are centralized in macos/Runner/Configs/AppInfo.xcconfig. For the app’s name, set PRODUCT_NAME, for the copyright set PRODUCT_COPYRIGHT, and finally set PRODUCT_BUNDLE_IDENTIFIER for the app’s bundle identifier.

So in your macos/Runner/Configs/AppInfo.xcconfig you just change PRODUCT_NAME param:

// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = HELLO WORLD APP

Run flutter clean, then flutter run will show new app name.

Related