2

I'm pretty new to programming. Especially to swift. I have many questions. One of them is: How to create a socket server, I think it's called so. Like in minecraft pocket edition or terraria. When you create a server the other person needs to be on the same Wi-Fi. Does someone know how to do that? Is it even called socket? If someone have a Swift source code that let's multiple iPhone's send a string to one iPhone. If the one phone can send back a string or some thing that would be great!

Thanks in advance! //Anton

ntoonio
  • 3,024
  • 4
  • 24
  • 28

2 Answers2

1

If you're still struggling to find anything, this is a useful tutorial i found using swift.

http://www.teehanlax.com/blog/how-to-socket-io-swift/ <----- Check SocketRocket out

Either that or starscream by dalton cherry.

TomTom
  • 899
  • 8
  • 16
  • Welcome to StackOverflow! It is strongly discouraged here to provide answers containing only a link to some other side. You should create an answer specifically addressing OP's problem, and then add the link for further reading. Generally speaking, StackOverflow should be a final stop while looking for an answer. – Darth Hunterix Mar 01 '15 at 23:37
  • If I ask a question and someone can help me, I don't se the problem about helping me in another way than "normal". @DarthHunterix. And thanks Tom, you helped me solve my question – ntoonio Mar 16 '15 at 20:21
  • It's not the question of "a problem" or "not a problem", the point is to distribute knowledge about how this site works among new users so they can create better answers and get more reputation. I wasn't criticizing him, just informing. I received similar comments from more experienced users, that's how it works here :) – Darth Hunterix Mar 17 '15 at 20:32
0

I think you mean a socket based application ,this meaning you connect to a certain socket[port] on a remote device where you are keeping the server running.

RIght now I am working on a simple chat application and I came across this tutorial Server and client tutorial for a chat app and I found it to be really useful.You can do many many things with this example,in my case I implemented more then they are presenting there it's just a matter of knowing what to do.

The downside of this example is that right now I am trying to implement sending a file using the server and I am still facing a lot of issues on the client side so it still needs a lot of improvements

Hope this helps you even a little bit

tudoricc
  • 709
  • 1
  • 12
  • 31
  • Thanks! But is that really swift? For me it look's like Objective-c. I've heard that you can combine swift and objecive-c. Do you know how du do that? – ntoonio Sep 19 '14 at 09:44
  • it's ObjC but you can make it to be swift – tudoricc Sep 19 '14 at 13:05
  • I don;t have any experience in Swift but with this little thing I learned something . And one more thing,I am not the only that has done this tutorial and posted questions of it on stackoverflow – tudoricc Sep 19 '14 at 13:33