Skip to content

Instantly share code, notes, and snippets.

View 1amageek's full-sized avatar
🎈
🥺🥺🥺🥺🥺🥺🥺🥺🥺🥺🥺

1amageek 1amageek

🎈
🥺🥺🥺🥺🥺🥺🥺🥺🥺🥺🥺
View GitHub Profile
@1amageek
1amageek / FirestoreMonitoring.swift
Created August 19, 2020 09:56
Count Cloud Firestore Reads
//
// FirestoreMonitoring.swift
// Monitor
//
// Created by nori on 2020/08/19.
// Copyright © 2020 1amageek. All rights reserved.
//
import Foundation
import FirebaseFirestore
@1amageek
1amageek / AppDelegate.swift
Created November 4, 2020 08:19
Adding Firebase to AppDelegate in SwiftUI
import SwiftUI
import Firebase
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
return true
}
}
@propertyWrapper public struct Supported<Value> {
private var status: Status
private var valueWhenUnsupported: Value
public init(valueWhenUnsupported: Value) {
self.status = Status(isSupported: false, value: valueWhenUnsupported)
self.valueWhenUnsupported = valueWhenUnsupported
}
@1amageek
1amageek / MessageView.swift
Last active February 1, 2022 07:42
Message UI Sample Code
//
// ContentView.swift
// Message
//
// Created by 1amageek on 2022/02/01.
//
import SwiftUI
struct Transcript: Identifiable, Codable, Hashable {