-
-
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
Open
alihassan143
wants to merge
6
commits into
hyodotdev:main
Choose a base branch
from
alihassan143:feat/spm-ios-macos-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9e799a1
feat(flutter_inapp_purchase): add Swift Package Manager support for i…
alihassan143 1a4618e
revert: restore macos FlutterInappPurchasePlugin.swift to original
alihassan143 9d4d97e
feat(flutter_inapp_purchase): add tvOS 15.0 platform to Package.swift
alihassan143 5c184a0
revert: remove tvOS platform, keep only iOS and macOS
alihassan143 86537dd
Merge branch 'hyodotdev:main' into feat/spm-ios-macos-support
alihassan143 aaf5b61
feat(flutter): add SPM support for iOS and macOS
alihassan143 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,26 @@ | ||
| // 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"]) | ||
| ], | ||
| dependencies: [], | ||
| dependencies: [ | ||
| .package(url: "https://github.com/hyodotdev/openiap.git", from: "2.2.1"), | ||
| ], | ||
| 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/flutter_inapp_purchase/Sources/flutter_inapp_purchase" | ||
| ) | ||
| ] | ||
| ) | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,3 +7,6 @@ | |
| build/ | ||
|
|
||
| .flutter-plugins | ||
|
|
||
| # Local env file with API keys - copy from env.example and fill in values | ||
| env | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
libraries/flutter_inapp_purchase/example/ios/Runner/AppDelegate.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #import <Flutter/Flutter.h> | ||
| #import <UIKit/UIKit.h> | ||
|
|
||
| @interface AppDelegate : FlutterAppDelegate | ||
| @interface AppDelegate : FlutterAppDelegate <FlutterImplicitEngineDelegate> | ||
|
|
||
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
libraries/flutter_inapp_purchase/ios/flutter_inapp_purchase/Package.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // swift-tools-version: 5.9 | ||
|
|
||
| import PackageDescription | ||
|
|
||
| let package = Package( | ||
| name: "flutter_inapp_purchase", | ||
| platforms: [ | ||
| .iOS("15.0"), | ||
| ], | ||
| products: [ | ||
| .library(name: "flutter-inapp-purchase", targets: ["flutter_inapp_purchase"]) | ||
| ], | ||
| dependencies: [ | ||
| .package(name: "FlutterFramework", path: "../FlutterFramework"), | ||
| .package(url: "https://github.com/hyodotdev/openiap.git", from: "2.2.1"), | ||
| ], | ||
| targets: [ | ||
| .target( | ||
| name: "flutter_inapp_purchase", | ||
| dependencies: [ | ||
| .product(name: "FlutterFramework", package: "FlutterFramework"), | ||
| .product(name: "OpenIAP", package: "openiap"), | ||
| ], | ||
| path: "Sources/flutter_inapp_purchase" | ||
| ) | ||
| ] | ||
| ) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: hyodotdev/openiap
Length of output: 4563
Root Package.swift is missing FlutterFramework dependency for sources that import Flutter/FlutterMacOS
The root
libraries/flutter_inapp_purchase/Package.swifttarget depends only onOpenIAP:…but the corresponding sources
libraries/flutter_inapp_purchase/ios/flutter_inapp_purchase/Sources/flutter_inapp_purchase/FlutterInappPurchasePlugin.swiftcontainimport FlutterMacOS/import Flutter. The platform-specific manifests inlibraries/flutter_inapp_purchase/ios/flutter_inapp_purchase/Package.swiftandlibraries/flutter_inapp_purchase/macos/flutter_inapp_purchase/Package.swiftadd the neededFlutterFrameworkdependency, while the root manifest does not.If the root manifest is no longer used, remove it to avoid divergence; otherwise add
FlutterFramework(package + product) to the root target so it can resolveFlutter/FlutterMacOS.🤖 Prompt for AI Agents