Browse Source

【DMG】试用事件注释代码打开

tangchao 1 year ago
parent
commit
c062cd1d4a

+ 1 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -287,7 +287,7 @@ let LOCKED_KEY  = "locked"
         NotificationCenter.default.post(name: KMInfoWindowC.windowDidBecomeMainNotification, object: self.myDocument)
         
         
-        if (self.document!.isLocked == false) {
+        if (self.document == nil || self.document!.isLocked == false) {
             self.loadFunctionGuide()
             self.loadAIIconView()
         }

+ 44 - 44
PDF Office/PDF Master/Class/Purchase/Appstore/KMPurchaseCompareWindowController.m

@@ -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;
 }

+ 1 - 1
PDF Office/PDF Master/Class/Purchase/DMG/Verification/VerificationManager/VerificationManager.h

@@ -12,7 +12,7 @@
 //#import "ASIFormDataRequest.h"
 //#import "JSONKit.h"
 
-#define kTestMode   1
+#define kTestMode   0
 
 #if kTestMode
 

+ 4 - 0
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -4796,6 +4796,8 @@
 		BBEC00E5295C4D3C00A26C98 /* KMBatesPageInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEC00E4295C4D3C00A26C98 /* KMBatesPageInfoView.swift */; };
 		BBEC00E6295C4D3C00A26C98 /* KMBatesPageInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEC00E4295C4D3C00A26C98 /* KMBatesPageInfoView.swift */; };
 		BBEC00E7295C4D3C00A26C98 /* KMBatesPageInfoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEC00E4295C4D3C00A26C98 /* KMBatesPageInfoView.swift */; };
+		BBEDC2232B980A8300970C54 /* KMOutlineEditViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 89DB5DA8291B8DE70029624F /* KMOutlineEditViewController.xib */; };
+		BBEDC2242B980A8400970C54 /* KMOutlineEditViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 89DB5DA8291B8DE70029624F /* KMOutlineEditViewController.xib */; };
 		BBEF0F9A2B84A4C200A3E102 /* KMBrowserWindowController+Actions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEF0F992B84A4C200A3E102 /* KMBrowserWindowController+Actions.swift */; };
 		BBEF0F9B2B84A4C200A3E102 /* KMBrowserWindowController+Actions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEF0F992B84A4C200A3E102 /* KMBrowserWindowController+Actions.swift */; };
 		BBEF0F9C2B84A4C200A3E102 /* KMBrowserWindowController+Actions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBEF0F992B84A4C200A3E102 /* KMBrowserWindowController+Actions.swift */; };
@@ -14343,6 +14345,7 @@
 				8997010A28F4082C009AF911 /* KMFromViewController.xib in Resources */,
 				AD7D5CE02B957693006562CD /* KMBookmarkOutlineFileCellView.xib in Resources */,
 				894A00F62976314C0070ED83 /* KMPDFViewPanelSetViewController.xib in Resources */,
+				BBEDC2232B980A8300970C54 /* KMOutlineEditViewController.xib in Resources */,
 				BBD9223B2B50D6D600DB9585 /* rate_pic_pro.pdf in Resources */,
 				9F02016E2A1B088700C9B673 /* KMAIOpenPDFFilesVC.xib in Resources */,
 				AD3AAD282B0B6FB100DE5FE7 /* KMCompareContentView.xib in Resources */,
@@ -14891,6 +14894,7 @@
 				AD58F41C2B1DAC1500299EE0 /* KMPrintSettingView.xib in Resources */,
 				BB1EC8032967B26700EC0BC3 /* KMPDFEditViewController.xib in Resources */,
 				ADDF83852B391A5D00A81A4E /* DSignatureSaveTypeViewController.xib in Resources */,
+				BBEDC2242B980A8400970C54 /* KMOutlineEditViewController.xib in Resources */,
 				BBD8EE9B2B8EC86A00EB05FE /* AutoSaveFileItem.xib in Resources */,
 				BBD1F781296F9BE000343885 /* KMPageEditSettingBaseWindowController.xib in Resources */,
 				BB5DF1EE2959C5CB0025CDA1 /* KMHeaderFooterPreviewController.xib in Resources */,

+ 64 - 0
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -595,5 +595,69 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "1911ECC8-12F2-4E19-AAD6-2523DEF67E9A"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/Purchase/DMG/KMPurchaseCompareDMGWindowController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "561"
+            endingLineNumber = "561"
+            landmarkName = "-enterLicenseAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "80B40888-4B5F-4443-875D-C70B50A5155F"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/Purchase/DMG/KMPurchaseCompareDMGWindowController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "587"
+            endingLineNumber = "587"
+            landmarkName = "-buttonItemClicked_License:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "29C99CD0-2D39-4392-A3DD-1C9CF1A02857"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/Purchase/DMG/KMPurchaseCompareDMGWindowController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "572"
+            endingLineNumber = "572"
+            landmarkName = "-buttonItemClicked_Buy:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8D0F00DF-24EC-4ED1-B41F-8D21D09756B2"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "381"
+            endingLineNumber = "381"
+            landmarkName = "-buttonAction:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>