cmcewen / react-native-gcm-ios

iOS GCM for React Native
MIT License
15 stars 3 forks source link

GcmIOS.addListener is not a function #1

Closed ericsanjaya closed 8 years ago

ericsanjaya commented 8 years ago

i have problem with react-native-gcm-ios. i follow instruction but i have error GcmIOS.addListener is not a function. can some one tell me what wrong? have someone succes use react-native-gcm-ios? i install using pod like article link in readme.

i use react native 0.19

after couple of hour i solve it by editing index.ios.js file : at the end line (65) of file i change 'export default GcmIOS' to 'module.exports = GcmIOS'

mybe this can help other

cmcewen commented 8 years ago

Are you using a different .babelrc in your project?

ericsanjaya commented 8 years ago

@cmcewen no, i dont use .babelrc, and i don't know what it .babelrc

cmcewen commented 8 years ago

@ericsanjaya try import GcmIOS from 'react-native-gcm-ios' - I updated the docs

ericsanjaya commented 8 years ago

@cmcewen it worked well, thanks for your hard work