Skip to content

Commit

Permalink
Adding introductoryPriceNumberIOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mgonzalezc authored and Marina González committed Sep 2, 2020
1 parent 3fbf03a commit b39d6cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ios/Classes/FlutterInappPurchasePlugin.m
Expand Up @@ -312,6 +312,7 @@ -(NSDictionary *)getProductObject:(SKProduct*)product{
formatter.locale = product.priceLocale;
NSString* localizedPrice = [formatter stringFromNumber:product.price];
NSString* introductoryPrice;
NSString* introductoryPriceNumber = @"";
NSString* introductoryPricePaymentMode = @"";
NSString* introductoryPriceNumberOfPeriods = @"";
NSString* introductoryPriceSubscriptionPeriod = @"";
Expand Down Expand Up @@ -350,6 +351,7 @@ -(NSDictionary *)getProductObject:(SKProduct*)product{
//SKProductDiscount introductoryPriceObj = product.introductoryPrice;
formatter.locale = product.introductoryPrice.priceLocale;
introductoryPrice = [formatter stringFromNumber:product.introductoryPrice.price];
introductoryPriceNumber = [product.introductoryPrice.price stringValue];

switch (product.introductoryPrice.paymentMode) {
case SKProductDiscountPaymentModeFreeTrial:
Expand Down Expand Up @@ -384,6 +386,7 @@ -(NSDictionary *)getProductObject:(SKProduct*)product{

} else {
introductoryPrice = @"";
introductoryPriceNumber = @"";
introductoryPricePaymentMode = @"";
introductoryPriceNumberOfPeriods = @"";
introductoryPriceSubscriptionPeriod = @"";
Expand Down Expand Up @@ -411,6 +414,7 @@ -(NSDictionary *)getProductObject:(SKProduct*)product{
periodNumberIOS, @"subscriptionPeriodNumberIOS",
periodUnitIOS, @"subscriptionPeriodUnitIOS",
introductoryPrice, @"introductoryPrice",
introductoryPriceNumber, @"introductoryPriceNumberIOS",
introductoryPricePaymentMode, @"introductoryPricePaymentModeIOS",
introductoryPriceNumberOfPeriods, @"introductoryPriceNumberOfPeriodsIOS",
introductoryPriceSubscriptionPeriod, @"introductoryPriceSubscriptionPeriodIOS",
Expand Down
2 changes: 2 additions & 0 deletions lib/modules.dart
Expand Up @@ -24,6 +24,7 @@ class IAPItem {
/// ios only
final String subscriptionPeriodNumberIOS;
final String subscriptionPeriodUnitIOS;
final String introductoryPriceNumberIOS;
final String introductoryPricePaymentModeIOS;
final String introductoryPriceNumberOfPeriodsIOS;
final String introductoryPriceSubscriptionPeriodIOS;
Expand Down Expand Up @@ -54,6 +55,7 @@ class IAPItem {
json['introductoryPriceNumberOfPeriodsIOS'] as String,
introductoryPriceSubscriptionPeriodIOS =
json['introductoryPriceSubscriptionPeriodIOS'] as String,
introductoryPriceNumberIOS = json['introductoryPriceNumberIOS'] as String,
subscriptionPeriodNumberIOS =
json['subscriptionPeriodNumberIOS'] as String,
subscriptionPeriodUnitIOS = json['subscriptionPeriodUnitIOS'] as String,
Expand Down

0 comments on commit b39d6cb

Please sign in to comment.