0
votes

I am always getting a weird error:-

Use of unresolved identifier 'InstanceID'

I also tried to check by replacing it with FIRInstanceID. but problem error remains the same.

import Firebase

    InstanceID.instanceID().deleteID { error in
        if error != nil{
            completion(ConstantLocalizeString.Something_went_wrong)
        }
     }

pod installed

Firebase (6.22.0)

FirebaseAnalytics (6.4.1)

FirebaseAuth (6.5.1)

FirebaseAuthInterop (1.1.0)

FirebaseCore (6.6.6)

FirebaseCoreDiagnostics(1.2.3)

FirebaseCoreDiagnosticsInterop (1.2.0)

FirebaseDatabase (6.1.4)

FirebaseInstallations(1.1.1)

GTMSessionFetcher (1.3.1)

Gloss (2.1.1)

GoogleAnalytics (3.17.0)

GoogleAppMeasurement (6.4.1)

GoogleDataTransport (5.1.1)

GoogleDataTransportCCTSupport (2.0.2)

GoogleUtilities(6.5.2)

2

2 Answers

1
votes

I guess I found the solution.I missed the pod 'Firebase/Messaging'

Pod I am using are:- pod 'CodableFirebase' pod 'Firebase/Core' pod 'Firebase' pod 'Firebase/Auth' pod 'Firebase/Analytics' pod 'Firebase/Messaging' pod 'Firebase/Database'

Also in the class, I have to replace the import Firebase to import FirebaseInstanceID

0
votes

You might want to take a step back and revisit the code itself and make sure it is doing something you want.

FirebaseInstanceID is in the process of being deprecated and is being replaced by FirebaseInstallations. In past releases, FirebaseInstanceID was installed as a dependency of FirebaseAnalytics, but that is no longer the case.