|
@@ -334,52 +334,52 @@ static NSString *const KMPurchaseCompareCellIdentifier = @"KMPurchaseCompa
|
|
|
//弹出 试用弹窗UI优化-新用户试用路径 新UI 情况三 点到付费功能
|
|
|
KMPurchaseFirstTrialWindowController *firstTrialWC = [KMPurchaseFirstTrialWindowController currentFirstTrialWC];
|
|
|
firstTrialWC.buttonActionBlock = ^(KMPurchaseFirstTrialWindowController * _Nonnull ftWC, KMButton * _Nonnull btn, NSString * _Nonnull email, NSString * _Nonnull name) {
|
|
|
-// if (btn.tag == 10001) {
|
|
|
-// if (ActivityStatusNone == [VerificationManager manager].status ||
|
|
|
-// ActivityStatusTrialExpire == [VerificationManager manager].status ) {
|
|
|
+ if (btn.tag == 10001) {
|
|
|
+ if (ActivityStatusNone == [VerificationManager manager].status ||
|
|
|
+ ActivityStatusTrialExpire == [VerificationManager manager].status ) {
|
|
|
// [[FMTrackEventManager manager] trackEvent:@"Tbr" withProperties:@{@"Tbr_Btn":@"Btn_Tbr_SecondTrial"}];
|
|
|
-// [[VerificationManager manager] trialForDays:7
|
|
|
-// email:email?:[VerificationManager manager].email
|
|
|
-// name:name?:[VerificationManager manager].accountName
|
|
|
-// complention:^(ActivityStatus status, NSDictionary *info, NSError *error) {
|
|
|
-// if (error ||
|
|
|
-// status != ActivityStatusTrial) {
|
|
|
-// NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Activation Error", nil)
|
|
|
-// defaultButton:NSLocalizedString(@"Try Again", nil)
|
|
|
-// alternateButton:nil
|
|
|
-// otherButton:nil
|
|
|
-// informativeTextWithFormat:NSLocalizedString(@"Failed to sign up for the free trial. Please make sure your internet connection is available and try again later.", nil), nil];
|
|
|
-// [alert runModal];
|
|
|
-// } else {
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeRepeatTrialSuccess];
|
|
|
-// [vc showWindow:nil];
|
|
|
-// }
|
|
|
-// }];
|
|
|
-// [ftWC close];
|
|
|
-// } else {
|
|
|
-// [ftWC close];
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
|
|
|
-// vc.callback = ^{
|
|
|
-// [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
|
|
|
-// };
|
|
|
-// [vc showWindow:nil];
|
|
|
-// }
|
|
|
-// } else if (btn.tag == 10002) {
|
|
|
-//#if VERSION_DMG
|
|
|
-// NSURL *url = [NSURL URLWithString:@"https://www.pdfreaderpro.com/store?utm_source=app_dmg&utm_medium=dmg_puw_free_trial"];
|
|
|
-// if([SKInspectPublicTool currentisLanguageHans]) {
|
|
|
-// url = [NSURL URLWithString:@"https://www.pdfreaderpro.com/zh-cn/store?utm_source=app_dmg&utm_medium=dmg_puw_free_trial"];
|
|
|
-// }
|
|
|
-// [[NSWorkspace sharedWorkspace] openURL:url];
|
|
|
+ [[VerificationManager manager] trialForDays:7
|
|
|
+ email:email?:[VerificationManager manager].email
|
|
|
+ name:name?:[VerificationManager manager].accountName
|
|
|
+ complention:^(ActivityStatus status, NSDictionary *info, NSError *error) {
|
|
|
+ if (error ||
|
|
|
+ status != ActivityStatusTrial) {
|
|
|
+ NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Activation Error", nil)
|
|
|
+ defaultButton:NSLocalizedString(@"Try Again", nil)
|
|
|
+ alternateButton:nil
|
|
|
+ otherButton:nil
|
|
|
+ informativeTextWithFormat:NSLocalizedString(@"Failed to sign up for the free trial. Please make sure your internet connection is available and try again later.", nil), nil];
|
|
|
+ [alert runModal];
|
|
|
+ } else {
|
|
|
+ KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeRepeatTrialSuccess];
|
|
|
+ [vc showWindow:nil];
|
|
|
+ }
|
|
|
+ }];
|
|
|
+ [ftWC close];
|
|
|
+ } else {
|
|
|
+ [ftWC close];
|
|
|
+ KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
|
|
|
+ vc.callback = ^{
|
|
|
+ [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
|
|
|
+ };
|
|
|
+ [vc showWindow:nil];
|
|
|
+ }
|
|
|
+ } else if (btn.tag == 10002) {
|
|
|
+#if VERSION_DMG
|
|
|
+ NSURL *url = [NSURL URLWithString:@"https://www.pdfreaderpro.com/store?utm_source=app_dmg&utm_medium=dmg_puw_free_trial"];
|
|
|
+ if([SKInspectPublicTool currentisLanguageHans]) {
|
|
|
+ url = [NSURL URLWithString:@"https://www.pdfreaderpro.com/zh-cn/store?utm_source=app_dmg&utm_medium=dmg_puw_free_trial"];
|
|
|
+ }
|
|
|
+ [[NSWorkspace sharedWorkspace] openURL:url];
|
|
|
// [[FMTrackEventManager manager] trackEvent:@"PUW" withProperties:@{@"PUW_Btn":@"PUW_Btn_UpgradeBuyNow"}];
|
|
|
-//#endif
|
|
|
-// } else if (btn.tag == 10003) {
|
|
|
-//#if VERSION_DMG
|
|
|
-// KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];//KMVerificationTypeActivate
|
|
|
-// [vc showWindow:nil];
|
|
|
-// [ftWC close];
|
|
|
-//#endif
|
|
|
-// }
|
|
|
+#endif
|
|
|
+ } else if (btn.tag == 10003) {
|
|
|
+#if VERSION_DMG
|
|
|
+ KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];//KMVerificationTypeActivate
|
|
|
+ [vc showWindow:nil];
|
|
|
+ [ftWC close];
|
|
|
+#endif
|
|
|
+ }
|
|
|
};
|
|
|
return firstTrialWC;
|
|
|
}
|