react-native-layerkit icon indicating copy to clipboard operation
react-native-layerkit copied to clipboard

Layer.connect is not a function

Open nnmer opened this issue 9 years ago • 4 comments

Hi,

Trying to get it work, but getting Layer.connect is not a function. following the manual added pod etc... then:

const CONFIG = require('./config') ;
const Layer = require('react-native-layerkit');
Layer.connect(
    CONFIG.LAYER.APP_ID,
    (error, success) => {
        if (error) {
            console.log('login error',error);
            //go to main screen
        }
        else {
            console.log('connect success',success);
            //handle error
        }
    }
)

what is wrong?

nnmer avatar Jul 02 '16 16:07 nnmer

Have you properly linked the React Native LayerKit project in XCode?

nlively avatar Jul 02 '16 17:07 nlively

i think so. did everything as said in the manual.

rn is v0.27.2

nnmer avatar Jul 02 '16 17:07 nnmer

I have the same problem, any updates?

_reactNativeLayerkit2.default.connect is not a function

ranpaco avatar Jul 20 '16 21:07 ranpaco

Fix with

import { RNLayerKit } from 'react-native-layerkit';

ranpaco avatar Jul 21 '16 18:07 ranpaco