Repository navigation
- Update your Swift package to CefSwift 0.3.0 (
.upToNextMinor(from: "0.3.0")). - Rebuild your app bundle. To play system codecs, list the
systemMediaDecoderscapability socef bundleembeds the media service. Bundling guide - If you take in-process screenshots of a window (
CGWindowListCreateImage), they no longer show windowed pages: Chromium now draws those from its GPU process. Use ScreenCaptureKit on your own window instead.
Still CEF 158.0.6 with Chromium 158.0.8127.89, now on CEF API version 15800.
Behavior changes
- Chromium's message loop is the default, in Chrome's arrangement:
-[CefApplication run]runs Chromium's loop, which runsNSApp.run..externalremains as an opt-out. - Windowed pages are presented through Chromium's remote Core Animation API, as Chrome does. The GPU process uses about half the memory it did.
- V8's limit-based memory reducer is on, as in Chrome. List
V8Flag_memory_reducer_limit_basedindisabledFeaturesto undo it.
Measurements against Chrome for Testing are in design notes.
New
- Start an app:
swift package cef new <Name>(orScripts/new-app.sh) generates abrowser,apporminimalpackage, with--xcodefor an Xcode project. - Media: AAC, ALAC and Dolby audio, and H.264 and HEVC video, through VideoToolbox in a sandboxed media service. Optional
CefProtectedMedia(experimental) plays FairPlay audio for allowlisted origins. - Input:
page.send(_:)with mouse, keyboard, wheel and gesture events for every kind of page, plusclick(at:),typeText(_:),press(_:modifiers:)andscroll(at:by:). - DevTools Protocol: typed commands and events (
CefDevToolsCommand,CefDevToolsEvent) onpage.devTools. - Requests:
.rewriteResponse(_:)rewrites a response body before the page sees it. - Profiles:
clearSiteData(for:types:)deletes one site's data. - CefChromium services: zoom levels, search engines, browsing data, passwords, capture devices, protocol handlers, autofill addresses, fonts and languages, and tab lifecycle (
CefTabLifecycle). - Extensions: finds native messaging hosts installed for Google Chrome and Chromium.
- Bundling: fetches and embeds only the CEF architectures a build targets; signs framework helpers such as Sparkle's (see
Examples/SparkleUpdates). - Everything builds with the Command Line Tools alone; Xcode is optional.
Fixes
- No white bars along the edges while a window or animation resizes a windowed page.
- Windowed pages close at once; a closing page no longer crashes lifecycle updates.
Also
- Documentation site: https://rajaniraiyn.dev/CefSwift/
- Agent skills:
npx skills add Rajaniraiyn/CefSwift - License: MIT. Contributions need the CLA.
Requires macOS 14 or later and Swift 6. The examples require macOS 15 or later.