Ind.ie is now Small Technology Foundation.
Commit 28aaac34 authored by Stefan van den Oord's avatar Stefan van den Oord

Fixed Swift compatibility

parent a978e478
......@@ -6,7 +6,7 @@ extension Greeter
{
class Sender
{
@objc class AbstractSender : NSObject
@objc class AbstractSender : NSObject, GCDAsyncUdpSocketDelegate
{
var socket:GCDAsyncUdpSocket? = nil
var port:UInt16
......@@ -65,7 +65,7 @@ extension Greeter
func startTimer()
{
self.timer = NSTimer.scheduledTimerWithTimeInterval(announcementInterval, target: self, selector: Selector("timerFired"), userInfo: nil, repeats: true)
self.timer = NSTimer.scheduledTimerWithTimeInterval(announcementInterval, target: self, selector: #selector(timerFired), userInfo: nil, repeats: true)
}
func timerFired() {
......
......@@ -34,7 +34,7 @@ public class LocalDevice: NSObject {
onConnection: ConnectionHandler,
onMessage: MessageHandler,
onError: ErrorHandler) {
tls.secureSocket(socket, remoteDeviceId: remoteDeviceId, localIdentity: localIdentity) { (Bool success) in
tls.secureSocket(socket, remoteDeviceId: remoteDeviceId, localIdentity: localIdentity) { (success) in
if success {
onConnection(SocketConnection(socket: self.socket, onMessage: onMessage, onError: onError))
} else {
......
......@@ -14,7 +14,7 @@ public class Luhn {
for character in alphabet.characters {
characterToCodepoint[character] = codepoint
codepointToCharacter[codepoint] = character
codepoint++
codepoint += 1
}
self.emulateWrongAlgorithm = emulateWrongAlgorithm
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment