-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat(flutter_inapp_purchase): add Swift Package Manager support for iOS and macOS #161
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
base: main
Are you sure you want to change the base?
Changes from 4 commits
9e799a1
1a4618e
9d4d97e
5c184a0
86537dd
aaf5b61
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,30 +1,29 @@ | ||
| // 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: "flutter_inapp_purchase", | ||
| platforms: [ | ||
| .iOS("12.0") | ||
| .iOS("15.0"), | ||
| .macOS("14.0"), | ||
| ], | ||
| products: [ | ||
| .library(name: "flutter-inapp-purchase", targets: ["flutter_inapp_purchase"]) | ||
| .library(name: "flutter_inapp_purchase", targets: ["flutter_inapp_purchase"]), | ||
| ], | ||
| dependencies: [ | ||
| .package( | ||
| url: "https://github.com/hyodotdev/openiap.git", | ||
| exact: "2.2.1" | ||
| ), | ||
| ], | ||
| dependencies: [], | ||
| targets: [ | ||
| .target( | ||
| name: "flutter_inapp_purchase", | ||
| dependencies: [], | ||
| path: "ios/Classes", | ||
| resources: [ | ||
| .process("../Assets") | ||
| dependencies: [ | ||
| .product(name: "OpenIAP", package: "openiap"), | ||
| ], | ||
| publicHeadersPath: "", | ||
| cSettings: [ | ||
| .headerSearchPath("../Flutter"), | ||
| .headerSearchPath("../../../Flutter/Export") | ||
| ] | ||
| ) | ||
| path: "ios/Classes" | ||
| ), | ||
| ] | ||
|
Comment on lines
17
to
25
Contributor
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Locate all Package.swift manifests for this plugin and inspect their dependencies/paths.
fd -t f 'Package.swift' libraries/flutter_inapp_purchase --exec sh -c 'echo "==== {} ===="; cat "{}"'
# Confirm the target sources actually import Flutter modules.
rg -nP 'import\s+(Flutter|FlutterMacOS)|canImport\(FlutterMacOS\)' libraries/flutter_inapp_purchase/ios/flutter_inapp_purchase/Sources -C1Repository: hyodotdev/openiap Length of output: 4563 Root Package.swift is missing FlutterFramework dependency for sources that import Flutter/FlutterMacOS The root targets: [
.target(
name: "flutter_inapp_purchase",
dependencies: [
.product(name: "OpenIAP", package: "openiap"),
],
path: "ios/flutter_inapp_purchase/Sources/flutter_inapp_purchase"
)
]…but the corresponding sources If the root manifest is no longer used, remove it to avoid divergence; otherwise add 🤖 Prompt for AI Agents |
||
| ) | ||
| ) | ||
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.
The package name for the OpenIAP dependency should likely be 'OpenIAP' (matching the product name) rather than 'openiap'. Please verify the package name defined in the dependency's Package.swift.