|
@@ -368,17 +368,72 @@ extension KMTools {
|
|
|
let versionInfoString = "\(KMTools.getRawSystemInfo()) - \(major).\(minor).\(bugFix)"
|
|
|
|
|
|
let appVersion = KMTools.getAppVersion()
|
|
|
- let appName = KMTools.getAppName()
|
|
|
+ let appName = KMTools.getAppNameForSupportEmail()
|
|
|
let subjects = "\(appName) - \(appVersion);\(NSLocalizedString("Propose a New Feature", comment: ""));\(versionInfoString)"
|
|
|
- // MARK: -
|
|
|
- // MARK TODO: 邮箱域名需要替换
|
|
|
let email = "support@pdfreaderpro.com"
|
|
|
|
|
|
- // MARK: -
|
|
|
- // MARK TODO: 邮箱域名需要替换
|
|
|
KMMailHelper.newEmail(withContacts: email, andSubjects: subjects)
|
|
|
}
|
|
|
|
|
|
+ @objc class func getAppNameForSupportEmail() -> String {
|
|
|
+ var tAppName = "PDF Reader Pro"
|
|
|
+ #if VERSION_FREE
|
|
|
+
|
|
|
+ #if VERSION_DMG
|
|
|
+
|
|
|
+ #if VERSION_BETA
|
|
|
+ tAppName = "PDF Reader Pro Beta"
|
|
|
+ #endif
|
|
|
+
|
|
|
+ // 桌机版
|
|
|
+// VerificationManager *tManager = [VerificationManager manager];
|
|
|
+// switch ([tManager status]) {
|
|
|
+// case ActivityStatusTrial:
|
|
|
+// tAppName = [tAppName stringByAppendingString:@" Trial"];
|
|
|
+// break;
|
|
|
+//
|
|
|
+// case ActivityStatusVerification:
|
|
|
+// tAppName = [tAppName stringByAppendingString:@" Verification"];
|
|
|
+// break;
|
|
|
+//
|
|
|
+// case ActivityStatusTrialExpire:
|
|
|
+// tAppName = [tAppName stringByAppendingString:@" TrialExpire"];
|
|
|
+// break;
|
|
|
+//
|
|
|
+// case ActivityStatusVerifExpire:
|
|
|
+// tAppName = [tAppName stringByAppendingString:@" VerifExpire"];
|
|
|
+// break;
|
|
|
+//
|
|
|
+// default:
|
|
|
+// break;
|
|
|
+// }
|
|
|
+ if let tManager = VerificationManager.default() {
|
|
|
+ let status = tManager.status
|
|
|
+ if status == ActivityStatus.trial {
|
|
|
+ tAppName = "\(tAppName) Trial"
|
|
|
+ } else if status == ActivityStatus.verification {
|
|
|
+ tAppName = "\(tAppName) Verification"
|
|
|
+ } else if status == ActivityStatus.trialExpired {
|
|
|
+ tAppName = "\(tAppName) TrialExpire"
|
|
|
+ } else if status == ActivityStatus.verifExpire {
|
|
|
+ tAppName = "\(tAppName) VerifExpire"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #else
|
|
|
+
|
|
|
+ // AppStore 免费版本
|
|
|
+ tAppName = "PDF Reader Pro Lite"
|
|
|
+ #endif
|
|
|
+
|
|
|
+ #else
|
|
|
+
|
|
|
+ // AppStore 付费版
|
|
|
+ tAppName = "PDF Reader Pro Edition"
|
|
|
+ #endif
|
|
|
+
|
|
|
+ return tAppName
|
|
|
+ }
|
|
|
+
|
|
|
@objc class func getRawSystemInfo() -> String {
|
|
|
let info = GBDeviceInfo.deviceInfo().rawSystemInfoString
|
|
|
if (info == nil) {
|