Update folders to properly follow SPM conventions#57
Update folders to properly follow SPM conventions#57stefanomondino wants to merge 1 commit intoefremidze:masterfrom
Conversation
WalkthroughUpdates the podspec to version 5.0.7 and narrows source file glob to Sources/VisualEffectView/*.swift. The Xcode project file is upgraded and reorganized: groups rebuilt, file references regenerated, build phases updated, and a new UIViewEffectView+Helpers.swift is added to sources. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (6)
VisualEffectView.podspec (1)
18-18: Narrowed source_files path aligns with SPM layout; decide on header exposure for CocoaPodsPointing to "Sources/VisualEffectView/*.swift" is correct given the new structure. The project still ships VisualEffectView.h in the Xcode target, but the podspec excludes it. If Objective‑C consumers need that umbrella header, add it as a public header; otherwise consider removing the header to avoid confusion.
Option A — expose header:
s.source_files = "Sources/VisualEffectView/*.swift" +s.public_header_files = "Sources/VisualEffectView/VisualEffectView.h"Option B — keep Swift-only (no action), but please confirm no Obj‑C usage is intended.
VisualEffectView.xcodeproj/project.pbxproj (5)
6-6: Project format upgraded (objectVersion = 63) — document minimum XcodeobjectVersion 63 targets Xcode 15+. If you still want to support older Xcode versions for contributors, note the minimum Xcode version in the README; otherwise, all good.
50-53: Typo in filename: consider renaming “UIViewEffectView+Helpers.swift” → “UIVisualEffectView+Helpers.swift”The file extends UIVisualEffectView but is named “UIViewEffectView…”. It compiles fine, but the name is misleading and can hinder searchability and code discovery.
Proposed rename (pbxproj edits shown; also rename the file on disk under Sources/VisualEffectView):
-70C155AE2E5C70D300D5BFA9 /* UIViewEffectView+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C155A72E5C70D300D5BFA9 /* UIViewEffectView+Helpers.swift */; }; +70C155AE2E5C70D300D5BFA9 /* UIVisualEffectView+Helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C155A72E5C70D300D5BFA9 /* UIVisualEffectView+Helpers.swift */; }; -70C155A72E5C70D300D5BFA9 /* UIViewEffectView+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewEffectView+Helpers.swift"; sourceTree = "<group>"; }; +70C155A72E5C70D300D5BFA9 /* UIVisualEffectView+Helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIVisualEffectView+Helpers.swift"; sourceTree = "<group>"; }; -70C155A72E5C70D300D5BFA9 /* UIViewEffectView+Helpers.swift */, +70C155A72E5C70D300D5BFA9 /* UIVisualEffectView+Helpers.swift */,Also applies to: 84-91, 271-273
158-159: Header included in Xcode target but excluded from podspecThis is fine if Carthage/manual frameworks need the umbrella header while CocoaPods and SPM stay Swift-only. If you want consistent behavior across all managers, either: (a) add the header to the podspec as public (see podspec comment), or (b) remove the header from the target.
271-274: SwiftUI source is included — consider availability guards for broader reuseIf you ever re‑enable multi‑platforms or older OSes, guard the SwiftUI shim file to prevent compile issues outside iOS 13+:
+// In Sources/VisualEffectView/VisualEffectView+SwiftUI.swift +#if canImport(SwiftUI) +import SwiftUI +#if os(iOS) // existing contents… +#endif +#endif
424-447: Align deployment target and marketing version with podspec
- Deployment target: Podspec declares iOS 14.0, but the project inherits iOS 15.6 from the project-level settings. Explicitly set the framework target to 14.0 so Carthage/manual builds match the podspec.
- Versioning: The target’s MARKETING_VERSION is 4.1.5 while the podspec is 5.0.7. Align to avoid mixed-version artifacts.
Apply:
buildSettings = { CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 4.1.5; + MARKETING_VERSION = 5.0.7; MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++11"; PRODUCT_BUNDLE_IDENTIFIER = com.example.VisualEffectView; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; };Repeat the same two lines for the Release config block of the VisualEffectView target.
Also applies to: 449-473
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
VisualEffectView.podspec(1 hunks)VisualEffectView.xcodeproj/project.pbxproj(5 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
VisualEffectView.podspec (3)
Sources/VisualEffectView.swift (2)
blurEffect(12-89)_value(93-109)Sources/VisualEffectView+SwiftUI.swift (2)
updateUIView(38-45)colorTint(11-46)Sources/UIViewEffectView+Helpers.swift (1)
backdropView(10-30)
VisualEffectView.xcodeproj/project.pbxproj (3)
Sources/VisualEffectView.swift (1)
blurEffect(12-89)Sources/VisualEffectView+SwiftUI.swift (2)
updateUIView(38-45)colorTint(11-46)Sources/UIViewEffectView+Helpers.swift (2)
applyChanges(27-29)backdropView(10-30)
🔇 Additional comments (2)
VisualEffectView.xcodeproj/project.pbxproj (2)
10-13: New sources correctly added to build phaseThe helper, SwiftUI, and primary Swift files are wired into Sources and the header into Headers. LGTM.
84-102: Package.swift target configuration is correct
ThePackage.swiftdefines the VisualEffectView target simply with.target(name: "VisualEffectView")and does not specify a custompath. SwiftPM will default toSources/VisualEffectView, which matches the Xcode group layout. No changes needed.
|
I've merged your changes. Thank you @stefanomondino!!! |
Checklist
Motivation and Context
VisualEffectView is declared as a dependency of a third party framework our project is using.
After latest update, our app integration (made with Tuist through SPM) stopped working because of how VisualEffectView is structured in terms of folders.
As described here SPM convention states that source files should be inside a dedicated "Sources/" folder. Tuist follows this convention (check here and fails because source files are not in such folder, but in "Sources" folder (with no subfolder named as the library itself).
Description
I've moved all the files in a subfolder. I've also updated the cocoapods integration (is it still supported?) and also updated the version number.
Summary by CodeRabbit
Chores
Refactor
Notes