Skip to content

feat!(iOS): support for source-based Swift package - #8578

Open
theproducer wants to merge 28 commits into
nextfrom
feature/source-spm
Open

feat!(iOS): support for source-based Swift package#8578
theproducer wants to merge 28 commits into
nextfrom
feature/source-spm

Conversation

@theproducer

Copy link
Copy Markdown
Contributor

Description

Converts Capacitor's iOS library from an Xcode-project-based, dual CocoaPods/prebuilt-XCFramework distribution model to a single source-of-truth Swift Package Manager package, while keeping the CocoaPods path fully working and unchanged for existing apps.

Change Type

  • Fix
  • Feature
  • Refactor
  • Breaking Change
  • Documentation
  • Other (CI, chores, etc.)

Rationale / Problems Fixed

Tests or Reproductions

Screenshots / Media

Platforms Affected

  • Android
  • iOS
  • Web

Notes / Comments

@theproducer theproducer changed the title feat!(iOS): supporting use as a source-based Swift package feat!(iOS): support for source-based Swift package Aug 20, 2026
@theproducer
theproducer marked this pull request as ready for review August 20, 2026 15:09
@theproducer
theproducer requested review from a team and andredestro and removed request for a team August 20, 2026 15:09
Comment thread .github/workflows/ci.yml Outdated
working-directory: ./core
test-ios:
runs-on: macos-15
runs-on: macos-26-intel

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why intel?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No reason - other than just that macos-15 was Intel. I can try with the ARM variant, it'll probably work fine.

@markemer markemer self-assigned this Aug 20, 2026
Comment thread ios/Sources/Capacitor/CAPPlugin.swift Outdated
Comment thread cli/src/util/cordova-ios.ts Outdated
self.loggingEnabled = false
}

self.localURL = URL(string: "\(descriptor.urlScheme)://\(descriptor.urlHostname)")!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The force-unwrap turns a nil URL into a launch-time crash.
But I'm not 100% sure whether it's a possible scenario.

options as NSDictionary
}

public static var jsDateFormatter: ISO8601DateFormatter {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was this change intentional? It was previously stored as a static variable, so this makes jsDateFormatter return a new instance on every access.

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.

3 participants