|
@@ -319,7 +319,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
|
|
|
//MARK: - iVersion
|
|
|
func initiVersionData() -> Void{
|
|
|
#if VERSION_DMG
|
|
|
- return;
|
|
|
+ return
|
|
|
#endif
|
|
|
let tVersion = iVersion.sharedInstance()
|
|
|
tVersion?.applicationBundleID = Bundle.main.bundleIdentifier
|
|
@@ -610,8 +610,20 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
|
|
|
}
|
|
|
|
|
|
@IBAction func volumeDiscount(_ sender: NSMenuItem) {
|
|
|
- let tStrHttpUrl = "https://www.pdfreaderpro.com/vpp-purchase-program"
|
|
|
+ var tStrHttpUrl = "https://www.pdfreaderpro.com/vpp-purchase-program"
|
|
|
+ #if VERSION_DMG
|
|
|
+ tStrHttpUrl = "https://www.pdfreaderpro.com/vpp-purchase-program?utm_source=pdfdmg&utm_campaign=menubar_vpp"
|
|
|
+ if SKInspectPublicTool.currentisLanguageHans() {
|
|
|
+ tStrHttpUrl = "https://www.pdfreaderpro.com/vpp-purchase-program?utm_source=pdfdmg&utm_campaign=menubar_vpp_zh"
|
|
|
+ }
|
|
|
+ #else
|
|
|
+ tStrHttpUrl = "https://www.pdfreaderpro.com/vpp-purchase-program?utm_source=pdfmacstore&utm_campaign=menubar_vpp"
|
|
|
+ if SKInspectPublicTool.currentisLanguageHans() {
|
|
|
+ tStrHttpUrl = "https://www.pdfreaderpro.com/vpp-purchase-program?utm_source=pdfmacstore&utm_campaign=menubar_vpp_zh"
|
|
|
+ }
|
|
|
+ #endif
|
|
|
guard let url = URL(string: tStrHttpUrl) else {
|
|
|
+ NSSound.beep()
|
|
|
return
|
|
|
}
|
|
|
let tWorkSpace = NSWorkspace.shared
|
|
@@ -621,10 +633,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
|
|
|
}
|
|
|
|
|
|
@IBAction func crossPlatformAction(_ sender: NSMenuItem) {
|
|
|
- let tStrHttpUrl = "https://www.pdfreaderpro.com/store/pdf-pro-permanent-cross-platform-package?utm_source=pdf_pro_dmgs&utm_medium=toptbr_help&utm_campaign=cross_platform"
|
|
|
-// if ([SKInspectPublicTool currentisLanguageHans]) {
|
|
|
-// tStrHttpUrl = @"https://www.pdfreaderpro.com/zh-cn/store/pdf-pro-permanent-cross-platform-package?utm_source=pdf_pro_dmg&utm_medium=toptbr_help_cn&utm_campaign=cross_platform";
|
|
|
-// }
|
|
|
+ var tStrHttpUrl = "https://www.pdfreaderpro.com/store/pdf-pro-permanent-cross-platform-package?utm_source=pdf_pro_dmgs&utm_medium=toptbr_help&utm_campaign=cross_platform"
|
|
|
+ if SKInspectPublicTool.currentisLanguageHans() {
|
|
|
+ tStrHttpUrl = "https://www.pdfreaderpro.com/zh-cn/store/pdf-pro-permanent-cross-platform-package?utm_source=pdf_pro_dmg&utm_medium=toptbr_help_cn&utm_campaign=cross_platform"
|
|
|
+ }
|
|
|
guard let url = URL(string: tStrHttpUrl) else {
|
|
|
return
|
|
|
}
|
|
@@ -632,9 +644,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
|
|
|
if tWorkSpace.open(url) == false {
|
|
|
tWorkSpace.open(url)
|
|
|
}
|
|
|
-// #if VERSION_DMG
|
|
|
-// [[FMTrackEventManager manager] trackEvent:@"Menubar" withProperties:@{@"Menubar_Btn":@"Menubar_Btn_Help_CrossPlatform"}];
|
|
|
-// #endif
|
|
|
+ #if VERSION_DMG
|
|
|
+ FMTrackEventManager.defaultManager.trackEvent(event: "Menubar", withProperties: ["Menubar_Btn" : "Menubar_Btn_Help_CrossPlatform"])
|
|
|
+ #endif
|
|
|
}
|
|
|
|
|
|
@IBAction func EducationDiscountAction(_ sender: NSMenuItem) {
|
|
@@ -646,9 +658,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
|
|
|
if tWorkSpace.open(url) == false {
|
|
|
tWorkSpace.open(url)
|
|
|
}
|
|
|
-// #if VERSION_DMG
|
|
|
-// [[FMTrackEventManager manager] trackEvent:@"Menubar" withProperties:@{@"Menubar_Btn":@"Menubar_Btn_Help_EduDiscount"}];
|
|
|
-// #endif
|
|
|
+ #if VERSION_DMG
|
|
|
+ FMTrackEventManager.defaultManager.trackEvent(event: "Menubar", withProperties: ["Menubar_Btn" : "Menubar_Btn_Help_EduDiscount"])
|
|
|
+ #endif
|
|
|
}
|
|
|
|
|
|
@IBAction func aiToolsAction(_ sender: NSMenuItem) {
|