MobbSign Cordova: Capacitor integration
Capacitor is supported by the MobbSign Cordova plugin, from v3.5.0. In order to add it to your integration, you must follow these steps:
Add the following line in your
.npmrc
file in the root of your project (if it does not exist, just create it empty)://registry.npmjs.org/:_authToken=the-provided-token
Run the following command in the root of your Cordova project:
WARNING: This step will take several minutes because it downloads both the Android and iOS SDKs.
$ npm install @mobbeel/mobbsign-cordova-plugin@^3.5.0
- After that, you will have the MobbSign Cordova plugin installed on your webapp. Now you just have to synchronize Capacitor:
$ npx cap sync
Alternatively, you can create the Android/iOS native projects at this point, if you haven't yet:
$ npx cap add Android
$ npx cap add iOS
After this, you will have the MobbSign plugin installed in both of your native projects.
iOS considerations
As Capacitor does not use hooks, you must add to your Xcode project the needed interface that the plugin provides, for signing the documents. You will find the files in the Capacitor plugin folder, as you can see in the picture below:
You must add these files to the same target that the rest of the plugin file are:
With this, you will have the project ready.