### Print subvariant name table from dyld shared cache Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/Docs/Internals.md Prints the subvariant name table from the shared cache. The .05 piece holds it on macOS 27.2; other builds may use another piece, and the start and end markers may move. ```sh strings -a -n 3 /System/Volumes/Preboot/Cryptexes/OS/System/Library/dyld/dyld_shared_cache_arm64e.05 | awk 'p=="unsupported" && $0=="default"{f=1} f{print} f && $0=="homeLiveActivity"{exit} {p=$0}' ``` -------------------------------- ### Apply privateGlassBackground modifier Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Apply a glass background to any view using the privateGlassBackground modifier. The example uses the .avplayer variant with .lockscreenControls subvariant and a corner radius of 20. ```swift Text("Hello, glass") .padding() .privateGlassBackground(.avplayer, subvariant: .lockscreenControls, cornerRadius: 20) ``` -------------------------------- ### Run GlassLab playground Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Clone the repository and run the GlassLab playground. Requires Swift and macOS 13+. ```sh git clone https://github.com/HoYeonPark1221/LiquidGlassEffects.git cd LiquidGlassEffects/Examples/GlassLab swift run ``` -------------------------------- ### Run GlassLab demo with swift run Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/Examples/GlassLab/README.md Runs the GlassLab demo app. Requires macOS 26 or later for the real glass effect; on macOS 14 and 15 only the blur fallback is shown. Keep the window active because glass renders flat in an inactive one. ```sh swift run ``` -------------------------------- ### Run GlassLab autopilot tour Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/Examples/GlassLab/README.md Plays a looping tour with no controls, as shown in the README. Use GLASSLAB_STOP=3 to stay on one stop, or GLASSLAB_FRAME_FILE=/tmp/frame to draw exactly the frame number written in that file for scripted screenshots. ```sh GLASSLAB_AUTOPILOT=1 swift run ``` -------------------------------- ### List GlassMaterialProvider variant cases with xcrun dyld_info Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/Docs/Internals.md Lists the variant cases in declaration order by filtering the exported symbols of the DesignLibrary framework. The numbers in GlassVariant were checked using this command. ```sh xcrun dyld_info -exports /System/Library/PrivateFrameworks/DesignLibrary.framework/DesignLibrary | grep 'GlassMaterialProviderV7VariantO.*yA2EmFWC' | sort | sed -E 's/.*VariantO[0-9]+([A-Za-z]+)yA2EmFWC.*/\1/' | nl -v 0 ``` -------------------------------- ### Use LiquidGlassBackground container Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Use the LiquidGlassBackground container view. The content is assigned to NSGlassEffectView.contentView, and the container sizes itself from that content. ```swift LiquidGlassBackground(variant: .bubbles, cornerRadius: 16) { Text("Hello, glass").padding() } ``` -------------------------------- ### Use any GlassSubvariant Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Specify any GlassSubvariant by name. Because GlassSubvariant is a name, a string literal works as well as the predefined subvariant. ```swift .privateGlassBackground(.dock, subvariant: .menu) .privateGlassBackground(.dock, subvariant: "someNameAppleAddsLater") ``` -------------------------------- ### Show GlassVariantGalleryView Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Display all 24 glass variants side by side. Use this view to judge variants over a colourful or detailed backdrop, since over a flat colour every variant looks the same. ```swift GlassVariantGalleryView() ``` -------------------------------- ### Apply private glass background with .bubbles variant Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Apply a private Liquid Glass material to a SwiftUI view. Requires macOS 13+ and Swift 5.9+. Uses the private API `privateGlassBackground(_:in:)` with the `.bubbles` variant and a `Capsule` shape. ```swift import LiquidGlassEffects Text("Hello, glass") .padding(32) .privateGlassBackground(.bubbles, in: Capsule()) ``` -------------------------------- ### Apply tinted interactive glass background Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Apply a tinted and interactive glass background. The tint parameter sets the public NSGlassEffectView.tintColor, and isInteractive sets the public effectIsInteractive property, available from macOS 27. ```swift Text("Tinted") .padding() .privateGlassBackground(.dock, in: Capsule(), tint: .blue, isInteractive: true) ``` -------------------------------- ### Dump variant and private selectors after macOS update Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/Docs/Internals.md Prints the current selectors and their type encodings. Re-run the commands above to see whether Apple added or renamed variants and subvariants. swift test (via Xcode's toolchain) round-trips all 24 variants and all 53 subvariant names through the real view and fails if a setter disappeared. ```swift #if DEBUG GlassVariantBridge.dumpVariantSelectors() // variant-related selectors GlassVariantBridge.dumpPrivateSelectors() // every private selector, with type encodings #endif ``` -------------------------------- ### Add LiquidGlassEffects package dependency Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Add the LiquidGlassEffects package to your Swift Package Manager dependencies. Requires macOS 13+; the real glass effect needs macOS 26+ and falls back to an NSVisualEffectView blur on older systems. ```swift .package(url: "https://github.com/HoYeonPark1221/LiquidGlassEffects.git", from: "0.2.0") ``` -------------------------------- ### Apply glass background to custom shape Source: https://github.com/hoyeonpark1221/liquidglasseffects/blob/main/README.md Use privateGlassBackground with a custom Shape. Rectangle, RoundedRectangle, and Capsule use the glass view's own corner radius; other shapes like Circle or custom Shapes go through the private _setPath: method. ```swift struct Star: Shape { /* ... */ } Color.clear .frame(width: 160, height: 160) .privateGlassBackground(.bubbles, in: Star()) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.