Wake On Lan on iOS

I have a desktop app that I use to control a device remotely over TCP. I’m in the process of porting the app to iOS. I have most everything working, but I’ve run into a snag with Wake On Lan. I’m using Xojo’s Network.WakeOnLan method on the Mac/Windows/Linux desktop versions, and it works very well. But of course, WakeOnLan is not available for iOS. The WakeOnLan method broadcasts a “Magic Packet” over UDP (Port 9 I believe) that the device detects and turns itself on. I could construct my own Magic Packet (consisting of 6 bytes of &hFF, followed by 16 iterations of the device’s 6-byte MAC address, for a total of 102 bytes). But it must be sent over UDP, and of course, Xojo does not yet have a UDP socket for iOS. I’m aware of Christian’s UDP Socket Kit for iOS, but I really don’t want to pluck down $100 for something that I will use to send one packet only occasionally! I have several free WOL apps on my phone that I use to turn on the device. But it sure would be nice to have it built in to my own app. Has anyone else done a UDP wrapper? Or implemented WOL for iOS?


I don’t think anyone has ever implemented WOL in iOS here.

Here is some objectiveC code to send data through UDP sockets: https://gist.github.com/ratulSharker/3b6bce0debe77fd96344e14566b23e06

The 100$ worth of Christian’s class can be seen this way:
-how much time will it take to convert the above code to Xojo code ?
-how much is your time worth?