Outpost Community Demo

Mobile developer here — embedding Outpost in a React Native webview

By danthedev ·

Hey folks! I'm Daniel, mobile developer working on a fitness app. We're adding a community section to our React Native app using Outpost's embed in a WebView.

So far it's working surprisingly well. The embed mode strips the outer chrome and navigation, so it feels native-ish inside the WebView. SSO was key — our users log in through the app and we pass the token to the embed so they never see a login screen.

Still working on:

  • Deep linking from push notifications into specific topics
  • Making the WebView height dynamic based on content

Anyone else doing mobile embedding? Would love to compare notes.

3 replies

jmpk ·

This is exactly what I want to do! Can you share how you're handling the WebView setup? Are you using react-native-webview or something else? And does the realtime WebSocket stuff work inside the WebView?

danthedev ·

Yeah using react-native-webview. WebSocket works fine — real-time updates show up inside the WebView just like in a browser.

For height, I'm using the outpost-resize message that the embed sends to the parent window. In RN:

onMessage={(event) => {
  const data = JSON.parse(event.nativeEvent.data);
  if (data.type === "outpost-resize") {
    setWebViewHeight(data.height);
  }
}}

Works great for dynamic content.

top-outpost-ninja ·

This is awesome, Daniel! We actually have a few teams doing exactly this. The outpost-resize + outpost-url-change messages were designed with WebView embedding in mind.

For deep linking from push notifications: listen for outpost-url-change messages to track the current path, then to navigate TO a specific topic, you can set the WebView URL to https://your-community.outpost.ninja/t/topic-slug?embed=true.