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
| // Target Class | |
| class Sample: NSObject { | |
| @objc var id: Int = 0 | |
| @objc var name: String? = nil | |
| var test: String? = nil | |
| } | |
| // Swift Style | |
| let element = Sample() | |
| let mirror = Mirror(reflecting: element) |
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
| // | |
| // WebView.swift | |
| // | |
| import UIKit | |
| import SwiftUI | |
| import Combine | |
| import WebKit | |
| class WebViewController: NSObject, ObservableObject, WKNavigationDelegate { |
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
| public class FirebaseUserIdTokenInterceptor implements Interceptor { | |
| // Custom header for passing ID token in request. | |
| private static final String X_FIREBASE_ID_TOKEN = "YOUR-CUSTOM-HEADER"; | |
| @Override | |
| public Response intercept(Chain chain) throws IOException { | |
| Request request = chain.request(); | |
| try { | |
| FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser(); |
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
| // <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
| // | |
| public interface DownloadListener { | |
| void onProgress(float progress); | |
| void onDone(); | |
| void onError(Exception e); | |
| } |