I am trying to add facebook app events, and I installed FacebookSDK. Then I have next code:
import FacebookCore
static func logViewContentEvent(contentType : String, contentData : String, contentId : String, currency : String, price : Double) {
let params : AppEvent.ParametersDictionary = [
.contentType : contentType,
.content : contentData,
.contentId : contentId,
.currency : currency
]
let event = AppEvent(name: .viewedContent, parameters: params, valueToSum: price)
AppEventsLogger.log(event)
}
But I get error from the title. What I am doing wrong, and why this type is missing?
from Adding App Events in iOS app produces undeclared identifier 'AppEvent'
No comments:
Post a Comment