AB#292767 fix: stopDispatchTimer starting the timer when called off the main thread - #144
Open
eligutovsky wants to merge 2 commits into
Open
AB#292767 fix: stopDispatchTimer starting the timer when called off the main thread#144eligutovsky wants to merge 2 commits into
eligutovsky wants to merge 2 commits into
Conversation
Copy/pasted block had wrong method name.
There was a problem hiding this comment.
Pull request overview
This PR fixes a threading bug in the OptiTrack dispatch-timer shutdown path: calling stopDispatchTimer() off the main thread previously routed to startDispatchTimer(), unintentionally starting the timer instead of stopping it. It also bumps the SDK patch version to 6.8.1 and records the fix in the changelog.
Changes:
- Fix
OptiTrack.stopDispatchTimer()to correctly stop the timer when invoked off the main thread by re-dispatching to main and callingstopDispatchTimer()(notstartDispatchTimer()). - Bump CocoaPods spec versions and
SDKVersionto 6.8.1. - Add a 6.8.1 changelog entry describing the fix.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| OptimoveSDK/Sources/Classes/Components/OptiTrack/OptiTrack.swift | Fixes off-main-thread timer stop logic to prevent accidentally starting the dispatch timer. |
| OptimoveSDK.podspec | Bumps OptimoveSDK pod version to 6.8.1. |
| OptimoveNotificationServiceExtension.podspec | Bumps Notification Service Extension pod version to 6.8.1. |
| OptimoveCore/Sources/Classes/Constants/SDKVersion.swift | Updates SDKVersion constant to 6.8.1. |
| OptimoveCore.podspec | Bumps OptimoveCore pod version to 6.8.1. |
| CHANGELOG.md | Adds 6.8.1 entry documenting the timer-stop fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
eligutovsky
added a commit
that referenced
this pull request
Aug 5, 2026
6.8.1 is already claimed by the pending stopDispatchTimer fix (PR #144), so this takes the next patch number rather than colliding with it in the changelog.
This was referenced Aug 5, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
OptiTrack.stopDispatchTimer()calledstartDispatchTimer()when invoked off the mainthread, so every off-main stop started the dispatch timer instead of stopping it.
func stopDispatchTimer() { guard Thread.isMainThread else { DispatchQueue.main.sync { - self.startDispatchTimer() + self.stopDispatchTimer() } return }This is a cherry-pick of
10aabcc1(Christopher Wyllie, 2022-04-29) from thefix-dispatch-timerbranch, which was never merged. Original authorship is preserved.The branch it sat on is 208 commits behind
master; the single-line change cherry-pickscleanly onto current
master.Second commit bumps the patch version to 6.8.1.
Breaking Changes
Release Checklist
Prepare:
pod lib lintpassesBump versions in:
OptimoveCore.podspecOptimoveNotificationServiceExtension.podspecOptimoveSDK.podspecOptimoveCore/Sources/Classes/Constants/SDKVersion.swiftREADME.md— n/a, contains no version referenceCHANGELOG.mdUpdate major version numbers in wiki (basic integration + push guides) — n/a, patch release
Integration tests
Unit tests run locally on the
UnitTestsscheme (iPhone 15, iOS 17.5): 75 tests,0 failures. Manual integration checklist below not exercised — the change is confined
to timer invalidation on the event-dispatch path.
T&T Only
Mobile Only
Deferred Deep Links
Combined
Release:
pod trunk pushto publish to CocoaPodsPost Release: