TCP socket on iOS ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
TCP socket on iOS ?
Can I use sockets on iPad apps. I have an app where I want to transfer a .csv file from Mac to an iPad. I thought I would use a TCP server/client connection to do this. The dictionary does indicate that the Open Socket command should work on iOS. I managed to get it to work somewhat in the simulator but not on the iPad as such. I figure it might be working in the simulator because it is local to the computer. Not sure.. just a thought.
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: TCP socket on iOS ?
Is it a secure socket? I believe Apple requires that these days.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: TCP socket on iOS ?
Thanks for pointing that out. I'll give that a try.
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
Re: TCP socket on iOS ?
I have tried to use Open secure socket command, but it no longer responds to my Write commands. (I'm still trying to get it to work in the IDE and not an iOS standalone yet). I also tried adding Accept secure connections command at the server side, but no luck. The socket is indeed opened according to "the OpenSockets", but I cannot communicate between client and server when I add secure to the commands. Do I have to encrypt and decrypt the data when using secure sockets ? This secure thing is all new to me..
thanks,
Richard
thanks,
Richard
Last edited by raugert on Mon Feb 11, 2019 6:25 pm, edited 1 time in total.
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: TCP socket on iOS ?
Does your server have an SSL certificate in place, such as those maintanable for free with the Let's Encrypt package?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: TCP socket on iOS ?
Hi Richard,
My you have quick response !
No I haven't added an SSL certificate to the server side (It's just a simple livecode server stack). I will have to do a bit more reading to find out how to do this.
thanks for your guidance,
Richard
My you have quick response !
No I haven't added an SSL certificate to the server side (It's just a simple livecode server stack). I will have to do a bit more reading to find out how to do this.
thanks for your guidance,
Richard
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
Re: TCP socket on iOS ?
I have used sockets to transfer a photo and didn't have to use a secure socket
am using iOS version 11.2.1 on my phone
I have not tried it on an iPad but I don't see why it would be different
am using iOS version 11.2.1 on my phone
I have not tried it on an iPad but I don't see why it would be different
-
- VIP Livecode Opensource Backer
- Posts: 9837
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: TCP socket on iOS ?
My understanding is that new submissions to the Apple app store require that any web protocols require HTTPS, rather than the non-encrypted HTTP.
How this affects apps already in their app store, and how vigorously the policy is enforced, I can't say.
How this affects apps already in their app store, and how vigorously the policy is enforced, I can't say.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: TCP socket on iOS ?
well my testing has been done here on my machine and iPhone
I have not done any on a published app
also I didn't use http, just pure binary data stream using sockets
I have not done any on a published app
also I didn't use http, just pure binary data stream using sockets
Re: TCP socket on iOS ?
I am able to transfer binary images to ipad using sockets, as long as the files don’t exceed 60kb or so. If they are larger, the transfer doesn’t work on iPad but works fine on local computer. Have you succeeded with larger file transfers? I think it might have something to do with MTU (Maximum Transmission Unit) when transferring to iPad ? Do I have to send the files in chunks or something of the sort ? I’m sure I’m missing something..
Thank-you anyone for any advice
Richard
Thank-you anyone for any advice
Richard
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0