React Native와 PushNotificationIOS를 테스트하는 것이 처음입니다. 하지만 checkpermission 콜이 안드로이드에서 오류를 일으키고 있습니다.안드로이드에서 React Native의 iOS 전용 구성 요소를 올바르게 사용하는 방법
ExceptionsManager.js:61 Cannot read property 'checkPermissions' of undefined
나는 iOS에서만 구성 요소를 사용해야하기 때문에 이것을 추측하고 있습니다. iOS에서만 전화를 걸려면 OS 검사를 어떻게 추가합니까?
componentWillMount: function() {
//-- need an OS check here??
PushNotificationIOS.checkPermissions((data)=> {
console.log("in comp will mount: checking for permission")
console.log(data.alert)
console.log(data.badge)
나는 아래 AKADER의 대답에 동의하지만, 다른 장소에서 당신이 원 - 수행해야하는 경우 off Platform 모듈에서 Platform 모듈에 대한 설명서를 확인해야합니다. https://facebook.github.io/react-native/docs/platform-specific-code.html –