react-native-docusign 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +34 -17
- package/android/build.gradle +1 -0
- package/android/consumer-rules.pro +8 -0
- package/ios/ReactNativeDocuSign.podspec +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.2
|
|
4
|
+
|
|
5
|
+
### Native SDKs
|
|
6
|
+
|
|
7
|
+
- **iOS**: DocuSign iOS SDK 4.3.0 to 4.4.0. For some accounts, DocuSign now returns recipient view URLs such as `https://apps-d.docusign.com/authenticate?code=...` instead of a `Signing/MTRedeem` URL. DocuSign 4.3.0 only opens `Signing/MTRedeem` URLs, so `presentCaptiveSigningWithUrl` rejected these with a `DocuSignError` whose message contains `has invalid captive signing url`. DocuSign 4.4.0 opens both, and lists the fix as "Captive (embedded) signing fails to launch for certain accounts". It raises the SDK's minimum to iOS 15.0, below this module's 15.1. A project with a committed `Podfile.lock` needs `pod update DocuSign`.
|
|
8
|
+
|
|
9
|
+
## 2.0.1
|
|
10
|
+
|
|
11
|
+
### Fixes
|
|
12
|
+
|
|
13
|
+
- **Android**: the module ships R8 keep rules for the models in DocuSign's `sdk-esign-api`. DocuSign's own rules cover `com.docusign.androidsdk` only, so an app with minification on lost the fields Gson fills on those models, and login and captive signing failed at runtime without a crash at launch. The rules reach the app through `consumerProguardFiles`, so an app can delete any DocuSign keep rules it added itself.
|
|
14
|
+
|
|
3
15
|
## 2.0.0
|
|
4
16
|
|
|
5
17
|
Upgrading from 1.x: every failure now rejects with a `DocuSignError`. Check any code that branches on `error.code`, matches message text, handles `status: 'error'` from `presentCaptiveSigning*`, or reads `errorCode` in an `addSigningErrorListener` callback. Codes are the lowercase codes the README documents, on both platforms, where iOS previously emitted `ERR_`-prefixed variants and Android rejected most failures as `signing_failed`. The new Android `launchStrategy` is opt-in. Both native SDKs also move forward, see [Native SDKs](#native-sdks) for what that changes in your app.
|
package/README.md
CHANGED
|
@@ -94,7 +94,7 @@ The React Native layer never renders any of the signing UI. It only triggers the
|
|
|
94
94
|
|
|
95
95
|
| Platform | Minimum OS | SDK version | Language |
|
|
96
96
|
| -------- | -------------------- | -------------------------- | ----------- |
|
|
97
|
-
| iOS | 15.1 | DocuSign iOS SDK 4.
|
|
97
|
+
| iOS | 15.1 | DocuSign iOS SDK 4.4.0 | Swift 5.9 |
|
|
98
98
|
| Android | API 24 (Android 7.0) | DocuSign Android SDK 2.1.7 | Kotlin 2.1+ |
|
|
99
99
|
|
|
100
100
|
**Runtime requirements:**
|
|
@@ -107,18 +107,22 @@ The React Native layer never renders any of the signing UI. It only triggers the
|
|
|
107
107
|
|
|
108
108
|
The DocuSign native SDKs are **NOT bundled** inside this npm package. They are declared as external dependencies and resolved at consumer build time:
|
|
109
109
|
|
|
110
|
-
- **iOS**: the `DocuSign` pod (`~> 4.
|
|
110
|
+
- **iOS**: the `DocuSign` pod (`~> 4.4.0`) from the public CocoaPods trunk, declared by this package's podspec
|
|
111
111
|
- **Android**: `com.docusign:androidsdk:2.1.7` from DocuSign's Maven repository (the config plugin adds the repo automatically)
|
|
112
112
|
|
|
113
113
|
### Android Glide collision workaround
|
|
114
114
|
|
|
115
115
|
DocuSign's `com.docusign:sdk-pdf:2.1.7` AAR ships a pre-generated `com.bumptech.glide.GeneratedAppGlideModuleImpl.class` that collides at dex time with any other Glide-based library in the host app (notably `expo-image`, `react-native-fast-image`, and similar). To avoid this without redistributing DocuSign's binary, the Expo Config Plugin downloads `sdk-pdf-2.1.7.aar` directly from DocuSign's public Maven during `expo prebuild`, verifies its SHA-256 against a pinned hash, removes the offending class from the AAR's `classes.jar` in-memory, and writes the stripped artifact to `node_modules/react-native-docusign/android/libs/`. The module's `android/build.gradle` references it by file path at consumer build time. The download is cached after the first run; corrupted or partial caches are detected and regenerated. SHA mismatch or fetch failure aborts `expo prebuild` with an actionable error rather than silently letting the Android build fail later at the dex step.
|
|
116
116
|
|
|
117
|
+
### Minified release builds (R8)
|
|
118
|
+
|
|
119
|
+
Apps with `minifyEnabled` (for Expo, `expo-build-properties` `android.enableMinifyInReleaseBuilds`) need no DocuSign keep rules of their own from 2.0.1. The module's `android/consumer-rules.pro` reaches the app's R8 configuration through `consumerProguardFiles` and keeps `com.docusign.esign.model.**`, the Gson models in DocuSign's `sdk-esign-api` JAR. DocuSign's own rules cover `com.docusign.androidsdk` only, so without it R8 strips the model fields and login and captive signing fail at runtime. The module's class names are also kept, so `DocuSignError.native.domain` stays readable in an obfuscated build.
|
|
120
|
+
|
|
117
121
|
### What ships inside this package
|
|
118
122
|
|
|
119
123
|
- TypeScript source + type definitions
|
|
120
124
|
- Swift + Kotlin bridge source files
|
|
121
|
-
- Podspec and
|
|
125
|
+
- Podspec, gradle config and R8 consumer rules
|
|
122
126
|
- Config plugin compiled output
|
|
123
127
|
- README, CHANGELOG, LICENSE
|
|
124
128
|
|
|
@@ -255,9 +259,9 @@ async function signAgreement() {
|
|
|
255
259
|
try {
|
|
256
260
|
const result = await DocuSign.presentCaptiveSigning({
|
|
257
261
|
envelopeId: session.envelopeId,
|
|
258
|
-
recipientUserName: session.
|
|
259
|
-
recipientEmail: session.
|
|
260
|
-
recipientClientUserId: session.
|
|
262
|
+
recipientUserName: session.recipientName,
|
|
263
|
+
recipientEmail: session.recipientEmail,
|
|
264
|
+
recipientClientUserId: session.clientUserId,
|
|
261
265
|
});
|
|
262
266
|
|
|
263
267
|
if (result.status === 'completed') {
|
|
@@ -511,7 +515,19 @@ function SigningScreen() {
|
|
|
511
515
|
const session = await fetchSigningSessionFromYourBackend();
|
|
512
516
|
|
|
513
517
|
// Hook handles loginWithAccessToken + presentCaptiveSigning + state transitions
|
|
514
|
-
const result = await startSigning(
|
|
518
|
+
const result = await startSigning({
|
|
519
|
+
type: 'session',
|
|
520
|
+
accessToken: session.accessToken,
|
|
521
|
+
accountId: session.accountId,
|
|
522
|
+
userId: session.userId,
|
|
523
|
+
userName: session.userName,
|
|
524
|
+
email: session.email,
|
|
525
|
+
host: session.host,
|
|
526
|
+
envelopeId: session.envelopeId,
|
|
527
|
+
recipientUserName: session.recipientName,
|
|
528
|
+
recipientEmail: session.recipientEmail,
|
|
529
|
+
recipientClientUserId: session.clientUserId,
|
|
530
|
+
});
|
|
515
531
|
|
|
516
532
|
if (result.status === 'completed') {
|
|
517
533
|
// Navigate to confirmation
|
|
@@ -564,9 +580,9 @@ const result = await startSigning({
|
|
|
564
580
|
email: sessionFromBackend.email,
|
|
565
581
|
host: sessionFromBackend.host,
|
|
566
582
|
envelopeId: sessionFromBackend.envelopeId,
|
|
567
|
-
recipientUserName: sessionFromBackend.
|
|
568
|
-
recipientEmail: sessionFromBackend.
|
|
569
|
-
recipientClientUserId: sessionFromBackend.
|
|
583
|
+
recipientUserName: sessionFromBackend.recipientName,
|
|
584
|
+
recipientEmail: sessionFromBackend.recipientEmail,
|
|
585
|
+
recipientClientUserId: sessionFromBackend.clientUserId,
|
|
570
586
|
});
|
|
571
587
|
```
|
|
572
588
|
|
|
@@ -785,9 +801,9 @@ async function signMultipleDocuments(documents: Document[]) {
|
|
|
785
801
|
await DocuSign.loginWithAccessToken(session);
|
|
786
802
|
const result = await DocuSign.presentCaptiveSigning({
|
|
787
803
|
envelopeId: session.envelopeId,
|
|
788
|
-
recipientUserName: session.
|
|
789
|
-
recipientEmail: session.
|
|
790
|
-
recipientClientUserId: session.
|
|
804
|
+
recipientUserName: session.recipientName,
|
|
805
|
+
recipientEmail: session.recipientEmail,
|
|
806
|
+
recipientClientUserId: session.clientUserId,
|
|
791
807
|
});
|
|
792
808
|
results.push(result);
|
|
793
809
|
|
|
@@ -813,9 +829,9 @@ async function signMultipleDocumentsSafe(documents: Document[]) {
|
|
|
813
829
|
await DocuSign.loginWithAccessToken(session);
|
|
814
830
|
const result = await DocuSign.presentCaptiveSigning({
|
|
815
831
|
envelopeId: session.envelopeId,
|
|
816
|
-
recipientUserName: session.
|
|
817
|
-
recipientEmail: session.
|
|
818
|
-
recipientClientUserId: session.
|
|
832
|
+
recipientUserName: session.recipientName,
|
|
833
|
+
recipientEmail: session.recipientEmail,
|
|
834
|
+
recipientClientUserId: session.clientUserId,
|
|
819
835
|
});
|
|
820
836
|
results.push(result);
|
|
821
837
|
|
|
@@ -955,7 +971,8 @@ The module uses `appContext.activityProvider.currentActivity` to get the current
|
|
|
955
971
|
| This package version | Expo SDK | React Native | iOS SDK | Android SDK |
|
|
956
972
|
| -------------------- | -------- | ------------ | ------------------ | ---------------------- |
|
|
957
973
|
| 1.0.x | 55.x | 0.82.x | DocuSign iOS 4.1.1 | DocuSign Android 2.1.4 |
|
|
958
|
-
| 2.0.
|
|
974
|
+
| 2.0.0–2.0.1 | 55.x+ | 0.85.x+ | DocuSign iOS 4.3.0 | DocuSign Android 2.1.7 |
|
|
975
|
+
| 2.0.2 | 55.x+ | 0.85.x+ | DocuSign iOS 4.4.0 | DocuSign Android 2.1.7 |
|
|
959
976
|
|
|
960
977
|
## Limitations
|
|
961
978
|
|
package/android/build.gradle
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Gson fills com.docusign.esign.model fields by reflection, and DocuSign's
|
|
2
|
+
# sdk-esign-api JAR ships no keep rules. Keeping the whole esign package
|
|
3
|
+
# fails R8 on the missing org.apache.oltu classes, so only the models.
|
|
4
|
+
-keep class com.docusign.esign.model.** { *; }
|
|
5
|
+
|
|
6
|
+
# DocuSignError.native.domain carries the Android exception class name.
|
|
7
|
+
# Keeps this module's names readable when the app obfuscates.
|
|
8
|
+
-keepnames class expo.modules.docusign.**
|
package/package.json
CHANGED