-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#9698Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: in_app_purchasePlugin for in-app purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
What package does this bug report belong to?
in_app_purchase
What target platforms are you seeing this bug on?
iOS
Have you already upgraded your packages?
Yes
Dependency versions
No response
Steps to reproduce
In InAppPurchasePlugin+StoreKit2.swift file:
...
var purchaseOptions: Set<Product.PurchaseOption> = []
if let appAccountToken = options?.appAccountToken,
let accountTokenUUID = UUID(uuidString: appAccountToken)
{
purchaseOptions.insert(.appAccountToken(accountTokenUUID))
}
if let quantity = options?.quantity {
purchaseOptions.insert(.quantity(Int(quantity)))
}
if #available(iOS 17.4, macOS 14.4, *) {
if let promotionalOffer = options?.promotionalOffer {
purchaseOptions.insert(
.promotionalOffer(
offerID: promotionalOffer.promotionalOfferId,
signature: promotionalOffer.promotionalOfferSignature.convertToSignature
)
)
}
}
if #available(iOS 18.0, macOS 15.0, *) {
if let winBackOfferId = options?.winBackOfferId,
let winBackOffer = product.subscription?.winBackOffers.first(where: {
$0.id == winBackOfferId
})
{
purchaseOptions.insert(.winBackOffer(winBackOffer))
}
}
let result = try await product.purchase(options: purchaseOptions)
...
The .quantity was not inserted into purchaseOptions, so I am unable to handle bulk purchase scenarios.
Expected results
Add
if let quantity = options?.quantity {
purchaseOptions.insert(.quantity(Int(quantity)))
}
to the purchase method.
On the Flutter side:
Add quantity: purchasedQuantity, to the convertFromPigeon method.
Actual results
the quantity does not work.
Code sample
Leave a comment
Screenshots or Videos
No response
Logs
No response
Flutter Doctor output
Leave a comment
Bradley-McCallion
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterp: in_app_purchasePlugin for in-app purchasePlugin for in-app purchasepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team