Created
November 8, 2018 03:34
-
-
Save banjun/80e0ccc22bf45a839815f17ff17fb35d to your computer and use it in GitHub Desktop.
silence network comm of firebase to https://device-provisioning.googleapis.com/checkin
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
| final class FakeFirebaseInstanceID: NSObject { | |
| @objc class func instanceID() -> FakeFirebaseInstanceID? { return nil } | |
| static private let once: Void = { | |
| method_exchangeImplementations( | |
| class_getClassMethod(NSClassFromString("FIRInstanceID"), #selector(FakeFirebaseInstanceID.instanceID))!, | |
| class_getClassMethod(FakeFirebaseInstanceID.self, #selector(FakeFirebaseInstanceID.instanceID))!) | |
| }() | |
| static func silenceFirebaseCheckin() { | |
| _ = once | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment