Capacitor Test Plugin Project
-- This project can be used to test out the functionality of your plugin. Nothing in the example/ folder - will be published to npm when using this template, so you can create away! -
- - - -SSLCertificateCheckerOptions
|
+**Returns:** Promise<SSLCertificateCheckerResult>
-checkCertificate(options: SSLCertificateCheckerOptions) => Promise{ /** * The subject of the certificate * @platform Android */ subject?: string; /** * The issuer of the certificate * @platform Android */ issuer?: string; /** * The valid from date of the certificate * @platform Android */ validFrom?: string; /** * The valid to date of the certificate * @platform Android */ validTo?: string; /** * The fingerprint of the certificate * @platform Android */ fingerprint?: string; /** * Whether the fingerprint matches the expected fingerprint */ fingerprintMatched?: boolean; /** * The error that occurred while checking the certificate */ error?: string; }
-| Param | Type |
-| ------------- | ----------------------------------------- |
-| **`options`** | SSLCertificateCheckerOptions
|
-**Returns:** Promise<SSLCertificateCheckerResult>
+#### SSLCertificateCheckerOptions
----
+{ url: string; fingerprint: string; }
diff --git a/android/src/main/java/com/tonybluckdruck/certificatechecker/SSLCertificateChecker.java b/android/src/main/java/com/tonybluckdruck/certificatechecker/SSLCertificateChecker.java
index 3f98cd1..b5bcfe2 100644
--- a/android/src/main/java/com/tonybluckdruck/certificatechecker/SSLCertificateChecker.java
+++ b/android/src/main/java/com/tonybluckdruck/certificatechecker/SSLCertificateChecker.java
@@ -1,4 +1,4 @@
-// android/src/main/java/com/your/plugin/CertificateChecker.java
+// android/src/main/java/com/your/plugin/CapacitorSslPinning.java
package com.tonybluckdruck.certificatechecker;
diff --git a/example/.gitignore b/example/.gitignore
deleted file mode 100644
index 1818ee6..0000000
--- a/example/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.idea/
-node_modules/
-.vscode/
-*.map
-.DS_Store
-.sourcemaps
-dist/
diff --git a/example/README.md b/example/README.md
deleted file mode 100644
index 486ed63..0000000
--- a/example/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-## Created with Capacitor Create App
-
-This app was created using [`@capacitor/create-app`](https://github.com/ionic-team/create-capacitor-app),
-and comes with a very minimal shell for building an app.
-
-### Running this example
-
-To run the provided example, you can use `npm start` command.
-
-```bash
-npm start
-```
diff --git a/example/android/.gitignore b/example/android/.gitignore
deleted file mode 100644
index 48354a3..0000000
--- a/example/android/.gitignore
+++ /dev/null
@@ -1,101 +0,0 @@
-# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
-
-# Built application files
-*.apk
-*.aar
-*.ap_
-*.aab
-
-# Files for the ART/Dalvik VM
-*.dex
-
-# Java class files
-*.class
-
-# Generated files
-bin/
-gen/
-out/
-# Uncomment the following line in case you need and you don't have the release build type files in your app
-# release/
-
-# Gradle files
-.gradle/
-build/
-
-# Local configuration file (sdk path, etc)
-local.properties
-
-# Proguard folder generated by Eclipse
-proguard/
-
-# Log Files
-*.log
-
-# Android Studio Navigation editor temp files
-.navigation/
-
-# Android Studio captures folder
-captures/
-
-# IntelliJ
-*.iml
-.idea/workspace.xml
-.idea/tasks.xml
-.idea/gradle.xml
-.idea/assetWizardSettings.xml
-.idea/dictionaries
-.idea/libraries
-# Android Studio 3 in .gitignore file.
-.idea/caches
-.idea/modules.xml
-# Comment next line if keeping position of elements in Navigation Editor is relevant for you
-.idea/navEditor.xml
-
-# Keystore files
-# Uncomment the following lines if you do not want to check your keystore files in.
-#*.jks
-#*.keystore
-
-# External native build folder generated in Android Studio 2.2 and later
-.externalNativeBuild
-.cxx/
-
-# Google Services (e.g. APIs or Firebase)
-# google-services.json
-
-# Freeline
-freeline.py
-freeline/
-freeline_project_description.json
-
-# fastlane
-fastlane/report.xml
-fastlane/Preview.html
-fastlane/screenshots
-fastlane/test_output
-fastlane/readme.md
-
-# Version control
-vcs.xml
-
-# lint
-lint/intermediates/
-lint/generated/
-lint/outputs/
-lint/tmp/
-# lint/reports/
-
-# Android Profiling
-*.hprof
-
-# Cordova plugins for Capacitor
-capacitor-cordova-android-plugins
-
-# Copied web assets
-app/src/main/assets/public
-
-# Generated Config files
-app/src/main/assets/capacitor.config.json
-app/src/main/assets/capacitor.plugins.json
-app/src/main/res/xml/config.xml
diff --git a/example/android/app/.gitignore b/example/android/app/.gitignore
deleted file mode 100644
index 043df80..0000000
--- a/example/android/app/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/build/*
-!/build/.npmkeep
diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
deleted file mode 100644
index 4d1354d..0000000
--- a/example/android/app/build.gradle
+++ /dev/null
@@ -1,54 +0,0 @@
-apply plugin: 'com.android.application'
-
-android {
- namespace "com.example.plugin"
- compileSdk rootProject.ext.compileSdkVersion
- defaultConfig {
- applicationId "com.example.plugin"
- minSdkVersion rootProject.ext.minSdkVersion
- targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- aaptOptions {
- // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
- // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
- ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
- }
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
-}
-
-repositories {
- flatDir{
- dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
- }
-}
-
-dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
- implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
- implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
- implementation project(':capacitor-android')
- testImplementation "junit:junit:$junitVersion"
- androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
- androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
- implementation project(':capacitor-cordova-android-plugins')
-}
-
-apply from: 'capacitor.build.gradle'
-
-try {
- def servicesJSON = file('google-services.json')
- if (servicesJSON.text) {
- apply plugin: 'com.google.gms.google-services'
- }
-} catch(Exception e) {
- logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
-}
diff --git a/example/android/app/capacitor.build.gradle b/example/android/app/capacitor.build.gradle
deleted file mode 100644
index c330334..0000000
--- a/example/android/app/capacitor.build.gradle
+++ /dev/null
@@ -1,21 +0,0 @@
-// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
-
-android {
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_17
- targetCompatibility JavaVersion.VERSION_17
- }
-}
-
-apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
-dependencies {
- implementation project(':capacitor-camera')
- implementation project(':capacitor-splash-screen')
- implementation project(':certificate-checker')
-
-}
-
-
-if (hasProperty('postBuildExtras')) {
- postBuildExtras()
-}
diff --git a/example/android/app/proguard-rules.pro b/example/android/app/proguard-rules.pro
deleted file mode 100644
index f1b4245..0000000
--- a/example/android/app/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# Add project specific ProGuard rules here.
-# You can control the set of applied configuration files using the
-# proguardFiles setting in build.gradle.
-#
-# For more details, see
-# http://developer.android.com/guide/developing/tools/proguard.html
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-# public *;
-#}
-
-# Uncomment this to preserve the line number information for
-# debugging stack traces.
-#-keepattributes SourceFile,LineNumberTable
-
-# If you keep the line number information, uncomment this to
-# hide the original source file name.
-#-renamesourcefileattribute SourceFile
diff --git a/example/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java b/example/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java
deleted file mode 100644
index f2c2217..0000000
--- a/example/android/app/src/androidTest/java/com/getcapacitor/myapp/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.getcapacitor.myapp;
-
-import static org.junit.Assert.*;
-
-import android.content.Context;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
-import androidx.test.platform.app.InstrumentationRegistry;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * @see Testing documentation
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
-
- @Test
- public void useAppContext() throws Exception {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
-
- assertEquals("com.getcapacitor.app", appContext.getPackageName());
- }
-}
diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 4d7ca38..0000000
--- a/example/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-- This project can be used to test out the functionality of your plugin. Nothing in the example/ folder - will be published to npm when using this template, so you can create away! -
- - - -