Skip to content

Added Swift Build Workflow#142

Merged
efremidze merged 1 commit intomasterfrom
gha/swift-build
Jul 8, 2025
Merged

Added Swift Build Workflow#142
efremidze merged 1 commit intomasterfrom
gha/swift-build

Conversation

@efremidze
Copy link
Owner

@efremidze efremidze commented Jul 8, 2025

Summary by CodeRabbit

  • Chores

    • Added automated build workflow for Swift projects on GitHub Actions.
    • Modernized Xcode project settings, including updated deployment targets, improved build options, and automatic Info.plist generation.
    • Removed explicit Info.plist files from the project and example app.
  • Refactor

    • Updated protocol syntax to use modern Swift standards.
    • Adjusted image assignment logic in the example app to use color-filled variants dynamically.
  • Bug Fixes

    • Removed unused static image properties from the example app’s image extension.
  • Style

    • Cleaned up Xcode scheme files by removing redundant and empty elements.

@efremidze efremidze requested a review from Copilot July 8, 2025 21:16
@coderabbitai
Copy link

coderabbitai bot commented Jul 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update modernizes the build configuration and workflow for a Swift project. It introduces a new GitHub Actions workflow for automated Swift package builds, removes explicit Info.plist files in favor of auto-generation, updates Xcode project settings and schemes, revises image handling in the example app, and updates a protocol declaration for Swift syntax compatibility.

Changes

File(s) Change Summary
.github/workflows/swift.yml Added a GitHub Actions workflow to automate Swift package builds for iOS using macOS runners.
Cluster.xcodeproj/project.pbxproj Updated project settings: removed Info.plist references, modernized build settings, raised deployment target, enabled new warnings.
Cluster.xcodeproj/xcshareddata/xcschemes/Cluster.xcscheme
.../Example.xcscheme
Updated scheme versions, reordered and removed redundant/empty elements in test and launch actions.
Example/Info.plist
Sources/Info.plist
Removed Info.plist files for both the Example app and main framework.
Example/Extensions.swift Removed static image properties (pin, pin2, me) from the UIImage extension.
Example/ViewController.swift Changed image assignments to use dynamically color-filled images instead of static properties.
Sources/Cluster.swift Updated protocol declaration: replaced class constraint with AnyObject for Swift compatibility.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub
    participant macOS Runner
    participant Swift Build System

    Developer->>GitHub: Push code
    GitHub->>macOS Runner: Trigger Swift Package workflow
    macOS Runner->>macOS Runner: Checkout code
    macOS Runner->>Swift Build System: Build Swift package (iOS, arm64)
    Swift Build System-->>macOS Runner: Build results
    macOS Runner-->>GitHub: Report workflow status
Loading

Poem

🐇
A hop, a skip, a build anew,
Plists gone, and workflows grew!
Images now with colors bright,
Protocols in modern light.
Xcode’s settings, crisp and clean—
The Cluster’s future, swift and keen!
🌱✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d08c955 and 02abbf5.

📒 Files selected for processing (9)
  • .github/workflows/swift.yml (1 hunks)
  • Cluster.xcodeproj/project.pbxproj (15 hunks)
  • Cluster.xcodeproj/xcshareddata/xcschemes/Cluster.xcscheme (2 hunks)
  • Cluster.xcodeproj/xcshareddata/xcschemes/Example.xcscheme (2 hunks)
  • Example/Extensions.swift (0 hunks)
  • Example/Info.plist (0 hunks)
  • Example/ViewController.swift (2 hunks)
  • Sources/Cluster.swift (1 hunks)
  • Sources/Info.plist (0 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

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 a Swift build workflow and adjusts project settings for autogenerated Info.plist files while modernizing a few code patterns.

  • Replace manual Info.plist files with Xcode’s GENERATE_INFOPLIST_FILE
  • Update image-loading calls and remove deprecated class protocol inheritance
  • Add GitHub Actions job to build the Swift package

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Sources/Info.plist Removed static Info.plist in favor of autogenerated plist settings
Sources/Cluster.swift Updated ClusterManagerDelegate to inherit from AnyObject
Example/ViewController.swift Switched image assignment to UIImage.*.filled(with:)
Example/Info.plist Deleted example app’s Info.plist
Example/Extensions.swift Removed static image properties (pin, pin2, me)
Cluster.xcodeproj/xcshareddata/xcschemes/*.xcscheme Updated LastUpgradeVersion, consolidated <MacroExpansion> blocks
Cluster.xcodeproj/project.pbxproj Bumped project versions, removed INFOPLIST_FILE entries, updated iOS target
.github/workflows/swift.yml Added a GitHub Actions workflow to swift build the package
Comments suppressed due to low confidence (6)

Example/Extensions.swift:28

  • Static image constants (pin, pin2, me) were removed but code still references them; either restore these properties or update callers to load assets explicitly.
}

Cluster.xcodeproj/project.pbxproj:456

  • [nitpick] Raising the iOS deployment target to 15.6 is a breaking change for consumers on older OS versions; confirm this aligns with your support policy.
				IPHONEOS_DEPLOYMENT_TARGET = 15.6;

.github/workflows/swift.yml:12

  • This workflow only performs a build; consider adding a swift test step to run your test suite and prevent regressions.
      run: swift build --triple arm64-apple-ios14.0 --sdk $(xcrun --sdk iphoneos --show-sdk-path)

Example/ViewController.swift:74

  • UIImage.me is undefined because the static me property was removed from the UIImage extension; consider re-adding that property or loading the image with UIImage(named:) directly.
            annotationView.image = UIImage.me.filled(with: .blue)

Example/ViewController.swift:145

  • UIImage.pin2 is undefined because the static pin2 property was removed; either restore that extension property or use UIImage(named:) to fetch the asset.
            annotationView.image = UIImage.pin2.filled(with: .green)

Example/ViewController.swift:149

  • UIImage.pin is undefined since the static pin property was removed; re-add the property or switch to UIImage(named:).
            annotationView.image = UIImage.pin.filled(with: .green)

@efremidze efremidze merged commit 9cf3f38 into master Jul 8, 2025
3 checks passed
@efremidze efremidze deleted the gha/swift-build branch July 8, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant