KMProductModel.swift 56 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  1. //
  2. // KMProductModel.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by wanjun on 2024/11/6.
  6. //
  7. import Foundation
  8. import Combine
  9. #if !VERSION_DMG
  10. import StoreKit
  11. #endif
  12. @objc enum KMCompareTableType : Int {
  13. case trial = 0 // 试用比较表
  14. case dmg_Base // DMG 购买比较表
  15. case dmg_Upgrades1 // DMG 升级比较表 39.99
  16. case dmg_Upgrades2 // DMG 升级比较表 49.99
  17. case lite_Base // Lite 基础版
  18. case lite_MacWindows // Lite Mac&Windows双平台高级版永久
  19. case pro_Base // Pro 基础版
  20. case pro_Advanced // Pro Mac单平台高级版永久
  21. }
  22. @objc enum KMCompareProductType : Int {
  23. case free = 0 // 免费
  24. case freeTrial // 试用
  25. case allPlatformStandard // 全平台标准版年订阅
  26. case dualPlatformAdvanced // Mac&Windows双平台高级版永久
  27. case allPlatformAdvanced_6 // 全平台高级版6个月订阅
  28. case allPlatformAdvanced_12 // 全平台高级版12个月订阅
  29. case macPlatformAdvanced // MAC单平台高级版永久
  30. }
  31. @objc enum KMPurchasedProductType : Int {
  32. case fourDevicesAllAccessPackNew6months_lite = 0 // 4_devices_all_access_pack_new_6months(订阅)
  33. case fourDevicesAllAccessPackNew12months_lite // 4_devices_all_access_pack_12months(订阅)
  34. // case allAccessPackNew6months_lite // all_access_pack_new_6months(订阅)
  35. // case allAccessPack12months_lite // all_access_pack_12months(订阅)
  36. // case allAccessPack6months_lite // all_access_pack_6months(订阅)
  37. case aiAllAccessPack1month_lite // ai_all_access_pack_1month(订阅)
  38. case aiAllAccessPack12month_lite // ai_all_access_pack_12month(订阅)
  39. case allAccessPackPermanent_lite // all_access_pack_permanent(永久)
  40. case advancedAddDevicesAllAccessPack12months_lite // advanced_add_devices_all_access_pack_12months(订阅)
  41. case advancedAdd2DevicesAllAccessPack12months_lite // advanced_add_2_devices_all_access_pack_12months(订阅)
  42. case aiAllAccessPack1month_pro // ai_all_access_pack_1month(订阅)
  43. case aiAllAccessPack12month_pro // ai_all_access_pack_1month(订阅)
  44. case pdfToOfficePackPermanent_pro // pdf_to_office_pack_permanent(永久)
  45. case fourDevicesAllAccessPack12months_pro // 4_devices_all_access_pack_12months(全平台高级年订阅)
  46. case standardAddDevicesAllAccessPack12months_pro // standard_add_devices_all_access_pack_12months(订阅)
  47. case advancedAddDevicesAllAccessPack12months_pro // advanced_add_devices_all_access_pack_12months(订阅)
  48. case advancedAdd2DevicesAllAccessPack12months_pro // advanced_add_2_devices_all_access_pack_12months(订阅)
  49. case pdfReaderProStandard_dmg // 全平台标准版年订阅
  50. case pdfReaderProAdvanced_dmg // 全平台高级版年订阅
  51. case pdfReaderProPermanent_dmg // Mac&Windows双平台高级版永久
  52. case pdfReaderProAIAnnual_dmg // AI 年订阅
  53. case pdfReaderProAIMonthly_dmg // AI 月订阅
  54. case pdfToOffice_dmg // 转档包 永久
  55. case add2Device_dmg // 多设备全平台
  56. case add3Device_dmg // 单平台升级高级版
  57. }
  58. typealias AppstorePurchaseComplete = (_ success: Bool,_ msg: String) -> Void
  59. @objcMembers
  60. class KMProductModel: ObservableObject {
  61. static let shared = KMProductModel()
  62. /**
  63. 比较表类型
  64. */
  65. @Published var state: KMCompareTableType = .trial
  66. /**
  67. 高级版半年 或 年订阅,true为年订阅,false为半年订阅,默认true为年订阅
  68. */
  69. @Published var isPurchaseSwitch: Bool = true
  70. // MARK: DMG Public Property
  71. /**
  72. DMG 版本所有已经上架产品记录(暂时无教育优惠)
  73. */
  74. var dmgProductDatas: KMMemberProductResult?
  75. /**
  76. DMG 版本 已经登录用户 最后一次价格获取
  77. */
  78. var dmgLastGetProductPriceInfos: KMMemberProductResult?
  79. /**
  80. DMG 版本 已经登录用户 最后一次批量价格获取
  81. */
  82. var dmgLastGetBatchProductPriceInfos: KMMemberProductResult?
  83. /**
  84. DMG 版本 已经登录用户 最后一次验证商品优惠券价格获取
  85. */
  86. var dmgLastCheckCouponProductPriceInfos: KMMemberProductResult?
  87. /**
  88. DMG 版本 已经登录用户 最后一次创建的买断订单返回信息
  89. */
  90. var dmgLastCreatOrderProductInfos: KMMemberProductResult?
  91. /**
  92. DMG 版本 已经登录用户 最后一次创建的买断订单返回信息
  93. */
  94. var dmgLastCreatSubscriberProductInfos: KMMemberProductResult?
  95. // MARK: DMG Public Method
  96. func checkConnectionAvailable() -> Void {
  97. if KMMemberCenterManager.manager.isConnectionAvailable() == false {
  98. let alert = NSAlert()
  99. alert.alertStyle = .critical
  100. alert.messageText = NSLocalizedString("Error Information", comment: "")
  101. alert.informativeText = NSLocalizedString("Please make sure your internet connection is available.", comment: "")
  102. alert.addButton(withTitle: NSLocalizedString("OK", comment: ""))
  103. alert.runModal()
  104. return
  105. }
  106. }
  107. /**
  108. @abstract 获取DMG服务器架上所有商品 (得到的价格是原始价格)
  109. @param
  110. */
  111. func getDMGProductDatas( _ complete: @escaping KMMemberProductComplete) -> Void {
  112. checkConnectionAvailable()
  113. KMMemberCenterManager.manager.getListingProducts(isEducation: 0) { [weak self] success, result in
  114. guard let productsArrays : KMMemberProductResult = result else { return }
  115. self?.dmgProductDatas = productsArrays
  116. complete(success, result)
  117. }
  118. if KMMemberInfo.shared.isLogin {
  119. // getDMGProductPriceInfosForMember(productId: "SP2024102300004", isEducation: 0) { [weak self] success, result in
  120. //
  121. //
  122. // }
  123. // getDMGBatchProductPriceInfosForMember(productId: "SP2024102300004", num: 10) { [weak self] success, result in
  124. //
  125. //
  126. // }
  127. // getDMGProductListInfosForMember(orderStatus: 0) { [weak self] success, result in
  128. //
  129. // }
  130. //创建买断订单
  131. // creatOrder(productId: "SP2024102300004", paymentMethod: 0, price: "119.99", discountFlag: 0, couponCode: "", num: 1) { [weak self] success, result in
  132. //
  133. // }
  134. //创建订阅订单(创建买断订单后会报错已经是购买用户,不能重复购买)
  135. // createSubscriber(productId: "SP2024102300003", paymentMethod: 0, price: "99.99", discountFlag: 0, couponCode: "", num: 1) { [weak self] success, result in
  136. //
  137. // }
  138. // getDMGProductOrderIdInfosForMember(orderId: "94b10d5f1ca193948e005503bff0df11") { [weak self] success, result in
  139. //
  140. // }
  141. }
  142. }
  143. /**
  144. @abstract 获取DMG产品价格(美元)
  145. */
  146. func getDMGPrice(productCode: String) -> String {
  147. guard let productModels = dmgProductDatas?.listingProducts else { return "" }
  148. for model in productModels {
  149. if model.code == "productCode" {
  150. return model.price.stringValue
  151. }
  152. }
  153. return ""
  154. }
  155. /**
  156. @abstract 获取DMG产品价格(人民币)
  157. */
  158. func getDMGCNYPrice(productCode: String) -> String {
  159. guard let productModels = dmgProductDatas?.listingProducts else { return "" }
  160. for model in productModels {
  161. if model.code == "productCode" {
  162. return model.cnyPrice.stringValue
  163. }
  164. }
  165. return ""
  166. }
  167. /**
  168. @abstract 获取DMG产品折扣价格(美元)
  169. */
  170. func getDMGDisplayPrice(productCode: String) -> String {
  171. guard let productModels = dmgProductDatas?.listingProducts else { return "" }
  172. for model in productModels {
  173. if model.code == "productCode" {
  174. return model.displayPrice.stringValue
  175. }
  176. }
  177. return ""
  178. }
  179. /**
  180. @abstract 获取DMG产品折扣价格(人民币)
  181. */
  182. func getDMGDisplayCNYPrice(productCode: String) -> String {
  183. guard let productModels = dmgProductDatas?.listingProducts else { return "" }
  184. for model in productModels {
  185. if model.code == "productCode" {
  186. return model.displayCnyPrice.stringValue
  187. }
  188. }
  189. return ""
  190. }
  191. /**
  192. @abstract 获取登录用户价格(建立订单时需要用到)
  193. @param productId 购买的产品id
  194. @param isEducation 是否教育优惠
  195. @param complete 回调
  196. */
  197. func getDMGProductPriceInfosForMember(productId: String, isEducation: Int, _ complete: @escaping KMMemberProductComplete) {
  198. checkConnectionAvailable()
  199. //暂时无教育优惠,先固定传 0
  200. KMMemberCenterManager.manager.getProductPriceForBuy(productId: productId, isEducation: 0, userId:KMMemberInfo.shared.userID) { [weak self] success, result in
  201. if success {
  202. guard let productsArrays : KMMemberProductResult = result else {
  203. complete(false, result)
  204. return
  205. }
  206. self?.dmgLastGetProductPriceInfos = productsArrays
  207. complete(true, productsArrays)
  208. } else {
  209. complete(false, result)
  210. }
  211. }
  212. }
  213. /**
  214. @abstract 获取批量阶段购买价格(建立订单时需要用到)
  215. @param productId 购买的产品id
  216. @param num 批量个数
  217. @param complete 回调
  218. */
  219. func getDMGBatchProductPriceInfosForMember(productId: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
  220. checkConnectionAvailable()
  221. KMMemberCenterManager.manager.getBatchProductPrice(productId: productId, num: num) { [weak self] success, result in
  222. if success {
  223. guard let productsArrays : KMMemberProductResult = result else {
  224. complete(false, result)
  225. return
  226. }
  227. self?.dmgLastGetBatchProductPriceInfos = productsArrays
  228. complete(true, productsArrays)
  229. } else {
  230. complete(false, result)
  231. }
  232. }
  233. }
  234. /**
  235. @abstract 验证商品优惠券(建立订单时需要用到)
  236. @param productId 购买的产品id
  237. @param code 优惠券
  238. @param complete 回调
  239. */
  240. func getDMGCheckCouponProductPriceInfosForMember(productId: String, code: String, _ complete: @escaping KMMemberProductComplete) {
  241. checkConnectionAvailable()
  242. KMMemberCenterManager.manager.checkCoupon(productId: productId, userId: KMMemberInfo.shared.userID, code: code) { [weak self] success, result in
  243. if success {
  244. guard let productsArrays : KMMemberProductResult = result else {
  245. complete(false, result)
  246. return
  247. }
  248. self?.dmgLastCheckCouponProductPriceInfos = productsArrays
  249. complete(true, productsArrays)
  250. } else {
  251. complete(false, result)
  252. }
  253. }
  254. }
  255. /**
  256. @abstract 获取订单列表
  257. @param orderStatus 0全部1待支付
  258. @param complete 回调
  259. */
  260. func getDMGProductListInfosForMember(orderStatus: Int, _ complete: @escaping KMMemberRequestInfoComplete) {
  261. checkConnectionAvailable()
  262. KMMemberCenterManager.manager.getOrderListByStatus(orderStatus: orderStatus) { [weak self] success, result in
  263. if success {
  264. guard let productsInfos : NSDictionary = result else {
  265. complete(false, result)
  266. return
  267. }
  268. complete(true, productsInfos)
  269. } else {
  270. complete(false, result)
  271. }
  272. }
  273. }
  274. /**
  275. @abstract 创建订单(买断)
  276. @param productId 产品id
  277. @param paymentMethod 支付方式 PAYPAL(0),ALIPAY(1),WXPAY(2),PADDLE(3)
  278. @param price 价格
  279. @param discountFlag 0原价,1优惠券,2升级,3教育优惠,4批量购买,5黑五折扣
  280. @param couponCode 优惠卷
  281. @param num 批量购买数量
  282. @param complete 回调
  283. */
  284. func creatOrder(productId: String, paymentMethod: Int, price: String, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
  285. checkConnectionAvailable()
  286. KMMemberCenterManager.manager.createOrder(productId: productId, paymentMethod: paymentMethod, price: price, discountFlag: discountFlag, couponCode: couponCode, num: num) { [weak self] success, result in
  287. if success {
  288. guard let productsArrays : KMMemberProductResult = result else {
  289. complete(false, result)
  290. return
  291. }
  292. self?.dmgLastCreatOrderProductInfos = productsArrays
  293. complete(true, productsArrays)
  294. } else {
  295. complete(false, result)
  296. }
  297. }
  298. }
  299. /**
  300. @abstract 创建订单(订阅)
  301. @param productId 产品id
  302. @param paymentMethod 支付方式 PAYPAL(0),ALIPAY(1),WXPAY(2),PADDLE(3)
  303. @param price 价格
  304. @param discountFlag 0原价,1优惠券,2升级,3教育优惠,4批量购买,5黑五折扣
  305. @param couponCode 优惠卷
  306. @param num 批量购买数量
  307. @param complete 回调
  308. */
  309. func createSubscriber(productId: String, paymentMethod: Int, price: String, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
  310. checkConnectionAvailable()
  311. KMMemberCenterManager.manager.createSubscriber(productId: productId, paymentMethod: paymentMethod, price: price, discountFlag: discountFlag, couponCode: couponCode, num: num) { [weak self] success, result in
  312. if success {
  313. guard let productsArrays : KMMemberProductResult = result else {
  314. complete(false, result)
  315. return
  316. }
  317. self?.dmgLastCreatSubscriberProductInfos = productsArrays
  318. complete(true, productsArrays)
  319. } else {
  320. complete(false, result)
  321. }
  322. }
  323. }
  324. /**
  325. @abstract 支付后查询订单状态
  326. @param productId 购买的产品id
  327. @param complete 回调
  328. */
  329. func getDMGProductOrderIdInfosForMember(orderId: String, _ complete: @escaping KMMemberRequestInfoComplete) {
  330. checkConnectionAvailable()
  331. KMMemberCenterManager.manager.getStateByOrderId(orderId: orderId) { [weak self] success, result in
  332. if success {
  333. guard let productsInfos : NSDictionary = result else {
  334. complete(false, result)
  335. return
  336. }
  337. complete(true, productsInfos)
  338. } else {
  339. complete(false, result)
  340. }
  341. }
  342. }
  343. // MARK: Public Method
  344. /**
  345. @abstract 根据当前权益获取比较表类型
  346. @param
  347. */
  348. func getCurrentComparisonTableType() -> Void {
  349. let userScenarioType = KMMemberInfo.shared.userScenarioType
  350. let platforms = KMMemberInfo.shared.vip_platforms
  351. let platformsArray = platforms
  352. .components(separatedBy: ",")
  353. .map { $0.trimmingCharacters(in: .whitespaces) }
  354. if userScenarioType == .lite_type1 ||
  355. userScenarioType == .lite_type3 ||
  356. userScenarioType == .lite_type11 ||
  357. userScenarioType == .lite_type4 ||
  358. userScenarioType == .lite_type5 ||
  359. userScenarioType == .lite_type9 ||
  360. userScenarioType == .lite_type13 ||
  361. userScenarioType == .lite_type7 ||
  362. userScenarioType == .lite_type8 {
  363. if userScenarioType == .lite_type1 {
  364. state = .trial
  365. } else if userScenarioType == .lite_type3 || userScenarioType == .lite_type11 {
  366. state = .lite_Base
  367. } else if userScenarioType == .lite_type4 || userScenarioType == .lite_type5 || userScenarioType == .lite_type9 || userScenarioType == .lite_type13 {
  368. state = .lite_MacWindows
  369. } else if userScenarioType == .lite_type7 || userScenarioType == .lite_type8 {
  370. if KMMemberInfo.shared.vip_paymentModel == "1" && KMMemberInfo.shared.vip_cycle == 4 && platformsArray.count == 4 {
  371. state = .lite_MacWindows
  372. } else {
  373. state = .lite_Base
  374. }
  375. }
  376. } else if userScenarioType == .pro_type1 ||
  377. userScenarioType == .pro_type3 ||
  378. userScenarioType == .pro_type4 {
  379. if userScenarioType == .pro_type1 ||
  380. userScenarioType == .pro_type4 {
  381. state = .pro_Advanced
  382. } else if userScenarioType == .pro_type3 {
  383. state = .pro_Base
  384. }
  385. }
  386. }
  387. /**
  388. 对应商品价格
  389. */
  390. func getProductPrice(_ type: KMPurchasedProductType) -> String {
  391. if type == .fourDevicesAllAccessPackNew6months_lite {
  392. if let product = IAPProductsManager.default().fourDevicesAllAccessPackNew6Months_lite, product.isOffers {
  393. return product.offersPrice()
  394. } else {
  395. return IAPProductsManager.default().fourDevicesAllAccessPackNew6Months_lite.price()
  396. }
  397. } else if type == .fourDevicesAllAccessPackNew12months_lite {
  398. if let product = IAPProductsManager.default().fourDevicesAllAccessPackNew12months_lite, product.isOffers {
  399. return product.offersPrice()
  400. } else {
  401. return IAPProductsManager.default().fourDevicesAllAccessPackNew12months_lite.price()
  402. }
  403. } else if type == .aiAllAccessPack1month_lite {
  404. if let product = IAPProductsManager.default().aiAllAccessPack1month_lite, product.isOffers {
  405. return product.offersPrice()
  406. } else {
  407. return IAPProductsManager.default().aiAllAccessPack1month_lite.price()
  408. }
  409. } else if type == .aiAllAccessPack12month_lite {
  410. if let product = IAPProductsManager.default().aiAllAccessPack12month_lite, product.isOffers {
  411. return product.offersPrice()
  412. } else {
  413. return IAPProductsManager.default().aiAllAccessPack12month_lite.price()
  414. }
  415. } else if type == .allAccessPackPermanent_lite {
  416. if let product = IAPProductsManager.default().allAccessPackPermanent_lite, product.isOffers {
  417. return product.offersPrice()
  418. } else {
  419. return IAPProductsManager.default().allAccessPackPermanent_lite.price()
  420. }
  421. } else if type == .advancedAddDevicesAllAccessPack12months_lite {
  422. if let product = IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_lite, product.isOffers {
  423. return product.offersPrice()
  424. } else {
  425. return IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_lite.price()
  426. }
  427. } else if type == .advancedAdd2DevicesAllAccessPack12months_lite {
  428. if let product = IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_lite, product.isOffers {
  429. return product.offersPrice()
  430. } else {
  431. return IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_lite.price()
  432. }
  433. } else if type == .aiAllAccessPack1month_pro {
  434. if let product = IAPProductsManager.default().aiAllAccessPack1month_pro, product.isOffers {
  435. return product.offersPrice()
  436. } else {
  437. return IAPProductsManager.default().aiAllAccessPack1month_pro.price()
  438. }
  439. } else if type == .aiAllAccessPack12month_pro {
  440. if let product = IAPProductsManager.default().aiAllAccessPack12month_pro, product.isOffers {
  441. return product.offersPrice()
  442. } else {
  443. return IAPProductsManager.default().aiAllAccessPack12month_pro.price()
  444. }
  445. } else if type == .pdfToOfficePackPermanent_pro {
  446. if let product = IAPProductsManager.default().pdfToOfficePackPermanent_pro, product.isOffers {
  447. return product.offersPrice()
  448. } else {
  449. return IAPProductsManager.default().pdfToOfficePackPermanent_pro.price()
  450. }
  451. } else if type == .fourDevicesAllAccessPack12months_pro {
  452. if let product = IAPProductsManager.default().fourDevicesAllAccessPack12months_pro, product.isOffers {
  453. return product.offersPrice()
  454. } else {
  455. return IAPProductsManager.default().fourDevicesAllAccessPack12months_pro.price()
  456. }
  457. } else if type == .standardAddDevicesAllAccessPack12months_pro {
  458. if let product = IAPProductsManager.default().standardAddDevicesAllAccessPack12months_pro, product.isOffers {
  459. return product.offersPrice()
  460. } else {
  461. return IAPProductsManager.default().standardAddDevicesAllAccessPack12months_pro.price()
  462. }
  463. } else if type == .advancedAddDevicesAllAccessPack12months_pro {
  464. if let product = IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_pro, product.isOffers {
  465. return product.offersPrice()
  466. } else {
  467. return IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_pro.price()
  468. }
  469. } else if type == .advancedAdd2DevicesAllAccessPack12months_pro {
  470. if let product = IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_pro, product.isOffers {
  471. return product.offersPrice()
  472. } else {
  473. return IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_pro.price()
  474. }
  475. } else if type == .pdfReaderProStandard_dmg {
  476. return getDMGPrice(productCode: "PDF Reader Pro Standard - Annual Plan")
  477. } else if type == .pdfReaderProAdvanced_dmg {
  478. return getDMGPrice(productCode: "PDF Reader Pro Advanced - Annual Plan")
  479. } else if type == .pdfReaderProPermanent_dmg {
  480. return getDMGPrice(productCode: "PDF Reader Pro Permanent")
  481. } else if type == .pdfReaderProAIAnnual_dmg {
  482. return getDMGPrice(productCode: "PDF Reader Pro AI - Annual Plan")
  483. } else if type == .pdfReaderProAIMonthly_dmg {
  484. return getDMGPrice(productCode: "PDF Reader Pro AI - Monthly Plan")
  485. } else if type == .pdfToOffice_dmg {
  486. return getDMGPrice(productCode: "PDF to Office")
  487. } else if type == .add2Device_dmg {
  488. return getDMGPrice(productCode: "Add 2-Device · Advanced Annual")
  489. } else if type == .add3Device_dmg {
  490. return getDMGPrice(productCode: "Add 3-Device · Advanced Annual")
  491. }
  492. return ""
  493. }
  494. func appstorePurchaseAction(_ tag: Int, _ complete: @escaping AppstorePurchaseComplete) -> Void {
  495. if state == .dmg_Base {
  496. var code = ""
  497. if tag == 1 {
  498. code = "PDF Reader Pro Standard - Annual Plan"
  499. } else if tag == 3 {
  500. code = "PDF Reader Pro Permanent"
  501. } else {
  502. code = "PDF Reader Pro Advanced - Annual Plan"
  503. }
  504. #if VERSION_DMG
  505. let embeddedWC = KMPurchaseEmbeddedWindowController.currentCode(code)
  506. embeddedWC.showWindow(nil)
  507. embeddedWC.window?.center()
  508. #endif
  509. } else if state == .dmg_Upgrades1 {
  510. #if VERSION_DMG
  511. let embeddedWC = KMPurchaseEmbeddedWindowController.currentCode("Add 2-Device · Advanced Annual")
  512. embeddedWC.showWindow(nil)
  513. embeddedWC.window?.center()
  514. #endif
  515. } else if state == .dmg_Upgrades2 {
  516. #if VERSION_DMG
  517. let embeddedWC = KMPurchaseEmbeddedWindowController.currentCode("Add 3-Device · Advanced Annual")
  518. embeddedWC.showWindow(nil)
  519. embeddedWC.window?.center()
  520. #endif
  521. } else if state == .lite_Base {
  522. if tag == 0 {
  523. if isPurchaseSwitch { membershipPurchase(.fourDevicesAllAccessPackNew12months_lite) }
  524. else { membershipPurchase(.fourDevicesAllAccessPackNew6months_lite) }
  525. } else if tag == 3 {
  526. membershipPurchase(.allAccessPackPermanent_lite)
  527. } else {
  528. membershipPurchase(.fourDevicesAllAccessPackNew12months_lite)
  529. }
  530. } else if state == .lite_MacWindows {
  531. if tag == 2 {
  532. let platforms = KMMemberInfo.shared.vip_platforms
  533. let platformsArray = platforms
  534. .components(separatedBy: ",")
  535. .map { $0.trimmingCharacters(in: .whitespaces) }
  536. if KMMemberInfo.shared.userScenarioType == .lite_type5 {
  537. if platformsArray.count == 1 {
  538. membershipPurchase(.advancedAddDevicesAllAccessPack12months_lite)
  539. } else if platformsArray.count == 2 {
  540. membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_lite)
  541. }
  542. } else {
  543. if platformsArray.count == 1 {
  544. membershipPurchase(.advancedAddDevicesAllAccessPack12months_lite)
  545. } else if platformsArray.count == 2 {
  546. membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_lite)
  547. } else {
  548. membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_lite)
  549. }
  550. }
  551. }
  552. } else if state == .pro_Base {
  553. if KMMemberInfo.shared.userScenarioType == .pro_type3 {
  554. if tag == 2 {
  555. membershipPurchase(.standardAddDevicesAllAccessPack12months_pro)
  556. } else if tag == 3 {
  557. membershipPurchase(.pdfToOfficePackPermanent_pro)
  558. }
  559. }
  560. } else if state == .pro_Advanced {
  561. if KMMemberInfo.shared.userScenarioType == .pro_type1 {
  562. membershipPurchase(.advancedAddDevicesAllAccessPack12months_pro)
  563. } else if KMMemberInfo.shared.userScenarioType == .pro_type4 {
  564. let platforms = KMMemberInfo.shared.vip_platforms
  565. let platformsArray = platforms
  566. .components(separatedBy: ",")
  567. .map { $0.trimmingCharacters(in: .whitespaces) }
  568. if platformsArray.count == 1 {
  569. membershipPurchase(.advancedAddDevicesAllAccessPack12months_pro)
  570. } else if platformsArray.count == 2 {
  571. membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_pro)
  572. } else {
  573. membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_pro)
  574. }
  575. }
  576. } else {
  577. if tag == 2 {
  578. membershipPurchase(.fourDevicesAllAccessPackNew12months_lite)
  579. }
  580. }
  581. }
  582. func appStoreEquityVerification(_ notification: Notification,_ complete: @escaping KMMemberProductComplete) -> Void {
  583. #if VERSION_FREE
  584. #if VERSION_DMG
  585. // DMG
  586. #else
  587. // AppStore 免费版本
  588. if let userInfo = notification.object as? SKPaymentTransaction,
  589. let transactionId = userInfo.transactionIdentifier as? String,
  590. let productId = userInfo.payment.productIdentifier as? String {
  591. print("Transaction ID: \(transactionId)")
  592. print("product ID: \(productId)")
  593. var productCode = ""
  594. var isSubscribed = false
  595. if productId == "com.pdfreaderpro.mac_free.member.all_access_pack_advanced_6months.001" {
  596. productCode = "advanced-annual-subscription-six-month"
  597. if IAPProductsManager.default().fourDevicesAllAccessPackNew6Months_lite.isSubscribed {
  598. isSubscribed = true
  599. }
  600. } else if productId == "com.pdfreaderpro.mac_free.member.all_access_pack_advanced_annual.001" {
  601. productCode = "advanced-annual-subscription"
  602. if IAPProductsManager.default().fourDevicesAllAccessPackNew12months_lite.isSubscribed {
  603. isSubscribed = true
  604. }
  605. } else if productId == "com.pdfreaderpro.mac_free.member.all_access_pack_new_6months.001" {
  606. productCode = "advanced-annual-subscription-six-month"
  607. if IAPProductsManager.default().allAccessPackNew6months_lite.isSubscribed {
  608. isSubscribed = true
  609. }
  610. } else if productId == "com.pdfreaderpro.mac_free.member.all_access_pack_12months.001" {
  611. productCode = "advanced-annual-subscription"
  612. if IAPProductsManager.default().allAccessPack12months_lite.isSubscribed {
  613. isSubscribed = true
  614. }
  615. } else if productId == "com.pdfreaderpro.mac_free.member.all_access_pack_6months.001" {
  616. productCode = "advanced-annual-subscription-six-month"
  617. if IAPProductsManager.default().allAccessPack6months_lite.isSubscribed {
  618. isSubscribed = true
  619. }
  620. } else if productId == "com.pdfreaderpro.mac_free.member.ai_pack_1_month" {
  621. productCode = "ai-subscription-month"
  622. if IAPProductsManager.default().aiAllAccessPack1month_lite.isSubscribed {
  623. isSubscribed = true
  624. }
  625. } else if productId == "com.pdfreaderpro.mac_free.member.ai_pack_12_month" {
  626. productCode = "ai-subscription-year-trail"
  627. if IAPProductsManager.default().aiAllAccessPack12month_lite.isSubscribed {
  628. isSubscribed = true
  629. }
  630. } else if productId == "com.pdfreaderpro.mac_free.member.all_access_pack_advanced_permanent_license.001" {
  631. productCode = "advanced-permanent"
  632. if IAPProductsManager.default().allAccessPackPermanent_lite.isSubscribed {
  633. isSubscribed = true
  634. }
  635. } else if productId == "com.pdfreaderpro.mac_free.member.advanced_add_devices_all_access_pack_advanced_annual.001" {
  636. productCode = "advanced-annual-subscription-single-upgrade"
  637. if IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_lite.isSubscribed {
  638. isSubscribed = true
  639. }
  640. } else if productId == "com.pdfreaderpro.mac_free.member.advanced_add_2_devices_all_access_pack_advanced_annual.001" {
  641. productCode = "advanced-annual-subscription-multi-upgrade"
  642. if IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_lite.isSubscribed {
  643. isSubscribed = true
  644. }
  645. }
  646. if isSubscribed {
  647. KMMemberCenterManager.manager.appStoreEquityVerification(applePayProductId: productId, transactionId: transactionId, productCode: productCode) { success, result in
  648. if success {
  649. complete(true, result)
  650. } else {
  651. complete(false, result)
  652. }
  653. }
  654. }
  655. } else {
  656. print("Transaction ID not found in notification.")
  657. }
  658. #endif
  659. #else
  660. // AppStore 付费版
  661. if let userInfo = notification.object as? SKPaymentTransaction,
  662. let transactionId = userInfo.transactionIdentifier as? String,
  663. let productId = userInfo.payment.productIdentifier as? String {
  664. print("Transaction ID: \(transactionId)")
  665. print("product ID: \(productId)")
  666. var productCode = ""
  667. var isSubscribed = false
  668. if productId == "com.pdfreaderpro.mac.ai_pack_1_month" {
  669. productCode = "ai-subscription-month"
  670. if IAPProductsManager.default().aiAllAccessPack1month_pro.isSubscribed {
  671. isSubscribed = true
  672. }
  673. } else if productId == "com.pdfreaderpro.mac.ai_pack_12_month" {
  674. productCode = "ai-subscription-year-trail"
  675. if IAPProductsManager.default().aiAllAccessPack12month_pro.isSubscribed {
  676. isSubscribed = true
  677. }
  678. } else if productId == "com.pdfreaderpro.mac.pdf_to_office_pack_permanent_license.001" {
  679. productCode = "advanced-permanent-mac-upgrade"
  680. if IAPProductsManager.default().pdfToOfficePackPermanent_pro.isSubscribed {
  681. isSubscribed = true
  682. }
  683. } else if productId == "com.pdfreaderpro.mac.all_access_pack_advanced_annual.001" {
  684. productCode = "advanced-permanent-mac-upgrade"
  685. if IAPProductsManager.default().fourDevicesAllAccessPack12months_pro.isSubscribed {
  686. isSubscribed = true
  687. }
  688. }
  689. if isSubscribed {
  690. KMMemberCenterManager.manager.appStoreEquityVerification(applePayProductId: productId, transactionId: transactionId, productCode: productCode) { success, result in
  691. if success {
  692. complete(true, result)
  693. } else {
  694. complete(false, result)
  695. }
  696. }
  697. }
  698. } else {
  699. print("Transaction ID not found in notification.")
  700. }
  701. #endif
  702. }
  703. var isCancelAutoRenew: Bool {
  704. return IAPProductsManager.default().isCancelAutoRenew()
  705. }
  706. var isShowSale: Bool {
  707. if #available(macOS 10.14.4, *), isCancelAutoRenew {
  708. let manager = IAPProductsManager.default()
  709. let isSubscribed_newlyMonth = manager?.allAccessPackNew6months_lite.isSubscribed ?? false
  710. let isSubscribed_year = manager?.allAccessPack12months_lite.isSubscribed ?? false
  711. if isSubscribed_newlyMonth || isSubscribed_year {
  712. return false
  713. }
  714. if let info = KMAdvertisementManager.manager.info.StoreUserRecovery?.content?.first, !(info.show! as NSString).boolValue {
  715. return false
  716. }
  717. return true
  718. }
  719. return false
  720. }
  721. // MARK: Private Method
  722. /**
  723. 会员购买
  724. */
  725. private func membershipPurchase(_ type: KMPurchasedProductType) -> Void {
  726. if type == .fourDevicesAllAccessPackNew6months_lite || type == .fourDevicesAllAccessPackNew12months_lite {
  727. if isPurchaseSwitch {
  728. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().fourDevicesAllAccessPackNew12months_lite, discount: isCancelAutoRenew)
  729. } else {
  730. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().fourDevicesAllAccessPackNew6Months_lite, discount: isCancelAutoRenew)
  731. }
  732. } else if type == .aiAllAccessPack1month_lite {
  733. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().aiAllAccessPack1month_lite, discount: isCancelAutoRenew)
  734. } else if type == .aiAllAccessPack12month_lite {
  735. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().aiAllAccessPack12month_lite, discount: isCancelAutoRenew)
  736. } else if type == .allAccessPackPermanent_lite {
  737. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().allAccessPackPermanent_lite, discount: isCancelAutoRenew)
  738. } else if type == .advancedAddDevicesAllAccessPack12months_lite {
  739. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_lite, discount: isCancelAutoRenew)
  740. } else if type == .advancedAdd2DevicesAllAccessPack12months_lite {
  741. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_lite, discount: isCancelAutoRenew)
  742. } else if type == .aiAllAccessPack1month_pro {
  743. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().aiAllAccessPack1month_pro, discount: isCancelAutoRenew)
  744. } else if type == .aiAllAccessPack12month_pro {
  745. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().aiAllAccessPack12month_pro, discount: isCancelAutoRenew)
  746. } else if type == .pdfToOfficePackPermanent_pro {
  747. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().pdfToOfficePackPermanent_pro, discount: isCancelAutoRenew)
  748. } else if type == .fourDevicesAllAccessPack12months_pro {
  749. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().fourDevicesAllAccessPack12months_pro, discount: isCancelAutoRenew)
  750. } else if type == .standardAddDevicesAllAccessPack12months_pro {
  751. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().standardAddDevicesAllAccessPack12months_pro, discount: isCancelAutoRenew)
  752. } else if type == .advancedAddDevicesAllAccessPack12months_pro {
  753. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().advancedAddDevicesAllAccessPack12months_pro, discount: isCancelAutoRenew)
  754. } else if type == .advancedAdd2DevicesAllAccessPack12months_pro {
  755. IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().advancedAdd2DevicesAllAccessPack12months_pro, discount: isCancelAutoRenew)
  756. }
  757. }
  758. // MARK: Action Method
  759. /**
  760. 恢复购买
  761. */
  762. func productRestore() -> Void {
  763. IAPProductsManager.default().restoreSubscriptions()
  764. }
  765. func privacyPolicyAction() -> Void {
  766. NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/privacy-policy")!)
  767. }
  768. func termOfSerAction() -> Void {
  769. NSWorkspace.shared.open(URL(string: "https://www.pdfreaderpro.com/terms_of_service")!)
  770. }
  771. // MARK: Get & Set
  772. /**
  773. 当前比较表产品列表内容
  774. */
  775. var products: [KMCompareProductType] {
  776. if state == .trial {
  777. return [.free, .freeTrial]
  778. } else if state == .dmg_Base {
  779. return [.free, .allPlatformStandard, .allPlatformAdvanced_12, .dualPlatformAdvanced]
  780. } else if state == .dmg_Upgrades1 {
  781. return [.allPlatformAdvanced_12]
  782. } else if state == .dmg_Upgrades1 {
  783. return [.allPlatformAdvanced_12]
  784. } else if state == .lite_Base {
  785. return [.free, .allPlatformAdvanced_6, .allPlatformAdvanced_12, .dualPlatformAdvanced]
  786. } else if state == .lite_MacWindows {
  787. return [.allPlatformAdvanced_12]
  788. } else if state == .pro_Base {
  789. return [.allPlatformAdvanced_12, .macPlatformAdvanced]
  790. } else if state == .pro_Advanced {
  791. return [.allPlatformAdvanced_12]
  792. }
  793. return []
  794. }
  795. /**
  796. 比较表数据源
  797. */
  798. var dataSource: [Any] {
  799. if isPurchaseSwitch {
  800. // 试用 全平台标准版年订阅 全平台高级版6/12个月订阅 Mac&Windows双平台高级版永久 MAC单平台高级版永久
  801. //MAC单平台标准版永久
  802. return [
  803. "Benefit",
  804. ["Supported platforms", "mac, windows, ios, android", "mac, windows, ios, android", "mac, windows, ios, android", "mac, windows", "mac"],
  805. ["Maximum number of accessible devices", "4 devices", "4 devices", "4 devices", "2 devices", "1 devices"],
  806. "PDF to Office",
  807. ["Convert PDFs to Word, HTML, TXT, JPEG or PNG files", "Only first 10 pages", "Standard", "Advanced", "Advanced", "Advanced"],
  808. ["Turn PDF to PPT, Excel, RTF, CSV, and more", "Only first 10 pages", "Only first 10 pages", "✓", "✓", "✓"],
  809. ["Convert PDF to TIFF, BMP, GIF or TGA files", "Only first 10 pages", "Only first 10 pages", "✓", "✓", "✓"],
  810. "Edit PDF",
  811. ["Add and edit text in PDF", "X", "✓", "✓", "✓", "✓"],
  812. ["Edit, crop, replace image in PDF", "X", "✓", "✓", "✓", "✓"],
  813. "OCR",
  814. ["Extract texts from image-based or scanned PDF", "X", "✓", "✓", "✓", "✓"],
  815. "Organize Pages",
  816. ["Extract, rotate, rearrange, replace, add, delete pages", "X", "✓", "✓", "✓", "✓"],
  817. ["Split PDFs into multiple files", "X", "✓", "✓", "✓", "✓"],
  818. "Advanced Editing Tools",
  819. ["Merge multiple documents into a new PDF", "Up to 2 files or 20 MB", "✓", "✓", "✓", "∞", "∞"],
  820. ["Add & edit watermark", "X", "✓", "✓", "✓", "✓"],
  821. ["Add header, footer, page numbers", "X", "✓", "✓", "✓", "✓"],
  822. ["Add Bates Number", "X", "✓", "✓", "✓", "✓"],
  823. ["Insert PDF page background by color or image", "X", "✓", "✓", "✓", "✓"],
  824. ["Create fattened copies", "X", "✓", "✓", "✓", "✓"],
  825. ["Extract Images", "X", "✓", "✓", "✓", "✓"],
  826. ["Extract tables", "Only first 10 pages", "Only first 10 pages", "✓", "✓", "✓"],
  827. ["Measuring Tools", "X", "✓", "✓", "✓", "✓"],
  828. "Fill & Sign",
  829. ["Create digital signature", "X", "✓", "✓", "✓", "✓"],
  830. ["Create & Edit & Fill Adobe Fillable PDF Forms", "X", "✓", "✓", "✓", "✓"],
  831. "Security",
  832. ["Batch encrypting PDF documents", "X", "✓", "✓", "✓", "✓"],
  833. ["PDF Password Remover", "X", "✓", "✓", "✓", "✓"],
  834. ["Redact sensitive information", "X", "✓", "✓", "✓", "✓"],
  835. "Create PDF",
  836. ["Convert JPEG, JPG, PNG, TIFF, BMP or PSD files to PDFs", "1 file", "✓", "✓", "✓", "✓"],
  837. ["Create PDFs from a scanner and iOS devices", "X", "✓", "✓", "✓", "✓"],
  838. "Annotations",
  839. ["Customize PDF stamps", "X", "✓", "✓", "✓", "✓"],
  840. ["Hyperlink", "Page Number", "Page Number, URL, Email", "Page Number, URL, Email", "Page Number, URL, Email", "Page Number, URL, Email"],
  841. ["Signature", "Standard", "Advanced", "Advanced", "Advanced", "Advanced"],
  842. ["Table", "X", "✓", "✓", "✓", "✓"],
  843. "View PDF",
  844. ["Multi-tab viewer", "X", "✓", "✓", "✓", "✓"],
  845. ["Various printing types: poster, booklet, multi-page printing", "X", "✓", "✓", "✓", "✓"],
  846. ["Customize theme colors: Light Mode, Dark Mode, Sepia Mode and more", "X", "✓", "✓", "✓", "✓"],
  847. ["Split View to compare files", "X", "✓", "✓", "✓", "✓"],
  848. "Subscription Based Solution",
  849. ["Access all premium features in app", "X", "12 months", "12 months", "∞", "∞"],
  850. ["Priority customer support", "X", "✓", "✓", "✓", "✓"],
  851. ["Ad-free", "X", "✓", "✓", "✓", "✓"]
  852. ]
  853. } else {
  854. return [
  855. "Benefit",
  856. ["Supported platforms", "mac, windows, ios, android", "mac, windows, ios, android", "mac, windows, ios, android", "mac, windows", "mac"],
  857. ["Maximum number of accessible devices", "4 devices", "4 devices", "4 devices", "2 devices", "1 devices"],
  858. "PDF to Office",
  859. ["Convert PDFs to Word, HTML, TXT, JPEG or PNG files", "Only first 10 pages", "Standard", "Advanced", "Advanced", "Advanced"],
  860. ["Turn PDF to PPT, Excel, RTF, CSV, and more", "Only first 10 pages", "Only first 10 pages", "✓", "✓", "✓"],
  861. ["Convert PDF to TIFF, BMP, GIF or TGA files", "Only first 10 pages", "Only first 10 pages", "✓", "✓", "✓"],
  862. "Edit PDF",
  863. ["Add and edit text in PDF", "X", "✓", "✓", "✓", "✓"],
  864. ["Edit, crop, replace image in PDF", "X", "✓", "✓", "✓", "✓"],
  865. "OCR",
  866. ["Extract texts from image-based or scanned PDF", "X", "✓", "✓", "✓", "✓"],
  867. "Organize Pages",
  868. ["Extract, rotate, rearrange, replace, add, delete pages", "X", "✓", "✓", "✓", "✓"],
  869. ["Split PDFs into multiple files", "X", "✓", "✓", "✓", "✓"],
  870. "Advanced Editing Tools",
  871. ["Merge multiple documents into a new PDF", "Up to 2 files or 20 MB", "✓", "✓", "✓", "∞", "∞"],
  872. ["Add & edit watermark", "X", "✓", "✓", "✓", "✓"],
  873. ["Add header, footer, page numbers", "X", "✓", "✓", "✓", "✓"],
  874. ["Add Bates Number", "X", "✓", "✓", "✓", "✓"],
  875. ["Insert PDF page background by color or image", "X", "✓", "✓", "✓", "✓"],
  876. ["Create fattened copies", "X", "✓", "✓", "✓", "✓"],
  877. ["Extract Images", "X", "✓", "✓", "✓", "✓"],
  878. ["Extract tables", "Only first 10 pages", "Only first 10 pages", "✓", "✓", "✓"],
  879. ["Measuring Tools", "X", "✓", "✓", "✓", "✓"],
  880. "Fill & Sign",
  881. ["Create digital signature", "X", "✓", "✓", "✓", "✓"],
  882. ["Create & Edit & Fill Adobe Fillable PDF Forms", "X", "✓", "✓", "✓", "✓"],
  883. "Security",
  884. ["Batch encrypting PDF documents", "X", "✓", "✓", "✓", "✓"],
  885. ["PDF Password Remover", "X", "✓", "✓", "✓", "✓"],
  886. ["Redact sensitive information", "X", "✓", "✓", "✓", "✓"],
  887. "Create PDF",
  888. ["Convert JPEG, JPG, PNG, TIFF, BMP or PSD files to PDFs", "1 file", "✓", "✓", "✓", "✓"],
  889. ["Create PDFs from a scanner and iOS devices", "X", "✓", "✓", "✓", "✓"],
  890. "Annotations",
  891. ["Customize PDF stamps", "X", "✓", "✓", "✓", "✓"],
  892. ["Hyperlink", "Page Number", "Page Number, URL, Email", "Page Number, URL, Email", "Page Number, URL, Email", "Page Number, URL, Email"],
  893. ["Signature", "Standard", "Advanced", "Advanced", "Advanced", "Advanced"],
  894. ["Table", "X", "✓", "✓", "✓", "✓"],
  895. "View PDF",
  896. ["Multi-tab viewer", "X", "✓", "✓", "✓", "✓"],
  897. ["Various printing types: poster, booklet, multi-page printing", "X", "✓", "✓", "✓", "✓"],
  898. ["Customize theme colors: Light Mode, Dark Mode, Sepia Mode and more", "X", "✓", "✓", "✓", "✓"],
  899. ["Split View to compare files", "X", "✓", "✓", "✓", "✓"],
  900. "Subscription Based Solution",
  901. ["Access all premium features in app", "X", "6 months", "6 months", "∞", "∞"],
  902. ["Priority customer support", "X", "✓", "✓", "✓", "✓"],
  903. ["Ad-free", "X", "✓", "✓", "✓", "✓"]
  904. ]
  905. }
  906. }
  907. }