Comments (5)
Don't know what you are doing wrong here. Did you get it working?
from react-native-signalr.
@joyceljy
Didn't see you have join group function.
from react-native-signalr.
@olofd I got the same issue,
From the C# backend, I'm using method Clients.Group(roomName).addMessage(...);
to send message to a group.
From the React-Native, i invoke a method to join a group and listen callback addMessage
.
The callback addMessage
never fired even i triggered from the api while the browser is working.
If i run the app from the react-native command $ react-native run-ios
, it's working perfectly
But when i try to run from xCode (Both Debug and Release), it's not working.
EDIT:
I found out when i turn the remote debug on, it will work. Otherwise, it wont
from react-native-signalr.
I managed to fixed this issue, please see my package
https://www.npmjs.com/package/%40nois%2Freact-native-signalr
Check example.js
file in github for example code
from react-native-signalr.
Hi,
Im using Azure as server.And my environment is as follows:
Client 1: Web browser with Signalr JS installed
Client 2: React-native appServer:
Asp.net C# Server with SignalrWhen a client invoke a message , people in the group will receive messages.
My web browser(Client1) received message successfully but my react-native app (Client2) didn't.`
componentDidMount() {const connection = signalr.hubConnection('http://signalrpj.azurewebsites.net'); connection.logging = true; const proxy = connection.createHubProxy('chatHub'); proxy.on('addMessage', (message1) => { console.log('message-from-server Group', message1); if (message1 == 'openMindwavePage') { proxy.invoke('send', this.props.login_account, 'haveOpened'); this.props.MindWave(); connection.stop(); } }); connection.start().done(() => { proxy.invoke('group', 'this.props.login_account'); console.log('Now connected, connection ID=' + connection.id); }).fail(() => { console.log('Failed'); }); }`
Please help ,Thanks
Joyce
Duplicate of ##52 (comment)
from react-native-signalr.
Related Issues (20)
- how can change state from on(event) HOT 1
- .NET core 2.0 support
- How is reconnection handled? HOT 3
- IOS - SignalR Connection break when app move in background. HOT 4
- Does it support Net Core 2.1 or later?
- get 'undefined' from server in invoke
- cannot receive message HOT 1
- Timer Error HOT 1
- Try specifying a different transport or none at all for auto initialization.
- How to send token or other data HOT 3
- Signal R not working with ANDROID STORE VERSION
- Unable to call signalR method
- Replace deprecated dependency ms-signalr-client HOT 1
- Failed - Error: Error during negotiation request. HOT 3
- Autoreconnect feature HOT 1
- TypeError: Cannot set property userAgent of #<Navigator> which has only a getter HOT 1
- hello
- Forgotten Package
- On Screen Change, Event Is Still fired HOT 7
- is this lib dead? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-signalr.