Procházet zdrojové kódy

compdfkit(rn) - 1.13.0 release

liuxiaolong před 1 rokem
rodič
revize
f3e9d2209f

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 4 - 1
App.tsx


binární
Image/1-9.png


+ 323 - 275
README.md

@@ -92,10 +92,6 @@ ComPDFKit for React Native is a commercial SDK, which requires a license to gran
 
 **Online License:** We have introduced an online license mechanism for enhanced license management. Through the online approach, you can manage and update your license more flexibly to meet the specific requirements of your project.
 
-To initialize ComPDFKit using a license key, call either of the following before using any other ComPDFKit APIs or features:
-
-
-
 # 2 Get Started
 
 It's easy to embed ComPDFKit into React Native applications with a few lines of code. Let's take a few minutes to get started.
@@ -193,11 +189,13 @@ dependencies {
 }
 ```
 
-open  `android/app/src/main/AndroidManifest.xml` , add `Storage Permission`:
+open  `android/app/src/main/AndroidManifest.xml` , add  `Internet Permission` and `Storage Permission`:
 
 ```diff
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.compdfkit.flutter.example">
+
++    <uses-permission android:name="android.permission.INTERNET"/>
   
     <!-- Required to read and write documents from device storage -->
 +    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
@@ -207,7 +205,7 @@ open  `android/app/src/main/AndroidManifest.xml` , add `Storage Permission`:
     <application
 +    android:requestLegacyExternalStorage="true"
         ...>
-        ...
+	...
     </application>
 </manifest>
 ```
@@ -292,6 +290,8 @@ Go to the `compdfkit_rn/ios` folder and run the `pod install` command:
 pod install
 ```
 
+**Note:** If SSL network requests fail to download the `ComPDFKit` library when you run `pod install`, you can see the processing method in [2.5 Troubleshooting](#2.5 Troubleshooting).
+
 Open your project’s Workspace in Xcode:
 
 ```bash
@@ -330,13 +330,17 @@ To protect user privacy, before accessing the sensitive privacy data, you need t
 
 <key>NSPhotoLibraryUsageDescription</key>
 <string>Your consent is required before you could access the function.</string>
+  
+<key>NSAppTransportSecurity</key>
+	<dict>
+		<key>NSAllowsArbitraryLoads</key>
+		<true/>
+	</dict>
 ```
 
-
-
 ## 2.3 Apply the License Key
 
-ComPDFKit for React Native is a commercial SDK, which requires a license to grant developer permission to release their apps. Each license is only valid for one `bundle ID` or `applicationId` in development mode. Other flexible licensing options are also supported, please contact [our marketing team](mailto:support@compdf.com) to know more.  
+ComPDFKit for React Native is a commercial SDK, which requires a license to grant developer permission to release their apps. Each license is only valid for one `bundle ID` or `applicationId` in development mode. Other flexible licensing options are also supported, please contact [our marketing team](mailto:support@compdf.com) to know more.
 
 To initialize ComPDFKit using a license key, call either of the following before using any other ComPDFKit APIs or features:
 
@@ -348,6 +352,7 @@ export default class App extends Component<Props> {
 	...
   
   componentDidMount(){
+    // Fill in your online license
     NativeModules.OpenPDFModule.initialize('your android platform compdfkit license', 'your ios platform compdfkit license')
   }
   // ...
@@ -362,17 +367,16 @@ export default class App extends Component<Props> {
 	...
   
   componentDidMount(){
-    NativeModules.OpenPDFModule.init('your compdfkit license')
+    // Fill in your offline license
+    NativeModules.OpenPDFModule.init_('your compdfkit license')
   }
   // ...
 }
 ```
 
-
-
 ## 2.4 Run Project
 
-1. Create an `assets` directory in the project's root directory and copy the **[configuration.json](./assets/configuration.json)** file from the demo to this directory.
+1. Create an `assets` directory in the project's root directory and copy the **configuration.json** file from the demo to this directory.
 
 <img src="./Image/2-3-1.png" alt="2-3-1" style="zoom:33%;" />
 
@@ -418,12 +422,12 @@ const instructions = Platform.select({
 type Props = {};
 export default class App extends Component<Props> {
   
-   componentDidMount(){
-      // Fill in your offline license
-			NativeModules.OpenPDFModule.initialize('your android platform compdfkit license', 'your ios platform compdfkit license')
-      
+  componentDidMount(){
       // Fill in your online license
-      // NativeModules.OpenPDFModule.init('your compdfkit license')
+         NativeModules.OpenPDFModule.initialize('your android platform compdfkit license', 'your ios platform compdfkit license')
+    
+      // Fill in your offline license
+      // NativeModules.OpenPDFModule.init_('your compdfkit license')
   }
   
   render() {
@@ -509,8 +513,6 @@ npx react-native run-android
 npx react-native run-ios
 ```
 
-
-
 We have provided two quick ways to open PDFs:
 
 - Open the document in the specified path
@@ -526,11 +528,59 @@ NativeModules.OpenPDFModule.openPDFByConfiguration(String filePath, String passw
 NativeModules.OpenPDFModule.openPDFByUri(String uriString, String password, String configuration)
 ```
 
+## 2.5 Troubleshooting
+
+1.SSL network request to download 'ComPDFKit' library failed when cocopods downloaded iOS third-party library
+
+If SSL network requests fail to download the `ComPDFKit` library when you run `pod install`, replace the third-party platform download address link of the ComPDFKit library and execute `pod install`
+
+```diff
+require_relative '../node_modules/react-native/scripts/react_native_pods'
+require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
+
+- platform :ios, '10.0'
++ platform :ios, '11.0'
+install! 'cocoapods', :deterministic_uuids => false
+
+target 'PDFView_RN' do
+  config = use_native_modules!
 
+  # Flags change depending on the env values.
+  flags = get_default_flags()
+
+  use_react_native!(
+    :path => config[:reactNativePath],
+    # to enable hermes on iOS, change `false` to `true` and then install pods
+    :hermes_enabled => flags[:hermes_enabled],
+    :fabric_enabled => flags[:fabric_enabled],
+    # An absolute path to your application root.
+    :app_path => "#{Pod::Config.instance.installation_root}/.."
+  )
+
+  target 'PDFView_RNTests' do
+    inherit! :complete
+    # Pods for testing
+  end
+
++  pod 'ComPDFKit', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '1.13.0'
++  pod 'ComPDFKit_Tools', :git => 'https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git', :tag => '1.13.0'
+
+  # Enables Flipper.
+  #
+  # Note that if you have use_frameworks! enabled, Flipper will not work and
+  # you should disable the next line.
+  use_flipper!()
+
+  post_install do |installer|
+    react_native_post_install(installer)
+    __apply_Xcode_12_5_M1_post_install_workaround(installer)
+  end
+end
+```
 
 # 3 UI Customization
 
-In version **1.12.0**, we have expanded the options defined in the **[configuration.json](./assets/configuration.json)**. When using the `NativeModules.OpenPDFModule.openPDFByConfiguration` method to open a PDF view, you can define the JSON content to meet your product requirements. We will continue to enrich the configuration options in the future to further enhance the flexibility of the product. Here are some examples of commonly used configuration options:
+In version **1.12.0**, we have expanded the options defined in the **configuration.json**. When using the `NativeModules.OpenPDFModule.openPDFByConfiguration` method to open a PDF view, you can define the JSON content to meet your product requirements. We will continue to enrich the configuration options in the future to further enhance the flexibility of the product. Here are some examples of commonly used configuration options:
 
 The following only shows the key parts of the example. Please pass in the complete json content when using it.
 
@@ -588,268 +638,266 @@ The following only shows the key parts of the example. Please pass in the comple
 The following is the complete [configuration](./assets/configuration.json) content with data description:
 
 ```json
-{
-  "modeConfig": {
-    "initialViewMode": "viewer",	// When initializing the display mode, nsure that the selected mode exists in the availableViewModes. Otherwise, it will default to the viewer mode. Refer to the availableViewModes field for valid values.
-    "availableViewModes": [				// Only modes listed in the mode list will be displayed.
-      "viewer",
-      "annotations",
-      "contentEditor",
-      "forms",
-      "signatures"
-    ]
-  },
-  "toolbarConfig": {							// Top Toolbar Configuration
-    "androidAvailableActions": [
-      "thumbnail",
-      "search",
-      "bota",
-      "menu"
-    ],
-    "iosLeftBarAvailableActions": [
-      "back",
-      "thumbnail"
-    ],
-    "iosRightBarAvailableActions": [
-      "search",
-      "bota",
-      "menu"
-    ],
-    "availableMenus": [
-      "viewSettings",
-      "documentEditor",
-      "documentInfo",
-      "watermark",
-      "security",
-      "flattened",
-      "save",
-      "share",
-      "openDocument"
-    ]
-  },
-  "annotationsConfig": {			// Annotation Feature Configuration
-    "availableTypes": [				// List of enabled annotation types for the bottom annotation functionality
-      "note",
-      "highlight",
-      "underline",
-      "squiggly",
-      "strikeout",
-      "ink",
-      "pencil",								// only ios platform
-      "circle",
-      "square",
-      "arrow",
-      "line",
-      "freetext",
-      "signature",
-      "stamp",
-      "pictures",
-      "link",
-      "sound"
-    ],
-    "availableTools": [				// Annotation tools enabled for the bottom annotation functionality
-      "setting",
-      "undo",
-      "redo"
-    ],
-    "initAttribute": {				// Default properties for annotations upon initialization, influencing attributes such as color, transparency, etc., when adding annotations.
-      "note": {
-        "color": "#1460F3",
-        "alpha": 255					// Color transparency 0~255
-      },
-      "highlight": {
-        "color": "#1460F3",
-        "alpha": 77
-      },
-      "underline": {
-        "color": "#1460F3",
-        "alpha": 77
-      },
-      "squiggly": {
-        "color": "#1460F3",
-        "alpha": 77
-      },
-      "strikeout": {
-        "color": "#1460F3",
-        "alpha": 77
-      },
-      "ink": {
-        "color": "#1460F3",
-        "alpha": 100,
-        "borderWidth": 10
-      },
-      "square": {
-        "fillColor": "#1460F3",
-        "borderColor": "#000000",
-        "colorAlpha" : 128,
-        "borderWidth": 2,
-        "borderStyle": {
-          "style": "solid",				// Border line styles: solid, dashed
-          "dashGap": 0.0					// Dashed line interval length, applicable only when the style is set to 'dashed'.
-        }
-      },
-      "circle": {
-        "fillColor": "#1460F3",
-        "borderColor": "#000000",
-        "colorAlpha" : 128,
-        "borderWidth": 2,
-        "borderStyle": {
-          "style": "solid",
-          "dashGap": 0.0
-        }
-      },
-      "line": {
-        "borderColor": "#1460F3",
-        "borderAlpha": 100,
-        "borderWidth": 5,
-        "borderStyle": {
-          "style": "solid",
-          "dashGap": 0.0
-        }
-      },
-      "arrow": {
-        "borderColor": "#1460F3",
-        "borderAlpha": 100,
-        "borderWidth": 5,
-        "borderStyle": {
-          "style": "solid",
-          "dashGap": 0.0
+  {
+    "modeConfig": {
+      "initialViewMode": "viewer",	// When initializing the display mode, nsure that the selected mode exists in the availableViewModes. Otherwise, it will default to the viewer mode. Refer to the availableViewModes field for valid values.
+      "availableViewModes": [				// Only modes listed in the mode list will be displayed.
+        "viewer",
+        "annotations",
+        "contentEditor",
+        "forms",
+        "signatures"
+      ]
+    },
+    "toolbarConfig": {							// Top Toolbar Configuration
+      "androidAvailableActions": [
+        "thumbnail",
+        "search",
+        "bota",
+        "menu"
+      ],
+      "iosLeftBarAvailableActions": [
+        "back",
+        "thumbnail"
+      ],
+      "iosRightBarAvailableActions": [
+        "search",
+        "bota",
+        "menu"
+      ],
+      "availableMenus": [
+        "viewSettings",
+        "documentEditor",
+        "documentInfo",
+        "watermark",
+        "security",
+        "flattened",
+        "save",
+        "share",
+        "openDocument"
+      ]
+    },
+    "annotationsConfig": {			// Annotation Feature Configuration
+      "availableTypes": [				// List of enabled annotation types for the bottom annotation functionality
+        "note",
+        "highlight",
+        "underline",
+        "squiggly",
+        "strikeout",
+        "ink",
+        "pencil",								// only ios platform
+        "circle",
+        "square",
+        "arrow",
+        "line",
+        "freetext",
+        "signature",
+        "stamp",
+        "pictures",
+        "link",
+        "sound"
+      ],
+      "availableTools": [				// Annotation tools enabled for the bottom annotation functionality
+        "setting",
+        "undo",
+        "redo"
+      ],
+      "initAttribute": {				// Default properties for annotations upon initialization, influencing attributes such as color, transparency, etc., when adding annotations.
+        "note": {
+          "color": "#1460F3",
+          "alpha": 255					// Color transparency 0~255
+        },
+        "highlight": {
+          "color": "#1460F3",
+          "alpha": 77
+        },
+        "underline": {
+          "color": "#1460F3",
+          "alpha": 77
+        },
+        "squiggly": {
+          "color": "#1460F3",
+          "alpha": 77
+        },
+        "strikeout": {
+          "color": "#1460F3",
+          "alpha": 77
+        },
+        "ink": {
+          "color": "#1460F3",
+          "alpha": 100,
+          "borderWidth": 10
+        },
+        "square": {
+          "fillColor": "#1460F3",
+          "borderColor": "#000000",
+          "colorAlpha" : 128,
+          "borderWidth": 2,
+          "borderStyle": {
+            "style": "solid",				// Border line styles: solid, dashed
+            "dashGap": 0.0					// Dashed line interval length, applicable only when the style is set to 'dashed'.
+          }
+        },
+        "circle": {
+          "fillColor": "#1460F3",
+          "borderColor": "#000000",
+          "colorAlpha" : 128,
+          "borderWidth": 2,
+          "borderStyle": {
+            "style": "solid",
+            "dashGap": 0.0
+          }
+        },
+        "line": {
+          "borderColor": "#1460F3",
+          "borderAlpha": 100,
+          "borderWidth": 5,
+          "borderStyle": {
+            "style": "solid",
+            "dashGap": 0.0
+          }
+        },
+        "arrow": {
+          "borderColor": "#1460F3",
+          "borderAlpha": 100,
+          "borderWidth": 5,
+          "borderStyle": {
+            "style": "solid",
+            "dashGap": 0.0
+          },
+          "startLineType": "none",			// Starting arrow style options: none, openArrow, closedArrow, square, circle, diamond.
+          "tailLineType": "openArrow" 	// tail arrow style options
         },
-        "startLineType": "none",			// Starting arrow style options: none, openArrow, closedArrow, square, circle, diamond.
-        "tailLineType": "openArrow" 	// tail arrow style options
-      },
-      "freeText": {
-        "fontColor": "#000000",
-        "fontColorAlpha": 255,
-        "fontSize": 30,
-        "isBold": false,
-        "isItalic": false,
-        "alignment": "left",				// left, center, right
-        "typeface": "Helvetica"			// Courier, Helvetica, Times-Roman
+        "freeText": {
+          "fontColor": "#000000",
+          "fontColorAlpha": 255,
+          "fontSize": 30,
+          "isBold": false,
+          "isItalic": false,
+          "alignment": "left",				// left, center, right
+          "typeface": "Helvetica"			// Courier, Helvetica, Times-Roman
+        }
       }
-    }
-  },
-  "contentEditorConfig": {
-    "availableTypes": [
-      "editorText",
-      "editorImage"
-    ],
-    "availableTools": [
-      "setting",
-      "undo",
-      "redo"
-    ],
-    "initAttribute": {							// Default attributes for text type in content editing, influencing text properties when adding text.
-      "text": {
-        "fontColor": "#000000",
-        "fontColorAlpha" : 100,
-        "fontSize": 30,
-        "isBold": false,
-        "isItalic": false,
-        "typeface": "Times-Roman",	// Courier, Helvetica, Times-Roman
-        "alignment": "left"					// left, center, right
+    },
+    "contentEditorConfig": {
+      "availableTypes": [
+        "editorText",
+        "editorImage"
+      ],
+      "availableTools": [
+        "setting",
+        "undo",
+        "redo"
+      ],
+      "initAttribute": {							// Default attributes for text type in content editing, influencing text properties when adding text.
+        "text": {
+          "fontColor": "#000000",
+          "fontColorAlpha" : 100,
+          "fontSize": 30,
+          "isBold": false,
+          "isItalic": false,
+          "typeface": "Times-Roman",	// Courier, Helvetica, Times-Roman
+          "alignment": "left"					// left, center, right
+        }
       }
-    }
-  },
-  "formsConfig": {
-    "availableTypes": [							// Types of forms displayed in the list of the bottom form toolbar.
-      "textField",
-      "checkBox",
-      "radioButton",
-      "listBox",
-      "comboBox",
-      "signaturesFields",
-      "pushButton"
-    ],
-    "availableTools": [
-      "undo",
-      "redo"
-    ],
-    "initAttribute": {
-      "textField": {
-        "fillColor": "#DDE9FF",
-        "borderColor": "#1460F3",
-        "borderWidth": 2,
-        "fontColor": "#000000",
-        "fontSize": 20,
-        "isBold": false,
-        "isItalic": false,
-        "alignment": "left",				// left, center, right
-        "multiline": true,
-        "typeface": "Helvetica"			// Courier, Helvetica, Times-Roman
-      },
-      "checkBox": {
-        "fillColor": "#DDE9FF",
-        "borderColor": "#1460F3",
-        "borderWidth": 2,
-        "checkedColor": "#43474D",
-        "isChecked": false,
-        "checkedStyle": "check"			// check, circle, cross, diamond, square, star
-      },
-      "radioButton": {
-        "fillColor": "#DDE9FF",
-        "borderColor": "#1460F3",
-        "borderWidth": 2,
-        "checkedColor": "#43474D",
-        "isChecked": false,
-        "checkedStyle": "circle"		// check, circle, cross, diamond, square, star
-      },
-      "listBox": {
-        "fillColor": "#DDE9FF",
-        "borderColor": "#1460F3",
-        "borderWidth": 2,
-        "fontColor": "#000000",
-        "fontSize": 20,
-        "typeface": "Helvetica",		// Courier, Helvetica, Times-Roman
-        "isBold": false,
-        "isItalic": false
-      },
-      "comboBox": {
-        "fillColor": "#DDE9FF",
-        "borderColor": "#1460F3",
-        "borderWidth": 2,
-        "fontColor": "#000000",
-        "fontSize": 20,
-        "typeface": "Helvetica",		// Courier, Helvetica, Times-Roman
-        "isBold": false,
-        "isItalic": false
-      },
-      "pushButton": {
-        "fillColor": "#DDE9FF",
-        "borderColor": "#1460F3",
-        "borderWidth": 2,
-        "fontColor": "#000000",
-        "fontSize": 20,
-        "title": "Button",
-        "typeface": "Helvetica",		// Courier, Helvetica, Times-Roman
-        "isBold": false,
-        "isItalic": false
-      },
-      "signaturesFields": {
-        "fillColor": "#DDE9FF",
-        "borderColor": "#000000",
-        "borderWidth": 2
+    },
+    "formsConfig": {
+      "availableTypes": [							// Types of forms displayed in the list of the bottom form toolbar.
+        "textField",
+        "checkBox",
+        "radioButton",
+        "listBox",
+        "comboBox",
+        "signaturesFields",
+        "pushButton"
+      ],
+      "availableTools": [
+        "undo",
+        "redo"
+      ],
+      "initAttribute": {
+        "textField": {
+          "fillColor": "#DDE9FF",
+          "borderColor": "#1460F3",
+          "borderWidth": 2,
+          "fontColor": "#000000",
+          "fontSize": 20,
+          "isBold": false,
+          "isItalic": false,
+          "alignment": "left",				// left, center, right
+          "multiline": true,
+          "typeface": "Helvetica"			// Courier, Helvetica, Times-Roman
+        },
+        "checkBox": {
+          "fillColor": "#DDE9FF",
+          "borderColor": "#1460F3",
+          "borderWidth": 2,
+          "checkedColor": "#43474D",
+          "isChecked": false,
+          "checkedStyle": "check"			// check, circle, cross, diamond, square, star
+        },
+        "radioButton": {
+          "fillColor": "#DDE9FF",
+          "borderColor": "#1460F3",
+          "borderWidth": 2,
+          "checkedColor": "#43474D",
+          "isChecked": false,
+          "checkedStyle": "circle"		// check, circle, cross, diamond, square, star
+        },
+        "listBox": {
+          "fillColor": "#DDE9FF",
+          "borderColor": "#1460F3",
+          "borderWidth": 2,
+          "fontColor": "#000000",
+          "fontSize": 20,
+          "typeface": "Helvetica",		// Courier, Helvetica, Times-Roman
+          "isBold": false,
+          "isItalic": false
+        },
+        "comboBox": {
+          "fillColor": "#DDE9FF",
+          "borderColor": "#1460F3",
+          "borderWidth": 2,
+          "fontColor": "#000000",
+          "fontSize": 20,
+          "typeface": "Helvetica",		// Courier, Helvetica, Times-Roman
+          "isBold": false,
+          "isItalic": false
+        },
+        "pushButton": {
+          "fillColor": "#DDE9FF",
+          "borderColor": "#1460F3",
+          "borderWidth": 2,
+          "fontColor": "#000000",
+          "fontSize": 20,
+          "title": "Button",
+          "typeface": "Helvetica",		// Courier, Helvetica, Times-Roman
+          "isBold": false,
+          "isItalic": false
+        },
+        "signaturesFields": {
+          "fillColor": "#DDE9FF",
+          "borderColor": "#000000",
+          "borderWidth": 2
+        }
       }
+    },
+    "readerViewConfig": {
+      "linkHighlight": true,
+      "formFieldHighlight": true,
+      "displayMode": "singlePage",		// singlePage, doublePage, coverPage
+      "continueMode": true,
+      "verticalMode": true,
+      "cropMode": false,
+      "themes" : "light",							// light, dark, sepia, reseda
+      "enableSliderBar": true,
+      "enablePageIndicator": true,
+      "pageSpacing": 10,
+      "pageScale": 1.0
     }
-  },
-  "readerViewConfig": {
-    "linkHighlight": true,
-    "formFieldHighlight": true,
-    "displayMode": "singlePage",		// singlePage, doublePage, coverPage
-    "continueMode": true,
-    "verticalMode": true,
-    "cropMode": false,
-    "themes" : "light",							// light, dark, sepia, reseda
-    "enableSliderBar": true,
-    "enablePageIndicator": true,
-    "pageSpacing": 10,
-    "pageScale": 1.0
   }
-}
 ```
 
-
-
 # 4 Support
 
 ## 4.1 Reporting Problems

+ 5 - 5
android/app/build.gradle

@@ -73,9 +73,9 @@ android {
 
     compileSdkVersion rootProject.ext.compileSdkVersion
 
-    namespace "com.compdfkit.pdfviewer"
+    namespace "com.compdfkit.reactnative.example"
     defaultConfig {
-        applicationId "com.compdfkit.pdfviewer"
+        applicationId "com.compdfkit.reactnative.example"
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
         versionCode 4
@@ -111,9 +111,9 @@ dependencies {
     implementation "com.facebook.react:react-native:+"  // From node_modules
     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
 
-    api 'com.compdf:compdfkit:1.13.0-SNAPSHOT'
-    api 'com.compdf:compdfkit-ui:1.13.0-SNAPSHOT'
-    api 'com.compdf:compdfkit-tools:1.13.0-SNAPSHOT'
+    api 'com.compdf:compdfkit:1.13.0'
+    api 'com.compdf:compdfkit-ui:1.13.0'
+    api 'com.compdf:compdfkit-tools:1.13.0'
 
     api 'com.github.bumptech.glide:glide:4.15.1'
     annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'

+ 2 - 1
android/app/src/main/AndroidManifest.xml

@@ -1,5 +1,6 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools">
+    xmlns:tools="http://schemas.android.com/tools"
+    package="com.compdfkit.reactnative.example">
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

+ 1 - 1
android/app/src/main/java/com/compdfkit/pdfviewer/MainActivity.java

@@ -1,4 +1,4 @@
-package com.compdfkit.pdfviewer;
+package com.compdfkit.reactnative.example;
 
 import com.facebook.react.ReactActivity;
 import com.facebook.react.ReactActivityDelegate;

+ 2 - 2
android/app/src/main/java/com/compdfkit/pdfviewer/MainApplication.java

@@ -1,9 +1,9 @@
-package com.compdfkit.pdfviewer;
+package com.compdfkit.reactnative.example;
 
 import android.app.Application;
 
 import com.compdfkit.ReactNativeFlipper;
-import com.compdfkit.pdfviewer.pdf.PDFReactPackage;
+import com.compdfkit.reactnative.example.pdf.PDFReactPackage;
 import com.facebook.react.PackageList;
 import com.facebook.react.ReactApplication;
 import com.facebook.react.ReactNativeHost;

+ 2 - 4
android/app/src/main/java/com/compdfkit/pdfviewer/pdf/OpenPDFModule.java

@@ -7,11 +7,10 @@
  * This notice may not be removed from this file.
  */
 
-package com.compdfkit.pdfviewer.pdf;
+package com.compdfkit.reactnative.example.pdf;
 
 import android.content.Intent;
 import android.net.Uri;
-import android.util.Log;
 
 import androidx.annotation.NonNull;
 
@@ -20,7 +19,6 @@ import com.compdfkit.tools.common.pdf.CPDFConfigurationUtils;
 import com.compdfkit.tools.common.pdf.CPDFDocumentActivity;
 import com.compdfkit.tools.common.pdf.config.CPDFConfiguration;
 import com.compdfkit.tools.common.utils.CFileUtils;
-import com.compdfkit.tools.common.utils.CLog;
 import com.facebook.react.bridge.ReactApplicationContext;
 import com.facebook.react.bridge.ReactContext;
 import com.facebook.react.bridge.ReactContextBaseJavaModule;
@@ -43,7 +41,7 @@ public class OpenPDFModule extends ReactContextBaseJavaModule {
     }
 
     @ReactMethod
-    public void init(String license){
+    public void init_(String license){
         CPDFSdk.init(mReactContext, license, true);
     }
 

+ 1 - 1
android/app/src/main/java/com/compdfkit/pdfviewer/pdf/PDFReactPackage.java

@@ -7,7 +7,7 @@
  * This notice may not be removed from this file.
  */
 
-package com.compdfkit.pdfviewer.pdf;
+package com.compdfkit.reactnative.example.pdf;
 
 import androidx.annotation.NonNull;
 

+ 2 - 6
ios/ComPDFKit_RN.xcodeproj/project.pbxproj

@@ -517,7 +517,7 @@
 					"-ObjC",
 					"-lc++",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.pdfviewer;
+				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.reactnative.example;
 				PRODUCT_NAME = ComPDFKit_RN;
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
 				SUPPORTS_MACCATALYST = NO;
@@ -549,7 +549,7 @@
 					"-ObjC",
 					"-lc++",
 				);
-				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.pdfviewer;
+				PRODUCT_BUNDLE_IDENTIFIER = com.compdfkit.reactnative.example;
 				PRODUCT_NAME = ComPDFKit_RN;
 				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
 				SUPPORTS_MACCATALYST = NO;
@@ -633,8 +633,6 @@
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-Wl",
-					"-Wl",
-					"-ld_classic",
 				);
 				REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
 				SDKROOT = iphoneos;
@@ -708,8 +706,6 @@
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-Wl",
-					"-Wl",
-					"-ld_classic",
 				);
 				REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
 				SDKROOT = iphoneos;

+ 19 - 9
ios/Podfile.lock

@@ -1,8 +1,8 @@
 PODS:
   - boost (1.76.0)
   - CocoaAsyncSocket (7.6.5)
-  - ComPDFKit (1.12.0)
-  - ComPDFKit_Tools (1.12.0)
+  - ComPDFKit (1.13.0)
+  - ComPDFKit_Tools (1.13.0)
   - DoubleConversion (1.1.6)
   - FBLazyVector (0.72.5)
   - FBReactNativeSpec (0.72.5):
@@ -496,8 +496,8 @@ PODS:
 
 DEPENDENCIES:
   - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
-  - ComPDFKit (from `https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/1.12.0.podspec`)
-  - ComPDFKit_Tools (from `https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/1.12.0.podspec`)
+  - ComPDFKit (from `https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git`, tag `1.13.0`)
+  - ComPDFKit_Tools (from `https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git`, tag `1.13.0`)
   - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
   - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
   - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
@@ -583,9 +583,11 @@ EXTERNAL SOURCES:
   boost:
     :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
   ComPDFKit:
-    :podspec: https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit/1.12.0.podspec
+    :git: https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git
+    :tag: 1.13.0
   ComPDFKit_Tools:
-    :podspec: https://www.compdf.com/download/ios/cocoapods/xcframeworks/compdfkit_tools/1.12.0.podspec
+    :git: https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git
+    :tag: 1.13.0
   DoubleConversion:
     :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
   FBLazyVector:
@@ -666,11 +668,19 @@ EXTERNAL SOURCES:
   Yoga:
     :path: "../node_modules/react-native/ReactCommon/yoga"
 
+CHECKOUT OPTIONS:
+  ComPDFKit:
+    :git: https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git
+    :tag: 1.13.0
+  ComPDFKit_Tools:
+    :git: https://github.com/ComPDFKit/compdfkit-pdf-sdk-ios-swift.git
+    :tag: 1.13.0
+
 SPEC CHECKSUMS:
   boost: 57d2868c099736d80fcd648bf211b4431e51a558
   CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
-  ComPDFKit: fa8cf83e29a4a789e3cabd99ab9b63e2a6c56c8e
-  ComPDFKit_Tools: 5b8cf981a8895c55847f9e4933066baa91c9d534
+  ComPDFKit: 50b9d937271422db57cf9abddfbbdb9f20964287
+  ComPDFKit_Tools: 12197116d13ec11c0a10247093dbb1a1d7b59c4d
   DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
   FBLazyVector: 71803c074f6325f10b5ec891c443b6bbabef0ca7
   FBReactNativeSpec: 448e08a759d29a96e15725ae532445bf4343567c
@@ -724,6 +734,6 @@ SPEC CHECKSUMS:
   Yoga: 86fed2e4d425ee4c6eab3813ba1791101ee153c6
   YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
 
-PODFILE CHECKSUM: 4d85fe9fe196d18c488c53ef04e6284a16aac160
+PODFILE CHECKSUM: 9325bffb390fea8dad861bedd4b21755801f153b
 
 COCOAPODS: 1.14.3