check-versions-compdfkit-pdf-sdk.vue 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <div>
  3. <Header />
  4. <div class="lg:pt-80px <lg:pt-66px pb-80px container">
  5. <h1 class="mt-30px font-bold text-xl">获取当前使用PDF SDK产品的版本号</h1>
  6. <h2 class="my-20px text-24px font-bold">iOS</h2>
  7. <h3 class="mb-20px text-18px">- Object-C</h3>
  8. <pre class="max-w-800px p-16px bg-[#272E3B] overflow-auto"><code class="text-white"><span class="title">NSString</span> *<span class="title">versionString</span> = [<span class="">CPDFKit</span><span> </span><span >sharedInstance</span><span>].</span><span>versionString</span><span>;</span></code></pre>
  9. <h3 class="my-20px text-18px">- Swift</h3>
  10. <pre class="max-w-800px p-16px bg-[#272E3B] overflow-auto"><code class="text-white"><span class="keyword">let</span><span class="title"> versionString = </span><span class="keyword">CPDFKit</span><span class="comment">.sharedInstance().versionString</span></code></pre>
  11. <h3 class="my-20px text-18px">-xcframework</h3>
  12. <p class="text-16px">you can find corresponding architecture Info.plist in xcframework</p>
  13. <div class="my-20px text-center">
  14. <img class="max-w-800px w-full" src="/images/version/code-xcframework.png" alt="">
  15. </div>
  16. <p class="text-16px">Then find Bundle version string in Info.plist</p>
  17. <div class="my-20px text-center">
  18. <img class="max-w-800px w-full" src="/images/version/code-plist.png" alt="">
  19. </div>
  20. <h2 class="my-20px text-24px font-bold">Android</h2>
  21. <h3 class="mb-20px text-18px">java&Kotlin</h3>
  22. <pre class="max-w-800px p-16px bg-[#272E3B] overflow-auto"><code class="text-white"><span class="keyword">val</span> versionString = CPDFSdk.getSDKVersion();</code></pre>
  23. </div>
  24. <Footer />
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. head() {
  30. return {
  31. title: this.$config.meta['check-versions-pdf-sdk-title'],
  32. meta: [
  33. {
  34. hid: 'og:title',
  35. property: 'og:title',
  36. content: this.$config.meta['check-versions-pdf-sdk-title']
  37. },
  38. {
  39. hid: 'twitter:title',
  40. property: 'twitter:title',
  41. content: this.$config.meta['check-versions-pdf-sdk-title']
  42. }
  43. ],
  44. link: [{
  45. hid: 'canonical',
  46. rel: 'canonical',
  47. href: process.env.domain + this.$route.path
  48. }]
  49. }
  50. }
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. pre ::v-deep {
  55. .title {
  56. color: #DEC1FF;
  57. }
  58. .keyword {
  59. color: #A0459F;
  60. }
  61. .comment {
  62. color: #70A14F;
  63. }
  64. }
  65. </style>