Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.0.1

### Fixes

- **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.

## 2.0.0

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.
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,15 @@ The DocuSign native SDKs are **NOT bundled** inside this npm package. They are d

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.

### Minified release builds (R8)

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.

### What ships inside this package

- TypeScript source + type definitions
- Swift + Kotlin bridge source files
- Podspec and gradle config
- Podspec, gradle config and R8 consumer rules
- Config plugin compiled output
- README, CHANGELOG, LICENSE

Expand Down
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ android {
targetSdkVersion safeExtGet("targetSdkVersion", 35)
versionCode 1
versionName "1.0.5"
consumerProguardFiles 'consumer-rules.pro'
}

buildFeatures {
Expand Down
8 changes: 8 additions & 0 deletions android/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Gson fills com.docusign.esign.model fields by reflection, and DocuSign's
# sdk-esign-api JAR ships no keep rules. Keeping the whole esign package
# fails R8 on the missing org.apache.oltu classes, so only the models.
-keep class com.docusign.esign.model.** { *; }

# DocuSignError.native.domain carries the Android exception class name.
# Keeps this module's names readable when the app obfuscates.
-keepnames class expo.modules.docusign.**
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-docusign",
"version": "2.0.0",
"version": "2.0.1",
"description": "React Native / Expo native module wrapping DocuSign iOS and Android SDKs for in-app captive signing",
"main": "build/index.js",
"types": "build/index.d.ts",
Expand Down
Loading