Skip to content

Commit

Permalink
fix(iOS): migrate from depracated websocket method in RCTCxxInspector…
Browse files Browse the repository at this point in the history
…WebSocketAdapter (#47197)

Summary:
Saw this while going through the remaining warnings of the project. I double checked, and i can't find any other usages left behind, so this is probably the last one

## Changelog:

[INTERNAL] [FIXED] - Switch to using the new sendString method for Websocket

Pull Request resolved: #47197

Test Plan:
yarn test:
<img width="933" alt="Screenshot 2024-10-25 at 00 55 58" src="https://github.com/user-attachments/assets/dbfebb90-4957-4fc9-8a90-153c03055ac9">
Running the tests in Xcode with `CMD+U` or the objc-test: I could not get it to pass in either the old code or the modified code. I know the test documentation said it needs a WebSocket, but it was a bit too vague , and even turning metro on did not help, so i have no idea how to test it. If anyone can guide me on that one, please let me know

Reviewed By: blakef

Differential Revision: D64934981

Pulled By: cipolleschi

fbshipit-source-id: c6f13d3da5aafe3eed8b99b98f04904fcdcc4115
  • Loading branch information
TheRogue76 authored and facebook-github-bot committed Oct 25, 2024
1 parent 94fdc38 commit 795a21a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ - (void)send:(std::string_view)message
dispatch_async(dispatch_get_main_queue(), ^{
RCTCxxInspectorWebSocketAdapter *strongSelf = weakSelf;
if (strongSelf) {
[strongSelf->_webSocket send:messageStr];
[strongSelf->_webSocket sendString:messageStr error:NULL];
}
});
}
Expand Down

0 comments on commit 795a21a

Please sign in to comment.