🚨 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 support two shuffle features for surveys:
1. Shuffle Questions (shuffleQuestions)
The shuffleQuestions field is parsed into the internal PostHogSurveyAppearance model (line 34), but is NOT exposed in the public PostHogDisplaySurveyAppearance model. Neither the built-in UI nor delegate developers can access this setting.
2. Shuffle Options (shuffleOptions)
The shuffleOptions boolean IS exposed on PostHogDisplayChoiceQuestion, but the built-in SwiftUI rendering ignores it. In QuestionTypes.swift, both SingleChoiceQuestionView and MultipleChoiceQuestionView pass question.choices directly to MultipleChoiceOptions(options: question.choices) without checking shuffleOptions or shuffling the choices.
Expected Behavior
- When
survey.appearance.shuffleQuestions is true, questions should be presented in a randomized order (unless enable_partial_responses is true)
- When
question.shuffleOptions is true on a choice question, choices should be randomized (keeping the open-ended choice at end if present)
Reference Implementation
See posthog-js browser: packages/browser/src/extensions/surveys/surveys-extension-utils.tsx
getDisplayOrderQuestions() for question shuffling
getDisplayOrderChoices() for option shuffling
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 support two shuffle features for surveys:
1. Shuffle Questions (
shuffleQuestions)The
shuffleQuestionsfield is parsed into the internalPostHogSurveyAppearancemodel (line 34), but is NOT exposed in the publicPostHogDisplaySurveyAppearancemodel. Neither the built-in UI nor delegate developers can access this setting.2. Shuffle Options (
shuffleOptions)The
shuffleOptionsboolean IS exposed onPostHogDisplayChoiceQuestion, but the built-in SwiftUI rendering ignores it. InQuestionTypes.swift, bothSingleChoiceQuestionViewandMultipleChoiceQuestionViewpassquestion.choicesdirectly toMultipleChoiceOptions(options: question.choices)without checkingshuffleOptionsor shuffling the choices.Expected Behavior
survey.appearance.shuffleQuestionsis true, questions should be presented in a randomized order (unlessenable_partial_responsesis true)question.shuffleOptionsis true on a choice question, choices should be randomized (keeping the open-ended choice at end if present)Reference Implementation
See posthog-js browser:
packages/browser/src/extensions/surveys/surveys-extension-utils.tsxgetDisplayOrderQuestions()for question shufflinggetDisplayOrderChoices()for option shufflingTracking
This is tracked in the survey SDK feature parity issue: PostHog/posthog#45658
This issue was generated by Claude using the
/survey-sdk-auditskill.