ConversionSDKInfoPlugin.swift 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // ConversionSDKInfoPlugin.swift
  3. // Runner
  4. //
  5. //
  6. // Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.
  7. //
  8. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  9. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  10. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  11. // This notice may not be removed from this file.
  12. //
  13. import Foundation
  14. import ComPDFKit_Conversion
  15. class ConversionSDKInfoPlugin {
  16. init(messenger : FlutterBinaryMessenger){
  17. ComPDFKit_Conversion.CPDFConvertKit.setLicenseKey("HcEZS8HQrBctbJli1xlWOJZq3SAVyEJGiOLDVgu7TaSCTutQTwE7Ob0BHdoyyqeauYV5qpfpv+0sqREPobyjxMYPXPWgfR9tu1l8cBzY1aagCXmEmH52tqT11le1QLdQpIHuMEjl0kNKrrnXoZg5IXM+yK+zGPFZur+Sg36vEak=", secret: "mG0c3O3Mzeu5dkZJW3gpqotjgd+APU/4fMqIHQR4gdwo2nT+JSjvjfOo8NxHMSkD++hxhwHCwPoJfrSZGObicXKC+c93UnqcfqUbcdY/oQKcM/fgvvcctF5rcqYAH1dpMv7C2jvq4o0q6sQtN3jR43QdIezW2vV5wIeyNjPTddUNBwTRKvRkQ75Y56jVVUcsWiExjnRPpqLnyppZAnYJ1tnsa41fJuMqWbPW2c3qJUemdtKP7E4eFYSl6tjgcetK")
  18. let channel = FlutterMethodChannel(name: "com.compdfkit.conversion.flutter.convert.sdk.info", binaryMessenger: messenger)
  19. channel.setMethodCallHandler{(call : FlutterMethodCall, result : @escaping FlutterResult) in
  20. if (call.method == "request_convert_sdk_version"){
  21. result(ComPDFKit_Conversion.CPDFConvertKit().versionString)
  22. }else if (call.method == "request_convert_output_path"){
  23. result(NSHomeDirectory() + "/Documents/ConversionDemo")
  24. }
  25. }
  26. }
  27. }