I have an Expo app and want to use Pusher Channels
There was react-native sdk in pusher-js
library - https://github.com/pusher/pusher-js/tree/master/react-native but it seems to be deprecated, and it is recomended to use official SDK package - https://github.com/pusher/pusher-websocket-react-native
But i'm facing the error bellow while trying to load my app
Error: The package 'pusher-websocket-react-native' doesn't seem to be linked. Make sure:
- You rebuilt the app after installing the package
- You are not using Expo managed workflow
, js engine: hermes
package.json:
"@pusher/pusher-websocket-react-native": "^1.2.1",
connection:
import { Pusher } from '@pusher/pusher-websocket-react-native'
const pusher = Pusher.getInstance()
...
in useEffect:
pusher.init({
apiKey: 'KEY',
cluster: 'eu',
useTLS: true,
// authEndpoint: api.USER_PUSHER_AUTHENTIFICATION
})
I guess that this sdk is not supported by Expo.
I also tried to use pusher-js/react-native
with different versions, but app fails without error, just many symbols in console
Is there any workaround to use Pusher channels with Expo?