Repository navigation
Update Package.swift #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,12 +1,13 @@ | ||||||||||||||||
| // swift-tools-version:5.3 | ||||||||||||||||
| // swift-tools-version:5.9 | ||||||||||||||||
| // The swift-tools-version declares the minimum version of Swift required to build this package. | ||||||||||||||||
|
|
||||||||||||||||
| import PackageDescription | ||||||||||||||||
|
|
||||||||||||||||
| let package = Package( | ||||||||||||||||
| name: "VisualEffectView", | ||||||||||||||||
| platforms: [ | ||||||||||||||||
| .iOS(.v14) | ||||||||||||||||
| .iOS(.v14), | ||||||||||||||||
| .macOS(.v14), | ||||||||||||||||
| ], | ||||||||||||||||
| products: [ | ||||||||||||||||
| // Products define the executables and libraries produced by a package, and make them visible to other packages. | ||||||||||||||||
|
|
@@ -21,10 +22,6 @@ let package = Package( | |||||||||||||||
| targets: [ | ||||||||||||||||
| // Targets are the basic building blocks of a package. A target can define a module or a test suite. | ||||||||||||||||
| // Targets can depend on other targets in this package, and on products in packages which this package depends on. | ||||||||||||||||
| .target( | ||||||||||||||||
| name: "VisualEffectView", | ||||||||||||||||
| dependencies: [], | ||||||||||||||||
| path: "Sources" | ||||||||||||||||
| ) | ||||||||||||||||
| .target(name: "VisualEffectView") | ||||||||||||||||
| ] | ||||||||||||||||
|
Comment on lines
+25
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainTarget path removal likely breaks SPM source discovery The target declaration dropped path: "Sources". Unless the repository layout is Sources/VisualEffectView/..., SPM will not find sources by default. If your files live directly under Sources (as the Xcode project suggests), keep the explicit path. Apply this diff to restore the explicit path: - .target(name: "VisualEffectView")
+ .target(
+ name: "VisualEffectView",
+ path: "Sources"
+ )Run this script to verify the layout matches SPM expectations: 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Checking for default SPM layout (Sources/VisualEffectView)..."
if [ -d "Sources/VisualEffectView" ]; then
echo "OK: Found Sources/VisualEffectView (path override not required)."
else
echo "WARN: Sources/VisualEffectView not found."
echo "Listing Swift files directly under Sources (if any):"
fd -e swift --max-depth 1 Sources || true
echo
echo "If Swift files are directly under Sources/, keep path: \"Sources\" in Package.swift."
fiLength of output: 617 Restore explicit SPM path for VisualEffectView target (Package.swift) Verification output:
Apply this diff: - .target(name: "VisualEffectView")
+ .target(
+ name: "VisualEffectView",
+ path: "Sources"
+ )📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||
| ) | ||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -439,7 +439,7 @@ | |
| "@loader_path/Frameworks", | ||
| ); | ||
| MARKETING_VERSION = 4.1.5; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.efremidze.VisualEffectView; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.example.VisualEffectView; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Avoid placeholder bundle identifiers for the framework target Using com.example.* is a placeholder and can cause code signing/provisioning conflicts for consumers and CI. Prefer a unique reverse-DNS identifier (e.g., previous com.efremidze.*) or at least a non-placeholder domain. Apply this diff to use a unique bundle identifier: - PRODUCT_BUNDLE_IDENTIFIER = com.example.VisualEffectView;
+ PRODUCT_BUNDLE_IDENTIFIER = com.efremidze.VisualEffectView;Apply at both the Debug and Release configurations (Lines 442 and 467). Also applies to: 467-467 🤖 Prompt for AI Agents |
||
| PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| SKIP_INSTALL = YES; | ||
| SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
|
|
@@ -464,7 +464,7 @@ | |
| "@loader_path/Frameworks", | ||
| ); | ||
| MARKETING_VERSION = 4.1.5; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.efremidze.VisualEffectView; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.example.VisualEffectView; | ||
| PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| SKIP_INSTALL = YES; | ||
| }; | ||
|
|
@@ -481,7 +481,7 @@ | |
| "$(inherited)", | ||
| "@executable_path/Frameworks", | ||
| ); | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.efremidze.Example; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.example; | ||
| PRODUCT_NAME = "$(TARGET_NAME)"; | ||
|
Comment on lines
+484
to
485
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Use a unique bundle identifier for the Example app Setting the Example app to com.example can conflict with other sample apps and makes device installs brittle. Include a unique suffix (or revert to the original). Apply this diff to disambiguate the Example app’s bundle ID: - PRODUCT_BUNDLE_IDENTIFIER = com.example;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.Example;Apply for both Debug (Line 484) and Release (Line 500). Also applies to: 500-501 🤖 Prompt for AI Agents |
||
| }; | ||
| name = Debug; | ||
|
|
@@ -497,7 +497,7 @@ | |
| "$(inherited)", | ||
| "@executable_path/Frameworks", | ||
| ); | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.efremidze.Example; | ||
| PRODUCT_BUNDLE_IDENTIFIER = com.example; | ||
| PRODUCT_NAME = "$(TARGET_NAME)"; | ||
| }; | ||
| name = Release; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Adding macOS support: verify cross-platform compilation
With .macOS(.v14) added, ensure sources compile on macOS. If files import UIKit, gate code with #if canImport(UIKit) or provide AppKit counterparts (e.g., NSVisualEffectView).
Run this script to find UIKit imports and check for conditional guards:
🏁 Script executed:
Length of output: 1890
Action required — macOS target added but UIKit-only sources found
Package.swift (lines 9–11):
Short summary:
Scan shows direct
import UIKitin library/example sources and noAppKitimports or#if canImport(...)guards — macOS builds via SPM will likely fail.Files to address:
import UIKitimport UIKitimport UIKitimport UIKitimport UIKitSuggested fixes (pick one or combine):
import UIKit
// iOS-only code
#endif
Please address these so the package actually compiles on macOS.
🧰 Tools
🪛 GitHub Check: build
[warning] 10-10:
Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
🤖 Prompt for AI Agents