Skip to content

feat: add macos platform.#134

Open
nkanf-dev wants to merge 1 commit into
BenderBlog:mainfrom
nkanf-dev:feat/add-macos-platform
Open

feat: add macos platform.#134
nkanf-dev wants to merge 1 commit into
BenderBlog:mainfrom
nkanf-dev:feat/add-macos-platform

Conversation

@nkanf-dev
Copy link
Copy Markdown

添加macos平台构建。
做了一下基本的兼容,跑起来没有问题。

image

Copilot AI review requested due to automatic review settings May 13, 2026 03:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new macOS Flutter target to the existing multi-platform app and updates Dart code paths to support macOS notification initialization/permissions and a small layout tweak.

Changes:

  • Added a full macOS Runner project (Xcode project/workspace, entitlements, assets, Podfile/CocoaPods integration).
  • Extended NotificationService to initialize and handle notifications/permissions on macOS.
  • Adjusted a Column layout in the homepage to use mainAxisSize: MainAxisSize.min.

Reviewed changes

Copilot reviewed 23 out of 32 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
macos/RunnerTests/RunnerTests.swift Adds a placeholder XCTest target for macOS.
macos/Runner/Release.entitlements Adds release sandbox/network/file entitlements for macOS.
macos/Runner/MainFlutterWindow.swift Sets up the macOS Flutter window and plugin registration.
macos/Runner/Info.plist Adds macOS app Info.plist metadata.
macos/Runner/DebugProfile.entitlements Adds debug entitlements (incl. JIT/network server) for macOS.
macos/Runner/Configs/Warnings.xcconfig Enables stricter compiler warning settings.
macos/Runner/Configs/Release.xcconfig Wires release build config to Flutter + warnings.
macos/Runner/Configs/Debug.xcconfig Wires debug build config to Flutter + warnings.
macos/Runner/Configs/AppInfo.xcconfig Defines macOS product name, bundle id, copyright.
macos/Runner/Base.lproj/MainMenu.xib Provides the macOS menu bar and main window XIB.
macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json Declares the macOS app icon asset set.
macos/Runner/AppDelegate.swift Adds macOS app delegate for Flutter.
macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Xcode workspace checks metadata.
macos/Runner.xcworkspace/contents.xcworkspacedata Xcode workspace definition (Runner + Pods).
macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme Shares the Xcode scheme for building/running/testing.
macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist Xcode project workspace checks metadata.
macos/Runner.xcodeproj/project.pbxproj Core macOS Xcode project configuration (targets/build phases/settings).
macos/Podfile.lock Locks CocoaPods dependencies for macOS.
macos/Podfile Defines CocoaPods integration for macOS Flutter plugins.
macos/Flutter/GeneratedPluginRegistrant.swift Registers Flutter plugins for macOS.
macos/Flutter/Flutter-Release.xcconfig Connects Flutter release settings with CocoaPods and generated config.
macos/Flutter/Flutter-Debug.xcconfig Connects Flutter debug settings with CocoaPods and generated config.
macos/.gitignore Ignores macOS Flutter ephemeral + Pods + some Xcode artifacts.
lib/repository/notification/notification_service.dart Adds macOS initialization, details selection, permissions, settings opening.
lib/page/homepage/homepage.dart Adjusts Column sizing to be min on main axis.
Files not reviewed (1)
  • macos/Runner.xcworkspace/contents.xcworkspacedata: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread macos/Runner/Configs/AppInfo.xcconfig
Comment thread macos/Runner.xcodeproj/project.pbxproj
Comment thread macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
Comment thread macos/.gitignore
**/Pods/

# Xcode-related
**/dgph
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

.dgph 是 Xcode 构建系统生成的依赖图文件(dependency graph),存放在 DerivedData 的子目录里。Flutter 的macOS 模板 .gitignore 里加了 /dgph 来防止这些构建产物意外进入仓库。
Copilot 说它 "looks like a typo" 并建议换成 *.dSYM、DerivedData 等,但实际上这些在 Flutter 模板里已经有其他地方处理了(
/Flutter/ephemeral/ 等)。**/dgph 是专门针对这个特定文件类型的,不是拼写错误。

Comment thread lib/page/homepage/homepage.dart Outdated
@nkanf-dev nkanf-dev force-pushed the feat/add-macos-platform branch from f3e5882 to 5766bb7 Compare May 13, 2026 06:19
@nkanf-dev nkanf-dev force-pushed the feat/add-macos-platform branch from 5766bb7 to 453be07 Compare May 13, 2026 06:23
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