Skip to content

Commit 8877184

Browse files
authored
Merge pull request #239 from corbado/fix/passkeys-darwin-swiftpm-layout
fix(passkeys_darwin): place Package.swift at Flutter-conventional path
2 parents c08597f + 23fd8ac commit 8877184

9 files changed

Lines changed: 28 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Melos monorepo. `melos bootstrap` to set up, then `melos run <script>` (see `mel
2828
- **Web JS changes**: `melos run build-passkeys-web-javascript` (builds TS, copies bundle to example)
2929
- **Before committing**: `melos run format:check && melos run analyze`
3030
- **PR titles**: Conventional Commits, e.g. `fix(passkeys_android): fixed a bug!`
31+
- **`passkeys_darwin` dual-build**: ships both SwiftPM (`darwin/passkeys_darwin/Package.swift`) and CocoaPods (`darwin/passkeys_darwin.podspec`). When changing source layout, paths, or platform minimums, update **both** manifests and verify each path builds: `flutter config --enable-swift-package-manager` then `flutter build ios` (SwiftPM); `--no-enable-swift-package-manager` then `flutter build ios` (pods, must show `Running pod install`). Keep deployment targets aligned between the two; runtime API gating belongs in `@available`, not deployment target.
3132

3233
## Release order
3334

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SwiftPM
2+
.build/
3+
.swiftpm/
4+
Package.resolved

packages/passkeys/passkeys_darwin/darwin/passkeys_darwin.podspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
1212
s.license = { :type => 'BSD', :file => '../LICENSE' }
1313
s.author = { 'Your Company' => 'email@example.com' }
1414
s.source = { :path => '.' }
15-
s.source_files = 'Classes/**/*'
15+
s.source_files = 'passkeys_darwin/Sources/passkeys_darwin/**/*.swift'
1616

1717
# Flutter.framework does not contain a i386 slice.
1818
s.pod_target_xcconfig = {
@@ -25,6 +25,6 @@ Pod::Spec.new do |s|
2525

2626
s.ios.dependency 'Flutter'
2727
s.osx.dependency 'FlutterMacOS'
28-
s.ios.deployment_target = '9.0'
29-
s.osx.deployment_target = '13.5'
28+
s.ios.deployment_target = '13.0'
29+
s.osx.deployment_target = '10.15'
3030
end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// swift-tools-version: 5.9
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "passkeys_darwin",
6+
platforms: [
7+
.iOS("13.0"),
8+
.macOS("10.15"),
9+
],
10+
products: [
11+
.library(name: "passkeys-darwin", targets: ["passkeys_darwin"])
12+
],
13+
dependencies: [],
14+
targets: [
15+
.target(
16+
name: "passkeys_darwin",
17+
dependencies: []
18+
)
19+
]
20+
)

packages/passkeys/passkeys_darwin/darwin/Classes/AuthenticateController.swift renamed to packages/passkeys/passkeys_darwin/darwin/passkeys_darwin/Sources/passkeys_darwin/AuthenticateController.swift

File renamed without changes.

packages/passkeys/passkeys_darwin/darwin/Classes/ErrorExtension.swift renamed to packages/passkeys/passkeys_darwin/darwin/passkeys_darwin/Sources/passkeys_darwin/ErrorExtension.swift

File renamed without changes.

packages/passkeys/passkeys_darwin/darwin/Classes/PasskeysPlugin.swift renamed to packages/passkeys/passkeys_darwin/darwin/passkeys_darwin/Sources/passkeys_darwin/PasskeysPlugin.swift

File renamed without changes.

packages/passkeys/passkeys_darwin/darwin/Classes/RegisterController.swift renamed to packages/passkeys/passkeys_darwin/darwin/passkeys_darwin/Sources/passkeys_darwin/RegisterController.swift

File renamed without changes.

packages/passkeys/passkeys_darwin/darwin/Classes/messages.swift renamed to packages/passkeys/passkeys_darwin/darwin/passkeys_darwin/Sources/passkeys_darwin/messages.swift

File renamed without changes.

0 commit comments

Comments
 (0)