This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am piellarda on github. | |
* I am piellarda (https://keybase.io/piellarda) on keybase. | |
* I have a public key ASCTwcCPrVwHX0NZRmHBXgssy6SdtDVNbgpRiK3y2eHbvwo | |
To claim this, I am signing this object: |
This file contains 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
// Objc header | |
@import Realm; | |
@interface Profile : RLMObject | |
@property NSString *name; | |
@end | |
RLM_ARRAY_TYPE(Profile) |
This file contains 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
extension String { | |
static func stringFromBits(bitmask: Int) -> String { | |
var bitmask = bitmask | |
var string = String() | |
for _ in 0...sizeofValue(bitmask) * 8 { | |
string.insert(bitmask & 1 == 1 ? "1" : "0", atIndex: string.startIndex) | |
bitmask >>= 1 | |
} | |
return string | |
} |
This file contains 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
import Foundation | |
import MultipeerConnectivity | |
class MultiPeer: NSObject { | |
private let timestamp = NSDate().timeIntervalSince1970 | |
private let serviceType = "multi-service" | |
private let peerID = MCPeerID(displayName: UIDevice.currentDevice().name) |
This file contains 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
import Foundation | |
private let LastDeviceIDKey = "lastDeviceID" | |
let GoogleCastDeviceDidComeOnlineNotification = "GoogleCastDeviceDidComeOnlineNotification" | |
let GoogleCastDeviceDidGoOfflineNotification = "GoogleCastDeviceDidGoOfflineNotification" | |
@objc protocol GoogleCastControllerDelegate { | |
func viewToCast() -> UIView? |