flutter macOS开发配置
切换最低支持版本
位于Podfile
文件中,修改platform :macos, '10.15'
即可。
ruby
platform :osx, '10.15'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
platform :osx, '10.15'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
修改启动图标
在macos/Runner/Assets.xcassets/AppIcon.appiconset
目录下,替换对应尺寸的图标即可。
修改窗口标题
在macos/Runner/Info.plist
文件中,修改CFBundleName
即可。
xml
<key>CFBundleName</key>
<string>Flutter</string>
<key>CFBundleName</key>
<string>Flutter</string>
修改打包后的文件名
修改 macos/Runner/Configs/AppInfo.xcconfig
shell
PRODUCT_NAME = <Application Name>
PRODUCT_BUNDLE_IDENTIFIER = com.google.flutter
PRODUCT_COPYRIGHT = Copyright © 2024 All rights reserved.
PRODUCT_NAME = <Application Name>
PRODUCT_BUNDLE_IDENTIFIER = com.google.flutter
PRODUCT_COPYRIGHT = Copyright © 2024 All rights reserved.