Bläddra i källkod

ComPDFKit(iOS) - iOS 项目配置处理

yangliuhua 7 månader sedan
förälder
incheckning
0b1cd3522c
35 ändrade filer med 362 tillägg och 21 borttagningar
  1. 103 0
      example/Gemfile.lock
  2. 15 15
      example/ios/CompdfkitPdfExample.xcodeproj/project.pbxproj
  3. 8 0
      example/ios/CompdfkitPdfExample/AppDelegate.h
  4. 8 0
      example/ios/CompdfkitPdfExample/AppDelegate.mm
  5. 105 0
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/Contents.json
  6. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-1024.png
  7. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-20-ipad.png
  8. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png
  9. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-20@2x.png
  10. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-20@3x.png
  11. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29-ipad.png
  12. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29.png
  13. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png
  14. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29@2x.png
  15. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29@3x.png
  16. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-40.png
  17. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-40@2x.png
  18. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-40@3x.png
  19. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-50.png
  20. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-50@2x.png
  21. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-57.png
  22. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-57@2x.png
  23. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-60@2x.png
  24. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-60@3x.png
  25. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-72.png
  26. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-72@2x.png
  27. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-76.png
  28. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-76@2x.png
  29. BIN
      example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-83.5@2x.png
  30. 2 2
      example/ios/CompdfkitPdfExample/Images.xcassets/Contents.json
  31. 1 1
      example/ios/CompdfkitPdfExample/Info.plist
  32. 8 0
      example/ios/CompdfkitPdfExample/main.m
  33. 8 0
      ios/ComPDFKitRN.mm
  34. 96 3
      ios/ComPDFKitRN.swift
  35. 8 0
      ios/CompdfkitPdf-Bridging-Header.h

+ 103 - 0
example/Gemfile.lock

@@ -0,0 +1,103 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    CFPropertyList (3.0.7)
+      base64
+      nkf
+      rexml
+    activesupport (7.0.8.1)
+      concurrent-ruby (~> 1.0, >= 1.0.2)
+      i18n (>= 1.6, < 2)
+      minitest (>= 5.1)
+      tzinfo (~> 2.0)
+    addressable (2.8.6)
+      public_suffix (>= 2.0.2, < 6.0)
+    algoliasearch (1.27.5)
+      httpclient (~> 2.8, >= 2.8.3)
+      json (>= 1.5.1)
+    atomos (0.1.3)
+    base64 (0.2.0)
+    claide (1.1.0)
+    cocoapods (1.14.3)
+      addressable (~> 2.8)
+      claide (>= 1.0.2, < 2.0)
+      cocoapods-core (= 1.14.3)
+      cocoapods-deintegrate (>= 1.0.3, < 2.0)
+      cocoapods-downloader (>= 2.1, < 3.0)
+      cocoapods-plugins (>= 1.0.0, < 2.0)
+      cocoapods-search (>= 1.0.0, < 2.0)
+      cocoapods-trunk (>= 1.6.0, < 2.0)
+      cocoapods-try (>= 1.1.0, < 2.0)
+      colored2 (~> 3.1)
+      escape (~> 0.0.4)
+      fourflusher (>= 2.3.0, < 3.0)
+      gh_inspector (~> 1.0)
+      molinillo (~> 0.8.0)
+      nap (~> 1.0)
+      ruby-macho (>= 2.3.0, < 3.0)
+      xcodeproj (>= 1.23.0, < 2.0)
+    cocoapods-core (1.14.3)
+      activesupport (>= 5.0, < 8)
+      addressable (~> 2.8)
+      algoliasearch (~> 1.0)
+      concurrent-ruby (~> 1.1)
+      fuzzy_match (~> 2.0.4)
+      nap (~> 1.0)
+      netrc (~> 0.11)
+      public_suffix (~> 4.0)
+      typhoeus (~> 1.0)
+    cocoapods-deintegrate (1.0.5)
+    cocoapods-downloader (2.1)
+    cocoapods-plugins (1.0.0)
+      nap
+    cocoapods-search (1.0.1)
+    cocoapods-trunk (1.6.0)
+      nap (>= 0.8, < 2.0)
+      netrc (~> 0.11)
+    cocoapods-try (1.2.0)
+    colored2 (3.1.2)
+    concurrent-ruby (1.2.3)
+    escape (0.0.4)
+    ethon (0.16.0)
+      ffi (>= 1.15.0)
+    ffi (1.16.3)
+    fourflusher (2.3.1)
+    fuzzy_match (2.0.4)
+    gh_inspector (1.1.3)
+    httpclient (2.8.3)
+    i18n (1.14.4)
+      concurrent-ruby (~> 1.0)
+    json (2.7.2)
+    minitest (5.22.3)
+    molinillo (0.8.0)
+    nanaimo (0.3.0)
+    nap (1.1.0)
+    netrc (0.11.0)
+    nkf (0.2.0)
+    public_suffix (4.0.7)
+    rexml (3.2.6)
+    ruby-macho (2.5.1)
+    typhoeus (1.4.1)
+      ethon (>= 0.9.0)
+    tzinfo (2.0.6)
+      concurrent-ruby (~> 1.0)
+    xcodeproj (1.24.0)
+      CFPropertyList (>= 2.3.3, < 4.0)
+      atomos (~> 0.1.3)
+      claide (>= 1.0.2, < 2.0)
+      colored2 (~> 3.1)
+      nanaimo (~> 0.3.0)
+      rexml (~> 3.2.4)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  activesupport (>= 6.1.7.5, < 7.1.0)
+  cocoapods (>= 1.13, < 1.15)
+
+RUBY VERSION
+   ruby 2.7.4p191
+
+BUNDLED WITH
+   2.2.27

+ 15 - 15
example/ios/CompdfkitPdfExample.xcodeproj/project.pbxproj

@@ -31,7 +31,7 @@
 		00E356EE1AD99517003FC87E /* CompdfkitPdfExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CompdfkitPdfExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
 		00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		00E356F21AD99517003FC87E /* CompdfkitPdfExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CompdfkitPdfExampleTests.m; sourceTree = "<group>"; };
-		13B07F961A680F5B00A75B9A /* CompdfkitPdfExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CompdfkitPdfExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		13B07F961A680F5B00A75B9A /* ComPDFKit_RN.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ComPDFKit_RN.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = CompdfkitPdfExample/AppDelegate.h; sourceTree = "<group>"; };
 		13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = CompdfkitPdfExample/AppDelegate.mm; sourceTree = "<group>"; };
 		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = CompdfkitPdfExample/Images.xcassets; sourceTree = "<group>"; };
@@ -136,7 +136,7 @@
 		83CBBA001A601CBA00E9B192 /* Products */ = {
 			isa = PBXGroup;
 			children = (
-				13B07F961A680F5B00A75B9A /* CompdfkitPdfExample.app */,
+				13B07F961A680F5B00A75B9A /* ComPDFKit_RN.app */,
 				00E356EE1AD99517003FC87E /* CompdfkitPdfExampleTests.xctest */,
 			);
 			name = Products;
@@ -195,7 +195,7 @@
 			);
 			name = CompdfkitPdfExample;
 			productName = CompdfkitPdfExample;
-			productReference = 13B07F961A680F5B00A75B9A /* CompdfkitPdfExample.app */;
+			productReference = 13B07F961A680F5B00A75B9A /* ComPDFKit_RN.app */;
 			productType = "com.apple.product-type.application";
 		};
 /* End PBXNativeTarget section */
@@ -472,7 +472,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = 59AC9PMNH2;
+				DEVELOPMENT_TEAM = 4GGQPGRTSV;
 				ENABLE_BITCODE = NO;
 				INFOPLIST_FILE = CompdfkitPdfExample/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (
@@ -486,9 +486,12 @@
 					"-lc++",
 				);
 				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.reactnative.example;
-				PRODUCT_NAME = CompdfkitPdfExample;
+				PRODUCT_NAME = ComPDFKit_RN;
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			name = Debug;
@@ -500,7 +503,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CURRENT_PROJECT_VERSION = 1;
-				DEVELOPMENT_TEAM = 59AC9PMNH2;
+				DEVELOPMENT_TEAM = 4GGQPGRTSV;
 				INFOPLIST_FILE = CompdfkitPdfExample/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
@@ -513,8 +516,11 @@
 					"-lc++",
 				);
 				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.reactnative.example;
-				PRODUCT_NAME = CompdfkitPdfExample;
+				PRODUCT_NAME = ComPDFKit_RN;
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
 				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
 				VERSIONING_SYSTEM = "apple-generic";
 			};
 			name = Release;
@@ -592,10 +598,7 @@
 					"-DFOLLY_CFG_NO_COROUTINES=1",
 					"-DFOLLY_HAVE_CLOCK_GETTIME=1",
 				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					" ",
-				);
+				OTHER_LDFLAGS = "$(inherited)  ";
 				REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
 				SDKROOT = iphoneos;
 				USE_HERMES = true;
@@ -667,10 +670,7 @@
 					"-DFOLLY_CFG_NO_COROUTINES=1",
 					"-DFOLLY_HAVE_CLOCK_GETTIME=1",
 				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					" ",
-				);
+				OTHER_LDFLAGS = "$(inherited)  ";
 				REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
 				SDKROOT = iphoneos;
 				USE_HERMES = true;

+ 8 - 0
example/ios/CompdfkitPdfExample/AppDelegate.h

@@ -1,3 +1,11 @@
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
 #import <RCTAppDelegate.h>
 #import <UIKit/UIKit.h>
 

+ 8 - 0
example/ios/CompdfkitPdfExample/AppDelegate.mm

@@ -1,3 +1,11 @@
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
 #import "AppDelegate.h"
 
 #import <React/RCTBundleURLProvider.h>

+ 105 - 0
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -1,46 +1,151 @@
 {
   "images" : [
     {
+      "filename" : "icon-20@2x.png",
       "idiom" : "iphone",
       "scale" : "2x",
       "size" : "20x20"
     },
     {
+      "filename" : "icon-20@3x.png",
       "idiom" : "iphone",
       "scale" : "3x",
       "size" : "20x20"
     },
     {
+      "filename" : "icon-29.png",
+      "idiom" : "iphone",
+      "scale" : "1x",
+      "size" : "29x29"
+    },
+    {
+      "filename" : "icon-29@2x.png",
       "idiom" : "iphone",
       "scale" : "2x",
       "size" : "29x29"
     },
     {
+      "filename" : "icon-29@3x.png",
       "idiom" : "iphone",
       "scale" : "3x",
       "size" : "29x29"
     },
     {
+      "filename" : "icon-40@2x.png",
       "idiom" : "iphone",
       "scale" : "2x",
       "size" : "40x40"
     },
     {
+      "filename" : "icon-40@3x.png",
       "idiom" : "iphone",
       "scale" : "3x",
       "size" : "40x40"
     },
     {
+      "filename" : "icon-57.png",
+      "idiom" : "iphone",
+      "scale" : "1x",
+      "size" : "57x57"
+    },
+    {
+      "filename" : "icon-57@2x.png",
+      "idiom" : "iphone",
+      "scale" : "2x",
+      "size" : "57x57"
+    },
+    {
+      "filename" : "icon-60@2x.png",
       "idiom" : "iphone",
       "scale" : "2x",
       "size" : "60x60"
     },
     {
+      "filename" : "icon-60@3x.png",
       "idiom" : "iphone",
       "scale" : "3x",
       "size" : "60x60"
     },
     {
+      "filename" : "icon-20-ipad.png",
+      "idiom" : "ipad",
+      "scale" : "1x",
+      "size" : "20x20"
+    },
+    {
+      "filename" : "icon-20@2x-ipad.png",
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "size" : "20x20"
+    },
+    {
+      "filename" : "icon-29-ipad.png",
+      "idiom" : "ipad",
+      "scale" : "1x",
+      "size" : "29x29"
+    },
+    {
+      "filename" : "icon-29@2x-ipad.png",
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "size" : "29x29"
+    },
+    {
+      "filename" : "icon-40.png",
+      "idiom" : "ipad",
+      "scale" : "1x",
+      "size" : "40x40"
+    },
+    {
+      "filename" : "icon-40@2x.png",
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "size" : "40x40"
+    },
+    {
+      "filename" : "icon-50.png",
+      "idiom" : "ipad",
+      "scale" : "1x",
+      "size" : "50x50"
+    },
+    {
+      "filename" : "icon-50@2x.png",
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "size" : "50x50"
+    },
+    {
+      "filename" : "icon-72.png",
+      "idiom" : "ipad",
+      "scale" : "1x",
+      "size" : "72x72"
+    },
+    {
+      "filename" : "icon-72@2x.png",
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "size" : "72x72"
+    },
+    {
+      "filename" : "icon-76.png",
+      "idiom" : "ipad",
+      "scale" : "1x",
+      "size" : "76x76"
+    },
+    {
+      "filename" : "icon-76@2x.png",
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "size" : "76x76"
+    },
+    {
+      "filename" : "icon-83.5@2x.png",
+      "idiom" : "ipad",
+      "scale" : "2x",
+      "size" : "83.5x83.5"
+    },
+    {
+      "filename" : "icon-1024.png",
       "idiom" : "ios-marketing",
       "scale" : "1x",
       "size" : "1024x1024"

BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-1024.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-20-ipad.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-20@2x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-20@3x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29-ipad.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29@2x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-29@3x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-40.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-40@2x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-40@3x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-50.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-50@2x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-57.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-57@2x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-60@2x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-60@3x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-72.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-72@2x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-76.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-76@2x.png


BIN
example/ios/CompdfkitPdfExample/Images.xcassets/AppIcon.appiconset/icon-83.5@2x.png


+ 2 - 2
example/ios/CompdfkitPdfExample/Images.xcassets/Contents.json

@@ -1,6 +1,6 @@
 {
   "info" : {
-    "version" : 1,
-    "author" : "xcode"
+    "author" : "xcode",
+    "version" : 1
   }
 }

+ 1 - 1
example/ios/CompdfkitPdfExample/Info.plist

@@ -5,7 +5,7 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<key>CFBundleDisplayName</key>
-	<string>CompdfkitPdfExample</string>
+	<string>ComPDFKit_RN</string>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>

+ 8 - 0
example/ios/CompdfkitPdfExample/main.m

@@ -1,3 +1,11 @@
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
 #import <UIKit/UIKit.h>
 
 #import "AppDelegate.h"

+ 8 - 0
ios/ComPDFKitRN.mm

@@ -1,3 +1,11 @@
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
 #import <React/RCTBridgeModule.h>
 
 @interface RCT_EXTERN_MODULE(ComPDFKit, NSObject)

+ 96 - 3
ios/ComPDFKitRN.swift

@@ -1,33 +1,94 @@
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
 import UIKit
 import Foundation
 import ComPDFKit
 import ComPDFKit_Tools
 
+/**
+ * RN and iOS native ComPDFKit SDK interaction class
+ *
+ */
 @objc(ComPDFKit)
 class ComPDFKit: NSObject, CPDFViewBaseControllerDelete{
     
-    
+    /**
+      * Get the version number of the ComPDFKit SDK.<br/>
+      * For example: "2.0.0".<br/>
+      * <p></p>
+      * Usage example:<br/><br/>
+      * <pre>
+      * ComPDFKit.getVersionCode().then((versionCode : string) => {
+      *   console.log('ComPDFKit SDK Version:', versionCode)
+      * })
+      * </pre>
+      *
+      */
     @objc(getVersionCode:withRejecter:)
     func getVersionCode(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
         resolve(String(CPDFKit.sharedInstance().versionNumber))
     }
 
 
+    /**
+       * Get the build tag of the ComPDFKit PDF SDK.<br/>
+       * For example: "build_beta_2.0.0_42db96987_202404081007"<br/>
+       * <p></p>
+       *
+       * Usage example:<br/>
+       * <pre>
+       * ComPDFKit.getSDKBuildTag().then((buildTag : string) => {
+       *   console.log('ComPDFKit Build Tag:', buildTag)
+       * })
+       * </pre>
+       *
+       */
     @objc(getSDKBuildTag:withRejecter:)
     func getSDKBuildTag(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
         let sdkBuildTag = CPDFKit.sharedInstance().versionString
         resolve(sdkBuildTag)
     }
     
+    
+    /**
+     * Initialize the ComPDFKit PDF SDK using offline authentication.<br/>
+     * <p></p>
+     * Usage example:<br/>
+     * <pre>
+     * ComPDFKit.init_('license')
+     * </pre>
+     *
+     * @param license The offline license.
+     */
     @objc(init_: withResolver: withRejecter:)
     func init_(license : String,resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock){
         DispatchQueue.main.async {
-            var code = CPDFKit.verify(withKey: license)
+            let code = CPDFKit.verify(withKey: license)
             print("ComPDFKitRN-iOS  init_:\(code)")
             resolve(code == CPDFKitLicenseCode.success)
         }
     }
     
+    
+    /**
+     * Initialize the ComPDFKit PDF SDK using online authentication. <br/>
+     * Requires internet connection. Please ensure that the network permission has been added in [AndroidManifest.xml] file. <br/>
+     * {@link android.Manifest.permission#INTERNET} <br/>
+     * <p></p>
+     * Usage example:
+     * <pre>
+     *   ComPDFKit.initialize(androidLicense, iosLicense)
+     * </pre>
+     *
+     * @param androidOnlineLicense The online license for the ComPDFKit SDK on Android platform.
+     * @param iosOnlineLicense     The online license for the ComPDFKit SDK on iOS platform.
+     */
     @objc(initialize: iosOnlineLicense: withResolver: withRejecter:)
     func initialize(_ androidOnlineLicense: String, iosOnlineLicense: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
       DispatchQueue.main.async {
@@ -39,6 +100,33 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete{
     }
     
     
+    /**
+       * Display a PDF.<br/>
+       *
+       * Usage example:<br/>
+       * <pre>
+       *   ComPDFKit.openDocument(document, password, configurationJson)
+       * </pre>
+       *
+       * (Android) For local storage file path: <br/>
+       * <pre>
+       *   document = "file:///storage/emulated/0/Download/sample.pdf";<br/>
+       * </pre>
+       *
+       * (Android) For content Uri: <br/>
+       * <pre>
+       *   document = "content://...";
+       * </pre>
+       *
+       * (Android) For assets path: <br/>
+       * <pre>
+       *   document = "file:///android_asset/..."
+       * </pre>
+       *
+       * @param document          The document URI or file path.
+       * @param password          The document password.
+       * @param configurationJson Configuration data in JSON format.
+       */
     @objc(openDocument: password: configurationJson:)
     func openDocument(document : URL, password: String, configurationJson : String) -> Void {
         DispatchQueue.main.async {
@@ -56,11 +144,16 @@ class ComPDFKit: NSObject, CPDFViewBaseControllerDelete{
     }
     
     
-    
+    /**
+     * CPDFViewBaseControllerDelete delegate to dismiss ViewController.<br/>
+     */
     func PDFViewBaseControllerDissmiss(_ baseControllerDelete: CPDFViewBaseController) {
       baseControllerDelete.dismiss(animated: true)
     }
     
+    /**
+     *  Cet a root ViewController.<br/>
+     */
     class func presentedViewController() -> UIViewController? {
       
       var rootViewController: UIViewController? = nil

+ 8 - 0
ios/CompdfkitPdf-Bridging-Header.h

@@ -1,2 +1,10 @@
+//  Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
+//
+//  THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
+//  AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
+//  UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
+//  This notice may not be removed from this file.
+//
+
 #import <React/RCTBridgeModule.h>
 #import <React/RCTViewManager.h>