diff --git a/FlagShip/Source/Core/FSVisitor+objc.swift b/FlagShip/Source/Core/FSVisitor+objc.swift index 2bd5c8b2..0e420ecd 100644 --- a/FlagShip/Source/Core/FSVisitor+objc.swift +++ b/FlagShip/Source/Core/FSVisitor+objc.swift @@ -7,28 +7,22 @@ import Foundation -extension FSVisitor{ - +public extension FSVisitor { /// For Objective C Project, use the functions below to send Events /// See https://developers.flagship.io/ios/#hit-tracking /// - /// Get Flag only visible for objective C, use func getFlag(key:String, defaultValue : T?)->FSFlag with generic @available(swift, obsoleted: 1.0) - @objc public func getFlag(key:String, defaultValue : Any?)->FSFlag{ - + @objc func getFlag(key: String, defaultValue: Any?) -> FSFlag { /// Check the key if exist guard let modification = self.currentFlags[key] else { - - return FSFlag(key,nil, defaultValue, self.strategy) + return FSFlag(key, nil, defaultValue, self.strategy) } - return FSFlag(key,modification, defaultValue, self.strategy) - + return FSFlag(key, modification, defaultValue, self.strategy) } - /** Send Transaction event @@ -37,21 +31,23 @@ extension FSVisitor{ */ /// sendTransactionEvent only visible for objective C, use sendHit @available(swift, obsoleted: 1.0) - @objc public func sendTransactionEvent(_ transacEvent: FSTransaction) { - + @objc func sendTransactionEvent(_ transacEvent: FSTransaction) { self.sendHit(transacEvent) } /** Send Page event - @param pageEvent : Page event - */ + /// sendPageEvent only visible for objective C, use sendHit + @available(swift, obsoleted: 1.0) + @objc func sendPageEvent(_ pageEvent: FSPage) { + self.sendHit(pageEvent) + } + /// sendScreenEvent only visible for objective C, use sendHit @available(swift, obsoleted: 1.0) - @objc public func sendScreenEvent(_ screenEvent: FSScreen) { - + @objc func sendScreenEvent(_ screenEvent: FSScreen) { self.sendHit(screenEvent) } @@ -63,8 +59,7 @@ extension FSVisitor{ */ /// sendItemEvent only visible for objective C, use sendHit @available(swift, obsoleted: 1.0) - @objc public func sendItemEvent(_ itemEvent: FSItem) { - + @objc func sendItemEvent(_ itemEvent: FSItem) { self.sendHit(itemEvent) } @@ -76,8 +71,7 @@ extension FSVisitor{ */ /// sendEventTrack only visible for objective C, use sendHit @available(swift, obsoleted: 1.0) - @objc public func sendEventTrack(_ eventTrack: FSEvent) { - + @objc func sendEventTrack(_ eventTrack: FSEvent) { self.sendHit(eventTrack) } }