This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Dispatcher { | |
associatedtype Output | |
associatedtype Request | |
func execute(request: Request, success: (Output) -> Void, failure: (Error) -> Void) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Dispatcher { | |
func execute(request: URLRequest, success: (Data) -> Void, failure: (Error) -> Void) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// NSManagedObject+ActiveRecord.swift | |
// EventCast | |
// | |
// Created by Lucas Eduardo on 04/11/15. | |
// Copyright © 2015 RNCDev. All rights reserved. | |
// | |
import Foundation | |
import CoreData |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// EventClient.swift | |
// EventCast | |
// | |
// Created by Lucas Eduardo on 27/10/15. | |
// Copyright © 2015 RNCDev. All rights reserved. | |
// | |
import Alamofire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Event.swift | |
// EventCast | |
// | |
// Created by Lucas Eduardo on 27/10/15. | |
// Copyright © 2015 RNCDev. All rights reserved. | |
// | |
import Foundation | |
import CoreData |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ClientConfig.swift | |
// EventCast | |
// | |
// Created by Lucas Eduardo on 27/10/15. | |
// Copyright © 2015 RNCDev. All rights reserved. | |
// | |
import Foundation | |
import Alamofire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
For this Gist, we have two sides: sender and receiver. The same user can be a sender and a receiver, but I will separate this | |
two roles to be more clear. | |
This gist assumes thatyou already have a MCSession created, and the peers are connected, | |
*/ | |
NewerOlder