epubjs-react-native
epubjs-react-native copied to clipboard
Not Opening on real device
Been experiencing issue of opening epub on IOS device on an emulator the it easily works but when on a real device it does not open any help is highly appreciated
please see the installation steps in specific Info.plist section https://github.com/victorsoares96/epubjs-react-native?tab=readme-ov-file#installation
i am using this versions "@epubjs-react-native/core": "1.4.0-beta.45", "@epubjs-react-native/file-system": "^1.1.2", "react-native": "0.72.12", "react-native-webview": "^13.8.5", "react-native-gesture-handler": "^2.16.0",
and i add
try run npx pod-install
in your ios directory again after add LSSupportsOpeningDocumentsInPlace key
and use @epubjs-react-native/core: "1.4.1
Is this version have injectjavascript function? Also when i try npx pod install my system ask me a path . So do u have any idea on which path should i give
@victorsoares96
Yeah, this version have injectJs and contains the fix for this issue.. about pod install you can run npx pod-install ios
inside root of your react native project, the first argument after npx pod-install
is a path where project ios files are located
I'm developing with expo and facing the same issue on iOS. It works fine when the src is a remote file but not when it's local.
Try to add key mentioned above in expo app.json, see more in expo docs:
{
"ios": {
"infoPlist": {
"LSSupportsOpeningDocumentsInPlace": true
}
}
}
https://docs.expo.dev/guides/permissions/#ios
And if you use expo managed project with expo-document-picker try to use this:
const { assets } = await DocumentPicker.getDocumentAsync({ copyToCacheDirectory: false });
Adding LSSupportsOpeningDocumentsInPlace
to info.plist and setting copyToCacheDirectory
to false on iOS worked. Thanks.
awesome! i'll close this issue, the author can reopen if need