🚨 IMPORTANT
This issue is likely user-facing in the main PostHog app, see surveyVersionRequirements.ts. If you delete or close this issue, be sure to update the version requirements list here.
Summary
The posthog-ios SDK does not implement the survey popup delay (surveyPopupDelaySeconds). The field is parsed but never used.
Current State
- The
surveyPopupDelaySeconds field exists on PostHogSurveyAppearance model (PostHog/Models/Surveys/PostHogSurveyAppearance.swift:35) as TimeInterval?
- The
showNextSurvey() method in PostHogSurveyIntegration.swift immediately renders the survey via DispatchQueue.main.async with no delay
- The field is correctly parsed from JSON (verified by test at
PostHogSurveysTest.swift:55)
Expected Behavior
When survey.appearance.surveyPopupDelaySeconds is set to a value > 0:
- The survey should not be rendered immediately
- Instead, it should be delayed by the specified number of seconds
- Surveys should be sorted by their delay value (shorter delays first)
Reference Implementation
See posthog-js browser: packages/browser/src/extensions/surveys.tsx — _handlePopover() method which uses setTimeout for the delay.
Tracking
This is tracked in the survey SDK feature parity issue: PostHog/posthog#45658
This issue was generated by Claude using the /survey-sdk-audit skill.
🚨 IMPORTANT
This issue is likely user-facing in the main PostHog app, see
surveyVersionRequirements.ts. If you delete or close this issue, be sure to update the version requirements list here.Summary
The posthog-ios SDK does not implement the survey popup delay (
surveyPopupDelaySeconds). The field is parsed but never used.Current State
surveyPopupDelaySecondsfield exists onPostHogSurveyAppearancemodel (PostHog/Models/Surveys/PostHogSurveyAppearance.swift:35) asTimeInterval?showNextSurvey()method inPostHogSurveyIntegration.swiftimmediately renders the survey viaDispatchQueue.main.asyncwith no delayPostHogSurveysTest.swift:55)Expected Behavior
When
survey.appearance.surveyPopupDelaySecondsis set to a value > 0:Reference Implementation
See posthog-js browser:
packages/browser/src/extensions/surveys.tsx—_handlePopover()method which usessetTimeoutfor the delay.Tracking
This is tracked in the survey SDK feature parity issue: PostHog/posthog#45658
This issue was generated by Claude using the
/survey-sdk-auditskill.