feat: add macos platform.#134
Open
nkanf-dev wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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
NotificationServiceto initialize and handle notifications/permissions on macOS. - Adjusted a
Columnlayout in the homepage to usemainAxisSize: 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.
| **/Pods/ | ||
|
|
||
| # Xcode-related | ||
| **/dgph |
Author
There was a problem hiding this comment.
.dgph 是 Xcode 构建系统生成的依赖图文件(dependency graph),存放在 DerivedData 的子目录里。Flutter 的macOS 模板 .gitignore 里加了 /dgph 来防止这些构建产物意外进入仓库。
Copilot 说它 "looks like a typo" 并建议换成 *.dSYM、DerivedData 等,但实际上这些在 Flutter 模板里已经有其他地方处理了(/Flutter/ephemeral/ 等)。**/dgph 是专门针对这个特定文件类型的,不是拼写错误。
BenderBlog
requested changes
May 13, 2026
f3e5882 to
5766bb7
Compare
5766bb7 to
453be07
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
添加macos平台构建。
做了一下基本的兼容,跑起来没有问题。