Skip to content

Instantly share code, notes, and snippets.

@roytornado
roytornado / AppDelegate.swift
Last active December 17, 2018 05:57
iOS Remote Notification
import UIKit
import Firebase
import UserNotifications
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
static var shared: AppDelegate { return UIApplication.shared.delegate as! AppDelegate }
@roytornado
roytornado / Clap.swift
Created July 25, 2017 06:22
Flow Example
@IBAction func confirm() {
var dataBucket = [String: Any]()
if dataHolder.addedImages.count >= 1 {
dataBucket["images"] = dataHolder.addedImages
}
if let audioUrl = dataHolder.audioUrl {
dataBucket["targetAudioUrlForUpload"] = audioUrl
dataBucket["targetAudioDurationForUpload"] = "\(dataHolder.audioDuration)"
}
if DataUtils.isValidString(src: inputTextView.text) {