Open jwells89 opened 1 year ago
Hi @jwells89 , Thank you for reporting this. I'll investigate this issue and come back with a patch.
Hi @jwells89, I examined the behavior of automatic event sending when searcher.eventTracker.isEnabled is set to false, and it functions as intended by preventing the capture of new events. The events you observe in the logs might occur because of events that were already stored in memory before disabling event tracking. These events could have been captured during previous app sessions since they are stored persistently in the device's memory.
Describe the bug 🐛 At least when instantsearch-core is added to a project with the SPM package via Xcode, there doesn't seem to be a functional way of disabling Insights. I couldn't find any documentation on the topic, and the two places I found seemingly relevant functionality (
Insights.shared?.isActive
andHitsSearcher.eventTracker.isEnabled
) don't change anything when set tofalse
— in the Xcode console I still see messages like, "[InstantSearchInsights] sending events package".To Reproduce 🔍 Steps to reproduce the behavior:
Insights.shared?.isActive = false
HitsSearcher
withsearcher.eventTracker.isEnabled = false
Expected behavior 💭 Insights shouldn't do anything after it's been disabled.
Environment: