SDKs
The SDKs put your feedback widget inside your product, with your user already signed in: a button and a panel on your web pages, a sheet or a screen of its own in your mobile app.
Choose yours#
- Any website: the script tag, one
<script>tag your portal serves. - A React or Next.js app: React,
npm install @swingback/react. - An iOS or macOS app: iOS, with Swift Package Manager, from
https://github.com/Swingback-dev/swingback-swift. - A React Native or Expo app: React Native,
npx expo install @swingback/react-native react-native-webview. - An Android app: Android,
dev.swingback:swingback-androidfrom Maven Central.
Each shows the same widget: your portal's boards, posts, votes, comments, roadmap and changelog, in your colors and in your reader's language. What you change on your portal reaches every app at once, without a release of yours.
How your user is signed in#
- Your user opens the widget, from the button at the corner of your page or from a control of your own.
- The SDK asks your server for an identity token: your endpoint, on your web pages, or a function of your app's, which asks your server.
- Your server signs a token for the user its session names, with your identity secret.
- The widget signs them in: they post, vote and comment as themselves, without a second account.
Your identity secret stays on your server: no SDK, page or app ever holds it. No server of your own, say an app on an authentication service? Do you need a server? says where tokens can be signed, and what the widget does without them. Signing in your users has the endpoint, in a few lines, and each SDK's page ends with a complete example: the endpoint, then the app around it.
What every SDK does#
- Opens the widget on any of its pages: the feedback, the roadmap, the changelog, a new post, a post or a board.
- Asks for a token each time the widget opens, and ends the widget's session when your user signs out of your product
(
logout()). - Speaks to the widget's own frame or web view alone, at your portal's address, and opens the links that leave it outside your app.
- Tells you what happened: the widget is ready, your user is signed in or out, or an error and its code.
