react-native-doc-viewer
react-native-doc-viewer copied to clipboard
[iOS][Local] You must override the `supportedEvents
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
I look at this.
Having this issue as well on RN 0.51. @philipphecht Any guidance on how this can be fixed?
@philipphecht Updated RN to 0.54, still having this issue
@hammadj @batical did you figure it out ?
@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
+1 any updates? @philipphecht