DyScan
  • DyScan Integration Guide
  • iOS Integration Guide
  • Android Integration Guide
  • React Native Integration Guide
  • Cordova Integration Guide
  • Integrity Verification
  • Migrating from card.io
    • Migrating from card.io (iOS)
    • Migrating from card.io (Android)
  • Integrating with Stripe
    • Integrating with Stripe (iOS)
    • Integrating with Stripe (Android)
  • Alternate Ways to Integrate iOS
    • Integrating with Swift Package Manager
    • Integrating with Carthage
    • Integrating as a Framework
  • Alternate Ways To Integrate Android
    • Manually Importing the Library
    • Using DyScanView
  • MIGRATING FROM 1.0.X TO 1.1.X
    • Migrating from 1.0.x to 1.1.x (iOS)
    • Migrating from 1.0.x to 1.1.x (Android)
    • Migrating from 1.0.x to 1.1.x (React Native)
Powered by GitBook
On this page
  • Removing API key setter
  • Initializing DyScan

Was this helpful?

  1. MIGRATING FROM 1.0.X TO 1.1.X

Migrating from 1.0.x to 1.1.x (React Native)

In version 1.1.1 we change the way of initializing DyScan and setting up the API key.

Removing API key setter

Depending on the way which you chose to use DyScan, you will need to remove following lines.

DyScanModule.scanCard({
  // apiKey:'YOUR_API_KEY'
})
.then(card => {

})
.catch(() => {

})
render() {
  return (
    <View>
      <DyScanView
        onCardScanned={this.onCardScanned}
        // apiKey={'YOUR_API_KEY'}
      />
    </View>
  );
}

Initializing DyScan

In your App.js add the following line to configure DyScan.

import React from 'react';
import {DyScan} from '@dyneti/react-native-dyscan';

const App: () => React$Node = () => {

  DyScan.init({
    apiKey: 'YOUR_API_KEY',
  });

  // some code here
};

export default App;
PreviousMigrating from 1.0.x to 1.1.x (Android)

Last updated 4 years ago

Was this helpful?