Skip to main content

React Native Push Provisioning v4.0.0

· 3 min read

Overview

warning

This version is a major update over v3.0.3 that includes breaking changes in the public interface of the SDK.

Make sure you address these changes by following the instructions in the migration guide at the end of the release notes for this version.

Introduction of a configuration file that is necessary to initialise dependencies. Change to initialisation method of the SDK. Removal of the card brand throughout the SDK since provider-routing is now handled automatically. Migration from event-based to Promise-based APIs.

Key changes:

Cross-platform:

  • New initialization method using UI key instead of auth token
  • Removal of cardBrand parameter from all APIs
  • Migration from event-based to Promise-based APIs
  • Expanded CardStatus enum with additional states
  • Support for Visa cards

Android-specific:

  • Google Wallet manifest metadata requirement

iOS-specific:

  • Device type parameter changes ('all''either')
  • Apple Pay integration enhancements

Compatibility:

React Native: 0.79.1 or newer TypeScript: 4.5.0 or newer

PlatformRequirements
iOSiOS 15.1+, Xcode 16.4+, Swift 5.9+
AndroidMin SDK 24, Compile SDK 35, Target SDK 34, Kotlin 1.8.0+

Migration guide

Mandatory: Adding provisioning_config file

For the correct functioning of the SDK, a configuration file is required to initialise dependencies.

Please contact the support team at support@weavr.io to obtain this file.

Important: The file must be named exactly provisioning_config (no extension) and placed at build time in the appropriate location for each platform:

  • Android: android/app/src/main/res/raw/provisioning_config
  • iOS: Anywhere in iOS bundle (e.g., ios/MyApp/assets/) and added to app and extension targets
note

For detailed instructions on CI injection and bundle verification, see the Setup Guide.

Mandatory: Adding google wallet manifest metadata (Android)

Add the following to your AndroidManifest.xml within the <application> tag:

<application>
<meta-data
android:name="com.google.android.gms.wallet.api.enabled"
android:value="true" />
</application>

Mandatory: Initialising the SDK

Initialise from your app entry point (e.g., App.tsx or index.js):

import { initializeWeavrSDK } from "@weavr-io/push-provisioning-react-native";

export default function App() {
useEffect(() => {
const uiKey = "MY-UI-KEY"; // As obtained via the Weavr portal
return initializeWeavrSDK({ uiKey });
}, []);

return <Main />;
}

Mandatory: API changes

The SDK has moved from event-based callbacks to Promise-based APIs. Additionally, the cardBrand parameter has been removed as routing is now handled automatically.

API differential

DeprecatedReplacementNotes
initWPP(authToken)initializeWeavrSDK({ uiKey })UI key-based initialization.
canAddCardToWallet(pan, brand, type)getCardStatusInWallet(pan, type)Brand removed. Returns Promise.
addCardToWallet(...) + listenerawait addCardToWallet(...)Now returns Promise.

Example: Add card to wallet

// After (v4.0.0) - Promise-based
const result = await addCardToWallet(token, id, pan, holder, desc);
if (result.error) {
// handle error
} else {
// handle success
}

Project setup and secrets

Major Change: Maven Distribution

The SDK is now distributed via Maven repositories instead of manual AAR files. This simplifies setup and enables automatic dependency resolution.

To support the new version, you'll need to:

  1. Obtain Weavr GitHub packages credentials from support.
  2. Configure Maven repositories in your settings.gradle.
  3. Add the provisioning_config file to your project.

For full step-by-step instructions and Gradle snippets, please refer to the Setup Guide


Reference and troubleshooting

Detailed reference material has been moved to the main documentation: