getExperiment never returns null. When the customer is not in the experiment, isEnrolled is false, variantKey is null, and every typed getter (boolValue, stringValue, intValue, doubleValue with a default, and get(key) for JSON payloads) returns your default — so control renders with no null-check or cast. The raw nullable assignment is .assignment (or getExperimentAssignment).
Use assignments for:
- paywall variants
- onboarding route tests
- offer emphasis tests
- holdout groups
Safe pattern
- Configure AppActor.
- Fetch offerings or Remote Config if the screen needs them.
- Resolve the experiment assignment.
- Render the variant in React Native.
- Gate access from customer entitlements.
Identity and cleanup
Re-resolve assignment afterlogIn, logOut, or reset. Do not carry a previous user’s assignment into a new customer session.
Launch Experiments
Read the product-level experiment launch checklist.