Add macOS PWA package generation (native AppKit WKWebView wrapper) - #6176
Draft
Judah Gabriel Himango (JudahGabriel) with Copilot wants to merge 4 commits into
Draft
Add macOS PWA package generation (native AppKit WKWebView wrapper)#6176Judah Gabriel Himango (JudahGabriel) with Copilot wants to merge 4 commits into
Judah Gabriel Himango (JudahGabriel) with Copilot wants to merge 4 commits into
Conversation
Contributor
|
Thanks @Copilot for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌 |
Copilot started work on behalf of
Judah Gabriel Himango (JudahGabriel)
July 24, 2026 01:16
View session
…d + TypeScript frontend)
Copilot
AI
changed the title
[WIP] Add macOS app package generation support
Add macOS PWA package generation (native AppKit WKWebView wrapper)
Jul 24, 2026
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.
Mac users installing a PWA via Safari get a persistent toolbar (back/forward/share/extensions) with no developer workaround. Chrome/Edge installs are toolbar-free but require users to know this. This adds a macOS package generator that produces a native AppKit + WKWebView app — no browser chrome, identical to Chrome/Edge PWA install, distributable as a
.zipcontaining an Xcode project (same sideload model as the Windows MSIX generator).The existing iOS template was not reused — it uses UIKit throughout (
UIViewController,UIApplication,UIDevice) and is incompatible with native macOS. Mac Catalyst was rejected as it still shows browser chrome.Swift template (
Resources/macOS/macos-project-src/)AppDelegate.swift— CreatesNSWindowwith.fullSizeContentViewstyle mask; applies manifesttheme_colorto title bar viatitlebarAppearsTransparent+backgroundColorViewController.swift—WKWebViewfilling the full window; navigation policy enforcing allowed/external origins;WKUIDelegatehandling JSalert/confirm/prompt; loading spinner; platform cookie injectionSettings.swift— Template placeholders ({{PWABuilder.macOS.url}},{{PWABuilder.macOS.bundleId}},{{PWABuilder.macOS.themeColor}}, etc.) replaced at generation timeInfo.plist—NSPrincipalClass=NSApplication,WKAppBoundDomains,NSAppTransportSecurityproject.pbxproj—SDKROOT=macosx,MACOSX_DEPLOYMENT_TARGET=13.0, no CocoaPodsC# backend
MacOSAppPackageOptions/XcodeMacOSProject— Options model + template substitution engine (extendsXcodeProjectbase; replaces tokens in Swift, plist, and pbxproj files; renamespwa-shell/dir to app name)MacOSImageWriter— Generates macOS icon sizes: 16, 32, 64, 128, 256, 512, 1024pxMacOSPackageCreator— Copy template → write icons → substitute tokens → zipMacOSPackageController—POST /api/MacOSPackage/Create→ returns zip downloadAppSettings+appsettings.jsongetMacOSSourceCodePath/MacOSNextStepsPathProgram.csTypeScript frontend
utils/macos-validation.ts—MacOSAppPackageOptionsinterface,generateMacOSBundleId()(reverse-domain from host),validateMacOSOptions()services/publish/macos-publish.ts—generateMacOSPackage(),createMacOSPackageOptionsFromManifest()(pre-populates from manifest),emptyMacOSPackageOptions()services/publish/index.ts—'macos'added toPlatformtype;tryGenerateMacOSPackage()case added togeneratePackage()switchcomponents/macos-form.ts—<macos-form>Lit component; basic fields: Bundle ID, App Name, URL; advanced (collapsible): Image URL, Theme Color, Background Color, Permitted URLscomponents/publish-pane.ts— macOS card added to platform list (marked "Experimental");showMacOSOptions(),renderMacOSDownloadButton(),renderForm()case for"macOS";ICardDataunion types extendedutils/environment.ts—macosPackageGeneratorUrladded (/api/macospackage/create)