react-native-doc-viewer icon indicating copy to clipboard operation
react-native-doc-viewer copied to clipboard

[iOS][Local] You must override the `supportedEvents

Open batical opened this issue 7 years ago • 6 comments

The following case scenario is working fine on android, but have issue on iOS. I can load pdf from a Server url with issue.

"react-native-doc-viewer": "^2.7.3" "react-native": "^0.51.0",

I am generating a content in PDF using a conversion html to pdf using the following library (https://github.com/christopherdro/react-native-html-to-pdf)

It is saved under ilePath: "/var/mobile/Containers/Data/Application/3A6E498D-E…A11B-4940F040BA27/Documents/ResultSimulation.pdf"

I am trying to display it using your library, (using the path without file://, or using react-native-fs like the example) but the app is crashing and I got those logs from xCode

The breakpoint issue is in the RNRactNativeDocViewer.m file in the function hitServerForUrl on the creation of the defaultSession

*** Assertion failure in +[RCTEventEmitter initialize](), 
...node_modules/react-native/React/Modules/RCTEventEmitter.m:29
2018-01-13 18:56:42.260616+0100[1954:887806] 
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', 
reason: 'You must override the `supportedEvents` method of fir_0x1c667a100_RNReactNativeDocViewer

I tried to look about this issue but I am kind of lost. Any idea ?

thanks

PS : the pdf exist and correctly generated because I am able to send it by email

batical avatar Jan 13 '18 18:01 batical

I look at this.

philipphecht avatar Jan 15 '18 07:01 philipphecht

Having this issue as well on RN 0.51. @philipphecht Any guidance on how this can be fixed?

META-DREAMER avatar Mar 22 '18 00:03 META-DREAMER

@philipphecht Updated RN to 0.54, still having this issue

META-DREAMER avatar Apr 02 '18 01:04 META-DREAMER

@hammadj @batical did you figure it out ?

amitbravo avatar Apr 30 '18 14:04 amitbravo

@amitbravo no I am stuck with an old version i have to modify code because some compilation error. I am trying right now but seems I still have the issue

I have the same issue with online file I am downloading.

Funny thing is that it is happening only on my staging target ... (xxxDev) and not on the production target (xxx) but I can't figure the difference except the name ... :o

batical avatar May 16 '18 14:05 batical

+1 any updates? @philipphecht

scanifydevo avatar Nov 08 '18 20:11 scanifydevo