12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <template>
- <div>
- <Header />
- <div class="lg:pt-80px <lg:pt-66px pb-80px container">
- <h1 class="mt-30px font-bold text-xl">获取当前使用PDF SDK产品的版本号</h1>
- <h2 class="my-20px text-24px font-bold">iOS</h2>
- <h3 class="mb-20px text-18px">- Object-C</h3>
- <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>
- <h3 class="my-20px text-18px">- Swift</h3>
- <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>
- <h3 class="my-20px text-18px">-xcframework</h3>
- <p class="text-16px">you can find corresponding architecture Info.plist in xcframework</p>
- <div class="my-20px text-center">
- <img class="max-w-800px w-full" src="/images/version/code-xcframework.png" alt="">
- </div>
- <p class="text-16px">Then find Bundle version string in Info.plist</p>
- <div class="my-20px text-center">
- <img class="max-w-800px w-full" src="/images/version/code-plist.png" alt="">
- </div>
- <h2 class="my-20px text-24px font-bold">Android</h2>
- <h3 class="mb-20px text-18px">java&Kotlin</h3>
- <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>
- </div>
- <Footer />
- </div>
- </template>
- <script>
- export default {
- head() {
- return {
- title: this.$config.meta['check-versions-pdf-sdk-title'],
- meta: [
- {
- hid: 'og:title',
- property: 'og:title',
- content: this.$config.meta['check-versions-pdf-sdk-title']
- },
- {
- hid: 'twitter:title',
- property: 'twitter:title',
- content: this.$config.meta['check-versions-pdf-sdk-title']
- }
- ],
- link: [{
- hid: 'canonical',
- rel: 'canonical',
- href: process.env.domain + this.$route.path
- }]
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- pre ::v-deep {
- .title {
- color: #DEC1FF;
- }
- .keyword {
- color: #A0459F;
- }
- .comment {
- color: #70A14F;
- }
- }
- </style>
|