Hi,
Yes, its the receiving part from server code. I am able to receive from server so i did not show it here.
Currently,
From Swiftui, I can receive continuously from JSON (Server) side and can only send the message once from SwiftUI to JSON when the network is connected.
Im stuck at the part where whenever I click the button on swiftui, it will send a fixed msg. Continuous.
I created the function in the final class but when i write it in the button`s (action: sendMsg), the xcode says
"Cannot find 'sendMsg' in scope'. I tried creating the send function outside of the class and I got a lot of error.
I am new to Xcode.
How do I create the function globally? So that the content view will recognise my function that is in the final class init?