I have used Facebook AppEvents in which I am getting error:-
AppEvents.logEvent(.completedRegistration, parameters: [AppEvents.ParameterName.registrationMethod.rawValue: "customerId"])
I have used Facebook AppEvents in which I am getting error:-
AppEvents.logEvent(.completedRegistration, parameters: [AppEvents.ParameterName.registrationMethod.rawValue: "customerId"])
AppEventsclass from Facebook is now singleton class, so to use the methods ofAppEventsclass you have to add shared between class and method name so solution for this is use:Instead of using
AppEvents.logEventuseAppEvents.shared.logEvent.Also, please remove
.rawValueto avoid errorCannot convert '[String : Any]' to expected argument type '[AppEvents.ParameterName : Any]'.You can check this answer.