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!"