Skip to content

Conversation

@efremidze
Copy link
Owner

@efremidze efremidze commented Dec 29, 2025

This pull request introduces a major update (version 6.0.0) to the VisualEffectView library, focusing on adding support for iOS 26+ glass effects, a new style-based API, Swift 6 compatibility, and significant improvements to documentation and the SwiftUI interface. The update modernizes the API, clarifies usage for both UIKit and SwiftUI, and enhances the example app to demonstrate new features.

New Features and API Enhancements:

  • Added support for iOS 26+ glass effect with automatic fallback to earlier effects when unavailable.
  • Introduced a style-based API using .systemBlur, .customBlur, and .glass options, allowing for more flexible and future-proof effect selection in both UIKit and SwiftUI.
  • Updated the SwiftUI VisualEffect view to support the new style-based API and clarified that custom blur parameters only apply to .customBlur style.

Summary by CodeRabbit

  • New Features

    • Added style-based API (.systemBlur, .customBlur, .glass) and iOS 26+ glass effect with automatic fallback
    • New SwiftUI demo UI with animated background and demo cards showcasing blur/glass/customization
  • Documentation

    • Expanded README with style-based examples, SwiftUI and UIKit usage, colorTint guidance, and SPM installation instructions
  • Chores

    • Bumped library to 6.0.0, added Swift 6 support, updated project settings and minimum iOS deployment target to 18.6

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 29, 2025 02:36
@coderabbitai
Copy link

coderabbitai bot commented Dec 29, 2025

Warning

Rate limit exceeded

@efremidze has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 8 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between bf8bf07 and 99bea4b.

📒 Files selected for processing (1)
  • VisualEffectView.podspec

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Adds Version 6.0.0: introduces a style-based VisualEffect API (.systemBlur, .customBlur, .glass) with iOS 26+ glass effect and fallback, Swift/SDK bumps (Swift 6, iOS 18.6), a redesigned SwiftUI example (DemoCard, AnimatedBackground), and docs/changelog updates.

Changes

Cohort / File(s) Summary
Core API Enhancements
Sources/VisualEffectView/VisualEffectView.swift, Sources/VisualEffectView/VisualEffectView+SwiftUI.swift
New public VisualEffectStyle and GlassStyle enums, public style property with applyStyle flow, convenience initializers (init(style:), legacy paths), public blur properties (colorTint, colorTintAlpha, blurRadius, saturation, scale) applied conditionally (.customBlur). SwiftUI wrapper supports style-driven and legacy customizable blur with centralized parameter application and a public typealias export.
Example Application
Example/ContentView.swift
Full SwiftUI example redesign: scrollable layout with DemoCard (style vs custom blur), AnimatedBackground, top-level @State controls for blur/saturation/tint, and a VisualEffectStyle typealias.
Packaging & Versioning
Package.swift, VisualEffectView.podspec, VisualEffectView.xcodeproj/project.pbxproj
Bumped package/pod and project to v6.0.0, broadened Swift language versions (Swift 6 added), podspec swift_version updated to 5.9, iOS deployment target bumped to 18.6, project object/version and LastUpgradeCheck updated, added STRING_CATALOG_GENERATE_SYMBOLS setting.
Documentation & Changelog
CHANGELOG.md, README.md
Added v6.0.0 changelog entry and README sections for style-based API (systemBlur, glass, customBlur), SPM install instructions, clarified colorTintAlpha usage and App Store notes.
File Housekeeping
Sources/VisualEffectView/UIViewEffectView+Helpers.swift
Header comment renamed; no behavioral changes.
Project Schemes
VisualEffectView.xcodeproj/xcshareddata/xcschemes/...
Updated LastUpgradeVersion entries in scheme files; no functional changes to schemes.

Sequence Diagram(s)

sequenceDiagram
    participant SwiftUI as SwiftUI View
    participant VE_SwiftUI as VisualEffect (SwiftUI)
    participant VEV as VisualEffectView (UIKit)
    participant System as UIKit/System

    SwiftUI->>VE_SwiftUI: init(style: .glass(.regular)) or set style
    VE_SwiftUI->>VEV: set style property / set legacy params
    VEV->>VEV: applyStyle() or applyBlurParameters()

    alt style == .glass on iOS 26+
        VEV->>System: request UIGlassEffect
        System-->>VEV: UIGlassEffect
    else style == .glass fallback or systemBlur
        VEV->>System: create UIBlurEffect with fallback style
        System-->>VEV: UIBlurEffect
    end

    VEV->>System: attach effect to UIVisualEffectView
    System-->>SwiftUI: rendered visual effect

    rect rgb(245,250,245)
    note over VEV: preserves/reapplies custom snapshot when switching styles
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hop on a glassy, blurry hill,
Tint and shimmer, quiet thrill,
Styles anew, old settings kept,
Demo cards dance while backgrounds slept—
Version six, a soft, bright spill ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 42.86% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Added Glass Effect (v6.0.0)' directly corresponds to the primary feature introduced in this PR: iOS 26+ glass effect support with automatic fallback, along with the major version bump.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
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 introduces version 6.0.0 of the VisualEffectView library, adding support for a non-existent "iOS 26" glass effect feature, a new style-based API, and Swift 6 compatibility. However, the PR contains critical issues with version numbers and references to future iOS versions that don't exist.

Key Changes:

  • New style-based API with .systemBlur, .customBlur, and .glass options
  • Updated project to Swift 6.0 with invalid Xcode and iOS version numbers
  • Enhanced SwiftUI interface with backward-compatible legacy support

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
VisualEffectView.xcscheme Updated to invalid Xcode version 2620
Example.xcscheme Updated to invalid Xcode version 2620
project.pbxproj Updated to invalid Xcode 2620, non-existent iOS 18.6, and Swift 6.0
VisualEffectView.podspec Bumped version to 6.0.0 and Swift version to 5.9
VisualEffectView.swift Added style-based API with non-existent iOS 26 glass effect support
VisualEffectView+SwiftUI.swift Updated SwiftUI wrapper with style-based API and improved documentation
UIVisualEffectView+Helpers.swift Corrected filename in header comment
README.md Updated documentation with glass effect examples and SPM installation instructions
Package.swift Added Swift 6 language version support
ContentView.swift Completely redesigned example app with interactive demos
CHANGELOG.md Added version 6.0.0 release notes

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

Comment on lines +241 to +245
func createGlassEffect(style: GlassStyle) -> UIVisualEffect? {
// Check if UIGlassEffect exists at runtime (iOS 26+)
guard let glassEffectClass = NSClassFromString("UIGlassEffect") as? NSObject.Type else {
return nil
}
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The code attempts to load a non-existent class "UIGlassEffect" which doesn't exist in any current iOS SDK (as of iOS 18.x). This runtime check will always fail on all existing iOS versions, making this code path unreachable. This represents speculative API usage that should be removed or clearly marked as experimental placeholder code.

Copilot uses AI. Check for mistakes.
saturation: CGFloat = 1,
scale: CGFloat = 1
) {
self.style = nil // nil signals legacy mode
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The legacy initializer uses style = nil to signal legacy mode, but this creates an implicit dependency on nil-checking throughout the codebase. A more explicit design would be to always use a non-optional style property and have a dedicated enum case (which already exists as .customBlur) to represent the legacy mode. This would eliminate the need for optional checking and make the API more predictable.

Copilot uses AI. Check for mistakes.
}
}

/// Creates UIGlassEffect using runtime reflection to avoid compile-time SDK dependency
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The comment references "UIGlassEffect" and "iOS 26+", but these are non-existent APIs and versions. This comment documents speculative future API usage that doesn't currently exist. The implementation should either use actual iOS APIs or clearly document that this is experimental/placeholder code.

Copilot uses AI. Check for mistakes.
scale = 1
// Create the effect using KVC to avoid compile-time type checking
let glassEffect = glassEffectClass.init()
glassEffect.setValue(style.rawValue, forKey: "style")
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The KVC call setValue(_:forKey:) on a dynamically loaded class is used without error handling. If the "style" key doesn't exist or if the value type is incompatible, this will cause a runtime crash. Consider wrapping this in a try-catch block or adding validation to handle potential failures gracefully, especially since this involves undocumented API usage.

Suggested change
glassEffect.setValue(style.rawValue, forKey: "style")
// Validate that the object can accept a style value before using KVC
let styleSelector = NSSelectorFromString("setStyle:")
guard glassEffect.responds(to: styleSelector) else {
return nil
}
// Use NSNumber to align with Objective-C KVC expectations
let styleValue = NSNumber(value: style.rawValue)
glassEffect.setValue(styleValue, forKey: "style")

Copilot uses AI. Check for mistakes.
Comment on lines +137 to +140
private func applyBlurParameters(to view: VisualEffectView) {
// Only apply these parameters when using the custom blur pipeline
// (either explicitly via style or implicitly via legacy init)
guard style == nil || style == .customBlur else { return }
Copy link

Copilot AI Dec 29, 2025

Choose a reason for hiding this comment

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

The condition style == nil || style == .customBlur means blur parameters are applied in two different scenarios: when style is nil (legacy mode) and when style is explicitly .customBlur. However, this creates ambiguity - if a user creates a VisualEffect with the style-based initializer passing .customBlur, the blur parameters will all be their default values (0, nil, 1, 1) from the style-based initializer, which won't produce any visible effect. This design inconsistency could confuse users who expect .customBlur style to work with default blur parameters.

Copilot uses AI. Check for mistakes.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (5)
Example/ContentView.swift (3)

145-145: Address linter warning for implicit optional initialization.

Per the static analysis hint, Swift style prefers omitting the explicit = nil for optional properties since they're implicitly initialized to nil.

Proposed fix
-    var colorTint: Color? = nil
+    var colorTint: Color?

151-154: Consider using pattern matching with ~= for cleaner enum check.

The current approach is correct, but Swift offers a slightly more concise pattern.

Alternative implementation
     private var isCustomBlur: Bool {
-        if case .customBlur = style { return true }
-        return false
+        if case .customBlur = style { true } else { false }
     }

188-218: Continuous animation may impact battery life on devices.

TimelineView(.animation) renders every frame continuously. While acceptable for a demo app, consider noting this in comments or providing a way to pause the animation when the view is not visible.

Sources/VisualEffectView/VisualEffectView.swift (2)

221-222: Variable shadows parameter name style.

The local binding style in case .systemBlur(let style) shadows the function parameter style. While Swift allows this, it can reduce readability.

Proposed fix
-        case .systemBlur(let style):
-            self.effect = UIBlurEffect(style: style)
+        case .systemBlur(let blurStyle):
+            self.effect = UIBlurEffect(style: blurStyle)

Similarly for the .glass case on line 230:

-        case .glass(let style):
+        case .glass(let glassStyle):
             if #available(iOS 26.0, *) {
-                self.effect = createGlassEffect(style: style)
+                self.effect = createGlassEffect(style: glassStyle)
             } else {
-                self.effect = UIBlurEffect(style: style.fallbackBlurStyle)
+                self.effect = UIBlurEffect(style: glassStyle.fallbackBlurStyle)
             }

81-93: Consider adding colorTintAlpha to CustomSnapshot.

The CustomSnapshot struct preserves most blur properties but omits colorTintAlpha. Since colorTintAlpha is a distinct property users can modify, its value may be lost when switching styles.

Proposed enhancement
 private struct CustomSnapshot {
     var colorTint: UIColor?
+    var colorTintAlpha: CGFloat
     var blurRadius: CGFloat
     var saturation: CGFloat
     var scale: CGFloat
 }

 private var customSnapshot = CustomSnapshot(
     colorTint: nil,
+    colorTintAlpha: 0,
     blurRadius: 0,
     saturation: 1,
     scale: 1
 )

Then update the colorTintAlpha setter to store the value and reapplyCustomSnapshot to restore it.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 405baa5 and a6ed031.

📒 Files selected for processing (11)
  • CHANGELOG.md
  • Example/ContentView.swift
  • Package.swift
  • README.md
  • Sources/VisualEffectView/UIViewEffectView+Helpers.swift
  • Sources/VisualEffectView/VisualEffectView+SwiftUI.swift
  • Sources/VisualEffectView/VisualEffectView.swift
  • VisualEffectView.podspec
  • VisualEffectView.xcodeproj/project.pbxproj
  • VisualEffectView.xcodeproj/xcshareddata/xcschemes/Example.xcscheme
  • VisualEffectView.xcodeproj/xcshareddata/xcschemes/VisualEffectView.xcscheme
🧰 Additional context used
🧬 Code graph analysis (2)
Example/ContentView.swift (1)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (1)
  • value (37-39)
Sources/VisualEffectView/VisualEffectView.swift (1)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (1)
  • value (37-39)
🪛 GitHub Check: build
Example/ContentView.swift

[warning] 145-145:
Implicit Optional Initialization Violation: Optional should be implicitly initialized without nil (implicit_optional_initialization)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🔇 Additional comments (19)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (1)

2-2: Header comment rename improves naming clarity.

The change from "UIViewEffectViewiOS14.swift" to "UIVisualEffectView+Helpers.swift" better reflects the file's purpose as a helper extension and aligns with standard Swift extension naming conventions.

CHANGELOG.md (1)

3-6: LGTM!

The changelog entry clearly documents the major version changes: iOS 26+ glass effect support and the new style-based API. Format is consistent with previous entries.

VisualEffectView.xcodeproj/xcshareddata/xcschemes/Example.xcscheme (1)

3-3: LGTM!

Standard Xcode scheme version bump aligning with the project-wide Xcode upgrade.

Package.swift (1)

26-26: LGTM!

Adding Swift 6 language version support while maintaining Swift 5 compatibility is appropriate for this major release.

VisualEffectView.xcodeproj/project.pbxproj (1)

507-507: Example target uses different Swift version.

The Example target is configured with SWIFT_VERSION = 5.0 while the main VisualEffectView target uses SWIFT_VERSION = 6.0 (inherited from project settings). This is likely intentional for demo purposes but worth confirming.

VisualEffectView.xcodeproj/xcshareddata/xcschemes/VisualEffectView.xcscheme (1)

3-3: LGTM!

Standard Xcode scheme version bump, consistent with the other scheme and project file updates.

README.md (1)

10-10: Documentation looks great!

The README comprehensively covers the new style-based API, SwiftUI integration, and clearly documents App Store safety for public API styles.

Sources/VisualEffectView/VisualEffectView+SwiftUI.swift (3)

31-46: Clean dual-mode API design.

The typealias exposure and separation of style-based vs legacy blur parameters provides a clear, backward-compatible API surface.


64-109: Well-documented initializers with clear separation of concerns.

The style-based initializer and legacy blur initializer are clearly differentiated with comprehensive documentation. Using nil to signal legacy mode is a reasonable approach for backward compatibility.


137-149: No action required. VisualEffectStyle conforms to Hashable, which implicitly provides Equatable conformance. The equality comparison style == .customBlur on line 140 will compile and work correctly.

Example/ContentView.swift (3)

12-16: LGTM!

The typealias provides a convenient shorthand, and the state properties have sensible default values for the demo controls.


156-183: LGTM!

The DemoCard body correctly branches between customBlur (passing individual parameters) and other styles (using the style-based initializer), aligning with the documented API behavior that custom blur properties only apply to .customBlur.


100-117: LGTM!

The LazyVGrid with color tint examples demonstrates the custom blur functionality well. Using id: \.0 is acceptable for this static tuple array.

Sources/VisualEffectView/VisualEffectView.swift (6)

39-44: Well-designed style enum with sensible case structure.

The VisualEffectStyle enum provides a clean, future-proof API. The Sendable and Hashable conformance is appropriate for Swift 6 concurrency.


46-65: LGTM!

The GlassStyle enum with fileprivate accessors for rawValue and fallbackBlurStyle properly encapsulates implementation details while providing graceful degradation for older iOS versions.


126-129: colorTintAlpha is not preserved in customSnapshot.

Unlike colorTint, blurRadius, saturation, and scale, the colorTintAlpha setter doesn't update customSnapshot. When switching away from .customBlur and back, the alpha component of the tint will be lost if the user only modified colorTintAlpha (rather than setting a complete color with alpha via colorTint).

Consider whether this is intentional. If colorTintAlpha should also be preserved, you'd need to snapshot it separately.


190-208: Initialization paths correctly handle backward compatibility.

The convenience init() and init(effect:) logic ensures that:

  1. Default initialization uses .customBlur for backward compatibility
  2. Passing an explicit effect respects the caller's intent
  3. Interface Builder instances default to .customBlur

This is a clean approach for maintaining API compatibility.


253-259: LGTM!

The reapplyCustomSnapshot method correctly restores all snapshotted properties when switching back to .customBlur style, ensuring style changes are reversible.


35-35: Private API usage acknowledged.

The use of _UICustomBlurEffect via NSClassFromString is an existing pattern in this library. Be aware this relies on undocumented internals and could break in future iOS versions.

Comment on lines +240 to +251
/// Creates UIGlassEffect using runtime reflection to avoid compile-time SDK dependency
func createGlassEffect(style: GlassStyle) -> UIVisualEffect? {
// Check if UIGlassEffect exists at runtime (iOS 26+)
guard let glassEffectClass = NSClassFromString("UIGlassEffect") as? NSObject.Type else {
return nil
}

scale = 1
// Create the effect using KVC to avoid compile-time type checking
let glassEffect = glassEffectClass.init()
glassEffect.setValue(style.rawValue, forKey: "style")
return glassEffect as? UIVisualEffect
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

UIGlassEffect iOS API documentation KVC key

💡 Result:

The UIGlassEffect instance exposes these KVC-accessible property keys: "tintColor" and "interactive" (use "interactive" for the BOOL; the getter is isInteractive). You can set them via setValue:forKey:. Example usage is shown in Apple headers/docs. [1][2]

Sources:
[1] UIGlassEffect header (UIKit API) — shows properties tintColor and interactive.
[2] Examples / discussion showing tint/isInteractive usage.


🌐 Web query:

iOS 26 release date Apple

💡 Result:

iOS 26 was released by Apple on September 15, 2025. [1][2]

Sources:
[1] Apple Newsroom — "Apple elevates the iPhone experience with iOS 26" (June 9, 2025).
[2] 9to5Mac — "Apple announces iOS 26 release date: September 15" (Sep 9, 2025).


🌐 Web query:

UIGlassEffect introduction iOS version when available

💡 Result:

UIGlassEffect was introduced with iOS 26 — available starting iOS 26.0 (use #available(iOS 26.0, *)). [1][2]

Sources:

  • Apple Developer documentation for UIGlassEffect. [1]
  • Xcode/iOS SDK diffs showing UIGlassEffect headers added in the Xcode 26 / iOS 26 SDK. [2]

The KVC key "style" is invalid for UIGlassEffect; use "tintColor" or "interactive" instead.

The code attempts to set a "style" key that does not exist in UIGlassEffect's public API. UIGlassEffect (introduced in iOS 26) exposes only two KVC-accessible properties: "tintColor" and "interactive" (use "interactive" for the BOOL value). Using an invalid key will silently fail and the effect will not behave as intended. Replace the setValue(_:forKey:) call with a valid key, or remove it if the default behavior is acceptable.

🤖 Prompt for AI Agents
In Sources/VisualEffectView/VisualEffectView.swift around lines 240–251, the
code sets a non‑existent KVC key "style" on UIGlassEffect; replace that call
with a valid KVC property. If you intended to control interactivity, call
setValue(NSNumber(value: <Bool>), forKey: "interactive") with the appropriate
boolean derived from your GlassStyle; if you intended to control tint, call
setValue(UIColor(...), forKey: "tintColor") with an actual UIColor. Ensure
values are the correct Objective‑C bridged types (NSNumber for Bool, UIColor for
color) and keep the final return as the UIVisualEffect cast.

Comment on lines +349 to +356
IPHONEOS_DEPLOYMENT_TARGET = 18.6;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
STRING_CATALOG_GENERATE_SYMBOLS = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_VERSION = 6.0;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

find . -name "Package.swift" -type f

Repository: efremidze/VisualEffectView

Length of output: 85


🏁 Script executed:

cat -n Package.swift

Repository: efremidze/VisualEffectView

Length of output: 1259


🏁 Script executed:

# Check the relevant lines in the pbxproj around lines 349-356
sed -n '345,360p' VisualEffectView.xcodeproj/project.pbxproj

Repository: efremidze/VisualEffectView

Length of output: 627


🏁 Script executed:

# Search for IPHONEOS_DEPLOYMENT_TARGET throughout the pbxproj to understand the pattern
rg "IPHONEOS_DEPLOYMENT_TARGET" VisualEffectView.xcodeproj/project.pbxproj -B2 -A2

Repository: efremidze/VisualEffectView

Length of output: 411


🏁 Script executed:

# Check if there are any comments or documentation about iOS version requirements
rg -i "ios.*version|deployment.*target|minimum.*ios" . --type swift --type markdown -l

Repository: efremidze/VisualEffectView

Length of output: 84


🏁 Script executed:

cat -n CHANGELOG.md | head -50

Repository: efremidze/VisualEffectView

Length of output: 2791


🏁 Script executed:

# Also check the README for any iOS version information
cat README.md | grep -i "ios\|requirement\|version" -A2 -B2

Repository: efremidze/VisualEffectView

Length of output: 1011


Deployment target mismatch between Package.swift and Xcode project.

Package.swift declares .iOS(.v14) as the minimum platform, and the README states "iOS 14.0+" as a requirement, but the Xcode project sets IPHONEOS_DEPLOYMENT_TARGET = 18.6. This creates inconsistency: SPM users would expect iOS 14 support while Xcode project users would require iOS 18.6.

Align these values or clarify which is the actual minimum supported version.

🤖 Prompt for AI Agents
In VisualEffectView.xcodeproj/project.pbxproj around lines 349–356 the
IPHONEOS_DEPLOYMENT_TARGET is set to 18.6 which conflicts with Package.swift
(.iOS(.v14)) and the README (iOS 14.0+); make them consistent by choosing the
actual minimum supported iOS version and applying it across the repo: either
lower IPHONEOS_DEPLOYMENT_TARGET to 14.0 (and verify no APIs require a newer OS)
or update Package.swift and README to iOS 18.6; update the Xcode project build
settings (and any Info.plist/CI configs) accordingly and verify the project
builds for the chosen minimum.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Example/ContentView.swift (1)

5-5: Correct the copyright date.

The date "8/14/25" (August 14, 2025) is in the future relative to the PR creation date. This appears to be a typo.

🔎 Proposed fix
-//  Created by Lasha Efremidze on 8/14/25.
+//  Created by Lasha Efremidze on 12/29/25.
🧹 Nitpick comments (2)
Example/ContentView.swift (2)

12-138: LGTM! Consider adding a .systemBlur example.

The ContentView implementation is well-structured with clear sections, interactive controls, and good visual hierarchy. The custom blur examples effectively demonstrate parameter variations.

To provide a complete demonstration of the new style-based API, consider adding a section showcasing .systemBlur style examples (e.g., .systemMaterialLight, .systemMaterialDark), as the PR objectives mention three style options: .systemBlur, .customBlur, and .glass.


186-219: LGTM! Animation creates an engaging backdrop.

The AnimatedBackground implementation uses TimelineView with smooth trigonometric motion to create an engaging animated gradient backdrop that effectively demonstrates the visual effect overlays.

Note: TimelineView(.animation) updates on every frame, which is appropriate for a demo app but may impact battery life. For production use cases with complex backgrounds, consider using .periodic(from:by:) with a lower update frequency.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a6ed031 and ac6b9fa.

📒 Files selected for processing (1)
  • Example/ContentView.swift
🧰 Additional context used
🧬 Code graph analysis (1)
Example/ContentView.swift (1)
Sources/VisualEffectView/UIViewEffectView+Helpers.swift (1)
  • value (37-39)
🔇 Additional comments (1)
Example/ContentView.swift (1)

130-130: Verify glass effect API syntax and iOS 26+ availability handling in VisualEffectView library.

The code uses .glass(.regular) which differs from standard SwiftUI .glassEffect() syntax mentioned in iOS 26 documentation. Cannot verify the exact API definition, iOS version requirement for this specific style, or fallback behavior without accessing the library source. Please confirm:

  1. Whether .glass(.regular) is the correct API syntax for the library in use
  2. The actual minimum iOS version requirement for this style
  3. Whether the library automatically handles fallbacks to earlier effects, or if availability checks are required

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
README.md (1)

31-40: Clarify whether .customBlur is the default style for property-based customization.

Lines 31–40 demonstrate setting custom blur properties (colorTint, colorTintAlpha, blurRadius, scale) directly without explicitly assigning a style. However, line 84 states that these properties only work when style is .customBlur.

The documentation should explicitly clarify whether .customBlur is the default style for backward compatibility, so readers understand when property-based customization is active and how it relates to the style-based API.

🔎 Suggested improvement

Add a clarifying note after line 86:

 If you want `colorTintAlpha` to be different from `0`, make sure you always set it right after setting the `colorTint` or it may not be applied as expected. Don't set `colorTintAlpha` if `colorTint` is `nil`.

+**Note:** The property-based approach (lines 31–40) uses the `.customBlur` style by default. For explicit style control, use the style-based API shown in lines 44–53.

Also applies to: 84-86

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ac6b9fa and bf8bf07.

📒 Files selected for processing (1)
  • README.md
🔇 Additional comments (2)
README.md (2)

117-123: SPM installation version has been corrected.

The Swift Package Manager example now correctly references version 6.0.0, addressing the previous review feedback. 👍


10-10: Documentation updates align well with v6.0.0 feature set.

The README now comprehensively covers:

  • New style-based API (.systemBlur, .customBlur, .glass) for both UIKit and SwiftUI
  • iOS 26+ glass effect support with appropriate fallback guidance
  • Backward-compatible property-based customization
  • App Store safety clarification for public APIs

The dual-API approach preserves backward compatibility while guiding users to the new style-based patterns. Examples are clear and well-organized.

Also applies to: 26-72, 139-139

@efremidze efremidze merged commit d18895b into master Dec 29, 2025
3 checks passed
@efremidze efremidze deleted the glass branch December 29, 2025 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants