Product Benefits Pricing Guides Docs About Contact us Try it out
Performance

PostHog iOS Data Mode Deprecation Tracking

PostHog iOS data mode tracking: migrate off the deprecated cellular option and measure upload behaviour by network type before 4.0.

· 3 min read

A setting that does not do what its name says is a trap. In the PostHog iOS SDK, PostHogDataMode.cellular sounds like it limits uploads to mobile data. In practice it already behaved like .any, so teams who chose it believed they had a rule that was never enforced.

Version 3.90.0 deprecates the cellular mode. Use .any instead. It is due to be removed in 4.0, which means any code still referencing it will eventually fail to compile.

The risk is not the rename itself. It is the assumption behind it. If your data-saving policy relied on that setting, your real network behaviour has never matched your intent, and your cost and battery numbers may reflect that.

Data Points to Track

  • data_mode_config: the mode set at SDK initialisation
  • network_type: wifi, cellular, ethernet or offline at flush time
  • flush_count_by_network: uploads per network type per session
  • bytes_uploaded: payload volume sent over each network type
  • flush_failure_rate: failed uploads per network type
  • queue_depth: events waiting when the app moves to the background
  • sdk_version: to track who has upgraded
  • low_data_mode: whether iOS Low Data Mode is on
  • app_version: the build in use

Setup Steps

  1. Search your codebase for PostHogDataMode.cellular and any wrapper that sets it.
  2. Replace it with .any after upgrading to 3.90.0 or later, and clear the deprecation warning.
  3. Decide your real policy. If you want wifi-only uploads for large payloads such as replay, enforce it yourself and not through this setting.
  4. Add the network type as a property on a periodic diagnostic event.
  5. Measure bytes by network for two weeks to see the true baseline.
  6. Compare the baseline with your assumptions about cellular usage.
  7. Track the SDK version so you know when it is safe to rely on 4.0 behaviour.

Actionable Insights

If cellular uploads are a large share of bytes, your users may be paying for analytics traffic. Consider batching more aggressively or deferring heavy payloads.

A higher failure rate on cellular means retries are consuming battery. Tune flush intervals and queue limits before changing anything else.

When queue depth is high at backgrounding, you risk losing events on termination. Flushing earlier solves this more reliably than restricting networks.

Use the baseline to set an honest budget. Explaining data usage in your privacy notes is easier when you can quote measured figures.

Finally, tell your wider team. Product managers and privacy reviewers may have documented the old setting as a safeguard, and those documents should be corrected to match what the app really does.

Common Pitfalls

Do not swap the value and move on. Removing the warning does not change behaviour, since the old setting was already equivalent. The useful work is deciding what you actually want and measuring it.