From 7569b021c30680e5fb3d39e335ef7064c471685e Mon Sep 17 00:00:00 2001 From: "Gustavo H. Strassburger" Date: Thu, 2 Apr 2026 18:37:27 -0300 Subject: [PATCH] Update iOS remote config tutorial to use getFeatureFlagResult MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- contents/tutorials/ios-remote-config.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contents/tutorials/ios-remote-config.md b/contents/tutorials/ios-remote-config.md index 15aaa5674883..2edec7e6b4e8 100644 --- a/contents/tutorials/ios-remote-config.md +++ b/contents/tutorials/ios-remote-config.md @@ -89,7 +89,7 @@ Now, let's set up the remote config flag in PostHog to control our welcome messa To show that message, let's create a simple UI in `ContentView.swift` that displays it. This requires: - A basic view with a text element to display our message -- A `getFeatureFlagPayload()` call to fetch our remote config value +- A `getFeatureFlagResult()` call to fetch our remote config value - A default message fall back if the remote config isn't available - A refresh button to reload the message if we change the remote config @@ -123,7 +123,8 @@ struct ContentView: View { } private func loadWelcomeMessage() { - if let message = PostHogSDK.shared.getFeatureFlagPayload("welcome-message") as? String { + let result = PostHogSDK.shared.getFeatureFlagResult("welcome-message") + if let message = result?.payload as? String { welcomeMessage = message } else { welcomeMessage = "Welcome to the app!"