Mobile WebView
GoCharting does not ship separate iOS / Android chart SDKs. Native apps load the JavaScript SDK inside a WebView and talk to it over a bridge.
Supported hosts:
- React Native (
react-native-webview) - Flutter (
WebView/JavascriptChannel) - Android (
WebView+JavascriptInterface) - iOS (
WKWebView+ message handlers)
Pattern
- Host a page that calls
createChart(..., { isNativeApp: true }). - Keep
window.chart(or similar) for native → JS commands. - Listen for
sendToNative/appCallbackmessages for JS → native events. - Drive symbol, interval, orders, and sheets from native chrome.
window.chart = createChart("#chart", {
symbol: "BYBIT:FUTURE:BTCUSDT",
interval: "1m",
datafeed: myDatafeed,
licenseKey: "YOUR_LICENSE_KEY",
isNativeApp: true, // mobile canvas; host owns toolbars
appCallback: (event) => {
// Also posted to the native bridge when isNativeApp is true
},
});| Flag | Behavior |
|---|---|
isNativeApp: true | Mobile canvas; JS bars/context menu suppressed; events posted natively |
touchMode: true | Full JS mobile Chart-tab chrome (bars + menus) |
For production native shells, prefer isNativeApp: true.
Full guide
See Mobile Integration for bridge snippets, message shapes, and platform checklists.
Package example: examples/flutter-webview.html (SDK package).
Related
- Framework integrations — web framework sample apps
- Events API
- Vanilla JavaScript — same UMD/
createChartentry as the WebView page
Last updated on