react-native-docusign 2.0.0 → 2.0.1
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 +6 -0
- package/README.md +5 -1
- package/android/build.gradle +1 -0
- package/android/consumer-rules.pro +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- **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.
|
|
8
|
+
|
|
3
9
|
## 2.0.0
|
|
4
10
|
|
|
5
11
|
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
|
@@ -114,11 +114,15 @@ The DocuSign native SDKs are **NOT bundled** inside this npm package. They are d
|
|
|
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
|
|
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