-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracker RichMedia refresh never sent #108
Comments
Hi, Can you share some parts of your tagging code ? |
I created a sample code that reproduces our issue import Tracker
class ATInternetDebug {
let tracker: Tracker
lazy var mediaPlayer: MediaPlayer = tracker.mediaPlayers.add()
let queue = DispatchQueue(label: "analytics")
var audio: RichMedia?
init() {
tracker = ATInternet.sharedInstance.tracker(AppConstants.ATInternet.trackerName,
configuration: AppConstants.ATInternet.trackerConfiguration)
tracker.enableDebugger = true
setupRichMedia()
}
func setupRichMedia() {
audio = mediaPlayer.media.add("label",
mediaTheme1: "theme1",
mediaTheme2: "theme2",
mediaType: "type",
duration: 42)
}
func sendPlay() {
queue.sync {
audio?.sendPlay(dynamicRefreshConfiguration: [0: 10])
}
}
} I tested it by calling // With this one I don't get the refresh events
DispatchQueue.global().async {
self.atDebugger.sendPlay()
}
// With this one I get the refresh events
DispatchQueue.main.async {
self.atDebugger.sendPlay()
} I only have the refresh events when calling my function on main thread. In both case at timer initialisation (DynamicRefresh.swift L29) we are on our custom serial queue (analytics). Hope this can help |
Hum, the problem is SDK is not safe for concurrent use and global() queue use concurrency unfortunately |
The events are sent by our player which is on another DispatchQueue, it will never be sent on the main thread. This is why in my sample I dispatched on global(). In my sendPlay() func I dispatch on my "analytics" serial queue, this should work doesn't it? |
Hello,
We are using AtInternet/Tracker to track RichMedia events. As advised in the documentation we send event synchronously on an Analytics Queue.
Recently we experienced issues with the refresh events, they are no longer sent.
In DynamicRefresh.swift I set breakpoints in start() and process(). It stops in start but process() is never executed.
It seems we encounter this issue since we updated to Xcode 12.
A workaround is to send the sendPlay(dynamicRefreshConfiguration: ) on MainThread.
The text was updated successfully, but these errors were encountered: