|
@@ -49,7 +49,7 @@ NSString * const KMAdvancedAddDevicesAllAccessPack12Months_Pro = @"com.pdfreader
|
|
NSString * const KMAdvancedAdd2DevicesAllAccessPack12Months_Pro = @"com.pdfreaderpro.mac.advanced_add_2_devices_all_access_pack_advanced_annual.001"; // 产品名称:advanced_add_2_devices_all_access_pack_12months(多设备包订阅)
|
|
NSString * const KMAdvancedAdd2DevicesAllAccessPack12Months_Pro = @"com.pdfreaderpro.mac.advanced_add_2_devices_all_access_pack_advanced_annual.001"; // 产品名称:advanced_add_2_devices_all_access_pack_12months(多设备包订阅)
|
|
|
|
|
|
//NSString * const KMNewMonthLicenseProductIdentifier = @"com.pdftechnologies.pdfreader.mac.yearly.002.Test";
|
|
//NSString * const KMNewMonthLicenseProductIdentifier = @"com.pdftechnologies.pdfreader.mac.yearly.002.Test";
|
|
-//NSString * const KMAllLicenseProductIdentifier = @"com.pdfreaderpro.mac_free.member.all_access_pack_permanent_license.001";
|
|
|
|
|
|
+NSString * const KMAllLicenseProductIdentifier = @"com.pdfreaderpro.mac_free.member.all_access_pack_permanent_license.001";
|
|
NSString * const KMPDFToOfficeLicenseProductIdentifier = @"com.pdfreaderpro.mac.member.pdf_to_office_pack_permanent_license.001";
|
|
NSString * const KMPDFToOfficeLicenseProductIdentifier = @"com.pdfreaderpro.mac.member.pdf_to_office_pack_permanent_license.001";
|
|
NSString * const KMAILicenseProductIdentifier = @"com.pdfreaderpro.mac_free.ai_1_month_subscription";
|
|
NSString * const KMAILicenseProductIdentifier = @"com.pdfreaderpro.mac_free.ai_1_month_subscription";
|
|
NSString * const KMProAILicenseProductIdentifier = @"com.pdfreaderpro.mac.ai_1_month_subscription";
|
|
NSString * const KMProAILicenseProductIdentifier = @"com.pdfreaderpro.mac.ai_1_month_subscription";
|
|
@@ -297,6 +297,7 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
@property (nonatomic,retain) IAPProduct *allAccessPackPermanent_lite; // all_access_pack_permanent(永久)
|
|
@property (nonatomic,retain) IAPProduct *allAccessPackPermanent_lite; // all_access_pack_permanent(永久)
|
|
@property (nonatomic,retain) IAPProduct *advancedAddDevicesAllAccessPack12months_lite; // advanced_add_devices_all_access_pack_12months(订阅)
|
|
@property (nonatomic,retain) IAPProduct *advancedAddDevicesAllAccessPack12months_lite; // advanced_add_devices_all_access_pack_12months(订阅)
|
|
@property (nonatomic,retain) IAPProduct *advancedAdd2DevicesAllAccessPack12months_lite; // advanced_add_2_devices_all_access_pack_12months(订阅)
|
|
@property (nonatomic,retain) IAPProduct *advancedAdd2DevicesAllAccessPack12months_lite; // advanced_add_2_devices_all_access_pack_12months(订阅)
|
|
|
|
+@property (nonatomic,retain) IAPProduct *allAccessProduct; // 旧买断
|
|
@property (nonatomic,retain) IAPProduct *aiAllAccessPack1month_pro; // ai_all_access_pack_1month(订阅)
|
|
@property (nonatomic,retain) IAPProduct *aiAllAccessPack1month_pro; // ai_all_access_pack_1month(订阅)
|
|
@property (nonatomic,retain) IAPProduct *aiAllAccessPack12month_pro; // ai_all_access_pack_12month(订阅)
|
|
@property (nonatomic,retain) IAPProduct *aiAllAccessPack12month_pro; // ai_all_access_pack_12month(订阅)
|
|
@property (nonatomic,retain) IAPProduct *pdfToOfficePackPermanent_pro; // pdf_to_office_pack_permanent(永久转档)
|
|
@property (nonatomic,retain) IAPProduct *pdfToOfficePackPermanent_pro; // pdf_to_office_pack_permanent(永久转档)
|
|
@@ -350,6 +351,12 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
|
|
|
|
#if VERSION_FREE
|
|
#if VERSION_FREE
|
|
// 免费版
|
|
// 免费版
|
|
|
|
+ self.allAccessProduct = [[[IAPProduct alloc] init] autorelease];
|
|
|
|
+ self.allAccessProduct.productIdentifier = KMAllLicenseProductIdentifier;
|
|
|
|
+ self.allAccessProduct.priceNumber = @(79.99);
|
|
|
|
+ self.allAccessProduct.offersPriceNumber = @(59.99);
|
|
|
|
+ self.allAccessProduct.isOffers = isOffers;
|
|
|
|
+
|
|
self.fourDevicesAllAccessPackNew6Months_lite = [[[IAPProduct alloc] init] autorelease];
|
|
self.fourDevicesAllAccessPackNew6Months_lite = [[[IAPProduct alloc] init] autorelease];
|
|
self.fourDevicesAllAccessPackNew6Months_lite.productIdentifier = KM4DevicesAllAccessPackNew6Months_Free;
|
|
self.fourDevicesAllAccessPackNew6Months_lite.productIdentifier = KM4DevicesAllAccessPackNew6Months_Free;
|
|
self.fourDevicesAllAccessPackNew6Months_lite.priceNumber = @(49.99);
|
|
self.fourDevicesAllAccessPackNew6Months_lite.priceNumber = @(49.99);
|
|
@@ -426,6 +433,9 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"allAccessPackPermanent_lite.isSubscribed"]) {
|
|
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"allAccessPackPermanent_lite.isSubscribed"]) {
|
|
self.allAccessPackPermanent_lite.isSubscribed = [[[NSUserDefaults standardUserDefaults] objectForKey:@"allAccessPackPermanent_lite.isSubscribed"] boolValue];
|
|
self.allAccessPackPermanent_lite.isSubscribed = [[[NSUserDefaults standardUserDefaults] objectForKey:@"allAccessPackPermanent_lite.isSubscribed"] boolValue];
|
|
}
|
|
}
|
|
|
|
+ if ([[NSUserDefaults standardUserDefaults] objectForKey:@"allAccessProduct.isSubscribed"]) {
|
|
|
|
+ self.allAccessProduct.isSubscribed = [[[NSUserDefaults standardUserDefaults] objectForKey:@"allAccessProduct.isSubscribed"] boolValue];
|
|
|
|
+ }
|
|
|
|
|
|
self.productIdentifiers = @[KMMonthLicenseProductIdentifier_Free,
|
|
self.productIdentifiers = @[KMMonthLicenseProductIdentifier_Free,
|
|
KMNewMonthLicenseProductIdentifier_Free,
|
|
KMNewMonthLicenseProductIdentifier_Free,
|
|
@@ -437,7 +447,8 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
KMAIAllAccessPack12Month_Free,
|
|
KMAIAllAccessPack12Month_Free,
|
|
KMAdvancedAddDevicesAllAccessPack12Months_Free,
|
|
KMAdvancedAddDevicesAllAccessPack12Months_Free,
|
|
KMAdvancedAdd2DevicesAllAccessPack12Months_Free,
|
|
KMAdvancedAdd2DevicesAllAccessPack12Months_Free,
|
|
- KMAILicenseProductIdentifier];
|
|
|
|
|
|
+ KMAILicenseProductIdentifier,
|
|
|
|
+ KMAllLicenseProductIdentifier];
|
|
#else
|
|
#else
|
|
// 付费版
|
|
// 付费版
|
|
self.PDFToOfficeProduct = [[[IAPProduct alloc] init] autorelease];
|
|
self.PDFToOfficeProduct = [[[IAPProduct alloc] init] autorelease];
|
|
@@ -539,6 +550,7 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
[_standardAddDevicesAllAccessPack12months_pro release];
|
|
[_standardAddDevicesAllAccessPack12months_pro release];
|
|
[_advancedAddDevicesAllAccessPack12months_pro release];
|
|
[_advancedAddDevicesAllAccessPack12months_pro release];
|
|
[_advancedAdd2DevicesAllAccessPack12months_pro release];
|
|
[_advancedAdd2DevicesAllAccessPack12months_pro release];
|
|
|
|
+ [_allAccessProduct release];
|
|
|
|
|
|
[_allAccessPack6months_lite release];
|
|
[_allAccessPack6months_lite release];
|
|
[_allAccessPackNew6months_lite release];
|
|
[_allAccessPackNew6months_lite release];
|
|
@@ -701,7 +713,8 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
self.fourDevicesAllAccessPackNew6Months_lite.isSubscribed ||
|
|
self.fourDevicesAllAccessPackNew6Months_lite.isSubscribed ||
|
|
self.fourDevicesAllAccessPackNew12months_lite.isSubscribed ||
|
|
self.fourDevicesAllAccessPackNew12months_lite.isSubscribed ||
|
|
self.advancedAddDevicesAllAccessPack12months_lite.isSubscribed ||
|
|
self.advancedAddDevicesAllAccessPack12months_lite.isSubscribed ||
|
|
- self.advancedAdd2DevicesAllAccessPack12months_lite.isSubscribed) {
|
|
|
|
|
|
+ self.advancedAdd2DevicesAllAccessPack12months_lite.isSubscribed ||
|
|
|
|
+ self.allAccessProduct.isSubscribed) {
|
|
return YES;
|
|
return YES;
|
|
}
|
|
}
|
|
return NO;
|
|
return NO;
|
|
@@ -747,7 +760,8 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
self.fourDevicesAllAccessPackNew6Months_lite.isSubscribed ||
|
|
self.fourDevicesAllAccessPackNew6Months_lite.isSubscribed ||
|
|
self.fourDevicesAllAccessPackNew12months_lite.isSubscribed ||
|
|
self.fourDevicesAllAccessPackNew12months_lite.isSubscribed ||
|
|
self.advancedAddDevicesAllAccessPack12months_lite.isSubscribed ||
|
|
self.advancedAddDevicesAllAccessPack12months_lite.isSubscribed ||
|
|
- self.advancedAdd2DevicesAllAccessPack12months_lite.isSubscribed) {
|
|
|
|
|
|
+ self.advancedAdd2DevicesAllAccessPack12months_lite.isSubscribed ||
|
|
|
|
+ self.allAccessProduct.isSubscribed) {
|
|
return YES;
|
|
return YES;
|
|
}
|
|
}
|
|
return NO;
|
|
return NO;
|
|
@@ -787,6 +801,9 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
if (result == false) {
|
|
if (result == false) {
|
|
result = IAPProductsManager.defaultManager.advancedAdd2DevicesAllAccessPack12months_lite.isCancelAutoRenew;
|
|
result = IAPProductsManager.defaultManager.advancedAdd2DevicesAllAccessPack12months_lite.isCancelAutoRenew;
|
|
}
|
|
}
|
|
|
|
+ if (result == false) {
|
|
|
|
+ result = IAPProductsManager.defaultManager.allAccessProduct.isCancelAutoRenew;
|
|
|
|
+ }
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1018,6 +1035,11 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
self.fourDevicesAllAccessPack12months_pro.isTrialPeriod = YES;
|
|
self.fourDevicesAllAccessPack12months_pro.isTrialPeriod = YES;
|
|
}
|
|
}
|
|
self.fourDevicesAllAccessPack12months_pro.originalPurchased = YES;
|
|
self.fourDevicesAllAccessPack12months_pro.originalPurchased = YES;
|
|
|
|
+ } else if ([product_id isEqualToString:self.allAccessProduct.productIdentifier]) {
|
|
|
|
+ if (!self.allAccessProduct.isSubscribed) {
|
|
|
|
+ self.allAccessProduct.isSubscribed = quantity > 0 ? YES : NO;
|
|
|
|
+ }
|
|
|
|
+ self.allAccessProduct.originalPurchased = YES;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1174,6 +1196,11 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
self.fourDevicesAllAccessPack12months_pro.isTrialPeriod = YES;
|
|
self.fourDevicesAllAccessPack12months_pro.isTrialPeriod = YES;
|
|
}
|
|
}
|
|
self.fourDevicesAllAccessPack12months_pro.originalPurchased = YES;
|
|
self.fourDevicesAllAccessPack12months_pro.originalPurchased = YES;
|
|
|
|
+ } else if ([product_id isEqualToString:self.allAccessProduct.productIdentifier]) {
|
|
|
|
+ if (!self.allAccessProduct.isSubscribed) {
|
|
|
|
+ self.allAccessProduct.isSubscribed = quantity > 0 ? YES : NO;
|
|
|
|
+ }
|
|
|
|
+ self.allAccessProduct.originalPurchased = YES;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1215,6 +1242,8 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
self.aiAllAccessPack1month_pro.autoRenewStatus = status;
|
|
self.aiAllAccessPack1month_pro.autoRenewStatus = status;
|
|
} else if([product_id isEqualToString:self.fourDevicesAllAccessPack12months_pro.productIdentifier]) {
|
|
} else if([product_id isEqualToString:self.fourDevicesAllAccessPack12months_pro.productIdentifier]) {
|
|
self.fourDevicesAllAccessPack12months_pro.autoRenewStatus = status;
|
|
self.fourDevicesAllAccessPack12months_pro.autoRenewStatus = status;
|
|
|
|
+ } else if ([product_id isEqualToString:self.allAccessProduct.productIdentifier]) {
|
|
|
|
+ self.allAccessProduct.autoRenewStatus = status;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1223,6 +1252,7 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
[[NSUserDefaults standardUserDefaults] setObject:self.PDFToOfficeProduct.isSubscribed ? @"YES":@"NO" forKey:@"PDFToOfficeProduct.isSubscribed"];
|
|
[[NSUserDefaults standardUserDefaults] setObject:self.PDFToOfficeProduct.isSubscribed ? @"YES":@"NO" forKey:@"PDFToOfficeProduct.isSubscribed"];
|
|
[[NSUserDefaults standardUserDefaults] setObject:self.pdfToOfficePackPermanent_pro.isSubscribed ? @"YES":@"NO" forKey:@"pdfToOfficePackPermanent_pro.isSubscribed"];
|
|
[[NSUserDefaults standardUserDefaults] setObject:self.pdfToOfficePackPermanent_pro.isSubscribed ? @"YES":@"NO" forKey:@"pdfToOfficePackPermanent_pro.isSubscribed"];
|
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
|
|
|
+ [[NSUserDefaults standardUserDefaults] setObject:self.allAccessProduct.isSubscribed ? @"YES":@"NO" forKey:@"allAccessProduct.isSubscribed"];
|
|
|
|
|
|
return YES;
|
|
return YES;
|
|
}
|
|
}
|
|
@@ -1440,6 +1470,10 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
object:nil];
|
|
object:nil];
|
|
}];
|
|
}];
|
|
self.fourDevicesAllAccessPack12months_pro.isSubscribed = YES;
|
|
self.fourDevicesAllAccessPack12months_pro.isSubscribed = YES;
|
|
|
|
+ } else if ([productIdentifier isEqualToString:self.allAccessProduct.productIdentifier]) {
|
|
|
|
+ self.allAccessProduct.isSubscribed = YES;
|
|
|
|
+ [[NSUserDefaults standardUserDefaults] setObject:self.allAccessProduct.isSubscribed ? @"YES":@"NO" forKey:@"allAccessProduct.isSubscribed"];
|
|
|
|
+ [[NSUserDefaults standardUserDefaults] synchronize];
|
|
}
|
|
}
|
|
if (!self.isPurchasing) {
|
|
if (!self.isPurchasing) {
|
|
return;
|
|
return;
|
|
@@ -1522,7 +1556,9 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
if (self.allAccessPack6months_lite.isSubscribed ||
|
|
if (self.allAccessPack6months_lite.isSubscribed ||
|
|
self.allAccessPackNew6months_lite.isSubscribed || self.allAccessPack12months_lite.isSubscribed) {
|
|
self.allAccessPackNew6months_lite.isSubscribed || self.allAccessPack12months_lite.isSubscribed) {
|
|
informative = NSLocalizedString(@"Restore successfully", nil);
|
|
informative = NSLocalizedString(@"Restore successfully", nil);
|
|
- } else if (self.allAccessPackPermanent_lite.isSubscribed || self.fourDevicesAllAccessPackNew6Months_lite.isSubscribed || self.fourDevicesAllAccessPackNew12months_lite.isSubscribed || self.advancedAddDevicesAllAccessPack12months_lite.isSubscribed || self.advancedAdd2DevicesAllAccessPack12months_lite.isSubscribed) {
|
|
|
|
|
|
+ } else if (self.allAccessPackPermanent_lite.isSubscribed ||
|
|
|
|
+ self.fourDevicesAllAccessPackNew6Months_lite.isSubscribed || self.fourDevicesAllAccessPackNew12months_lite.isSubscribed || self.advancedAddDevicesAllAccessPack12months_lite.isSubscribed || self.advancedAdd2DevicesAllAccessPack12months_lite.isSubscribed ||
|
|
|
|
+ self.allAccessProduct.isSubscribed) {
|
|
informative = NSLocalizedString(@"Restore successfully. You can start using the advanced tools, including PDF to Office, PDF Watermark, Page Editor, and more.", nil);
|
|
informative = NSLocalizedString(@"Restore successfully. You can start using the advanced tools, including PDF to Office, PDF Watermark, Page Editor, and more.", nil);
|
|
} else if (self.aiAllAccessPack12month_lite.isSubscribed || self.aiAllAccessPack1month_lite.isSubscribed) {
|
|
} else if (self.aiAllAccessPack12month_lite.isSubscribed || self.aiAllAccessPack1month_lite.isSubscribed) {
|
|
informative = NSLocalizedString(@"Restore successfully", nil);
|
|
informative = NSLocalizedString(@"Restore successfully", nil);
|
|
@@ -1691,6 +1727,8 @@ NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoaded
|
|
self.aiAllAccessPack1month_pro.product = product;
|
|
self.aiAllAccessPack1month_pro.product = product;
|
|
} else if ([product.productIdentifier isEqualToString:self.fourDevicesAllAccessPack12months_pro.productIdentifier]) {
|
|
} else if ([product.productIdentifier isEqualToString:self.fourDevicesAllAccessPack12months_pro.productIdentifier]) {
|
|
self.fourDevicesAllAccessPack12months_pro.product = product;
|
|
self.fourDevicesAllAccessPack12months_pro.product = product;
|
|
|
|
+ } else if ([product.productIdentifier isEqualToString:self.allAccessProduct.productIdentifier]) {
|
|
|
|
+ self.allAccessProduct.product = product;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|