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
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
import XCPlayground | |
class AnimatedView: UIView { | |
let rightLayer: CAShapeLayer = CAShapeLayer() | |
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 CloudKit | |
public enum CloudKitError: Error { | |
case general(String) | |
case emptyresult(String) | |
} | |
public enum CloudKitResult<T, ResultError: Error> { | |
case success(T) | |
case failure(ResultError) |
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 CloudKit | |
public enum CloudKitError: Error { | |
case general(String) | |
} | |
public enum CloudKitResult<T, ResultError: Error> { | |
case success(T) | |
case failure(ResultError) |
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
// | |
// UserProfileImageView.swift | |
// Rezli | |
// | |
// Created by Cory D. Wiles on 7/27/16. | |
// Copyright © 2016 Rezli. All rights reserved. | |
// | |
import Foundation |
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
#!/bin/sh | |
PATH_TO_CONFIGURATIONS="$SRCROOT/../Configurations" | |
FIRServiceAccountDevelopment="$PATH_TO_CONFIGURATIONS/FIRServiceAccounts-Dev.json" | |
FIRServiceAccountRelease="$PATH_TO_CONFIGURATIONS/FIRServiceAccounts-Prod.json" | |
FIRConfigDevelopment="$PATH_TO_CONFIGURATIONS/GoogleService-Info-Dev.plist" | |
FIRConfigRelease="$PATH_TO_CONFIGURATIONS/GoogleService-Info-Prod.plist" |
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
private func listenOnChannel(channel: Firebase, handler: RealTimeDataHandler) -> Void { | |
var initialDataLoaded: Bool = false | |
let firebaseHandleRef: FirebaseHandle = channel.observeEventType(.Value, withBlock: {[unowned self] snapshot in | |
Log.print("listening to the channel from manager and got a response \(snapshot.key) -> \(snapshot.value) and [\(channel.description())]") | |
if !initialDataLoaded { return } | |
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
- (void)executeLocalNotificationWithLaunchHookKey:(NSString *)launchHookKey | |
hookType:(RTVNotificationHookType)hookType | |
userInfo:(NSDictionary *)userInfo { | |
NSDictionary *dict = [self.notificationConfiguration notificationHooks]; | |
NSSet *notificationIgnoreTypes = [self.notificationConfiguration notificationTypesToIgnore]; | |
[dict enumerateKeysAndObjectsUsingBlock:^(NSString *key, id hook, BOOL *stop) { | |
if ([key isEqualToString:launchHookKey] && ![notificationIgnoreTypes containsObject:key]) { |
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
private func execute(launchKey: String, hookType: NotificationHookType, info: Dictionary<String, AnyObject>) -> Void { | |
guard let notificationConfiguration = self.configuration, | |
let notificationHooks = notificationConfiguration.notificationHooks, | |
let ignoreTypes = notificationConfiguration.notificationTypesToIgnore else { return } | |
let hook = notificationHooks.filter({ k, v in k == launchKey && !ignoreTypes.contains(k)}) | |
if !hook.isEmpty { | |
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
/// Iterate and add subviews plus the index value | |
var currentIndex = 0 | |
let updatedIndexes = items.map({ (item: MenuItem) -> MenuItem in | |
item.index += currentIndex | |
item.delegate = self | |
currentIndex++ |
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
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { | |
RTVLog(@"decidePolicyForNavigationAction %@", navigationAction); | |
if (navigationAction.navigationType == WKNavigationTypeOther) { | |
NSURL *url = navigationAction.request.URL; | |
UIApplication *app = [UIApplication sharedApplication]; | |
if ([[url scheme] isEqualToString:RabbleURLScheme]) { |