Skip to content

Instantly share code, notes, and snippets.

View sschottler's full-sized avatar

Scott Schottler sschottler

View GitHub Profile

SOLUTION: Inspector doesn't work in React Native React DevTools

Follow the steps below if your dev menu "show inspector" option is not working correctly with React DevTools. These steps fixed both the standalone react-devtools and the embedded react-devtools inside react-native-debugger for me.

Step 1: Fix the "Unsupported DevTools Backend Version" error message

Unsupported DevTools Backend Version

First, follow these instructions to ensure your project's react-devtools-core package is compatible with the package used by either your standalone react-devtools or the

import { NativeModules, NativeEventEmitter, EventSubscriptionVendor, Platform } from 'react-native';
import { Consumer } from '../models';
// This pattern assumes native module extends RCTEventEmitter like this tutorial demonstrates:
// https://teabreak.e-spres-oh.com/swift-in-react-native-the-ultimate-guide-part-1-modules-9bb8d054db03
// So we don't need separate object to assign event handlers to the nativemodule
// and we can just say nativeModule.addListener('someEvent', eventHandler)
// Most nativemodules won't need to emit events. In fact, we could probably just
// pass in a callback that the native layer invokes multiple times
// but if we ever need an event emitter for a native module, here's how we can unify the api:
import { NativeModules, Platform } from 'react-native';
import { Consumer } from '../models';
// declare a type for the native module explicitly and assign to that variable:
const AuthenticationServiceNativeModule: AuthenticationServiceNativeModule =
NativeModules.AuthenticationService;
// all common methods that have same signature between IOS/Android:
interface AuthenticationServiceNativeModule {
initialize(awsdkBundleId: string, awsdkUrl: string, awsdkKey: string): Promise<string>;
@sschottler
sschottler / awsdkActions.ts
Last active April 24, 2019 20:53
End to End Visit SDK calls to launch visit
// before running this:
// 1) make sure you are logged in as a provider on another laptop
// instructions for how to do that:
// https://wiki.audaxhealth.com/pages/viewpage.action?spaceKey=ENG&title=Setting+up+an+Amwell+provider+for+a+visit
// 2) You should have the telehealth video player installed. The code below won't do that for you
// you can get the url to install it in sdk.visitService.telehealthVideoInstallUrl after initializing the sdk
// 3) Have your .env.development.local credentials setup (see readme in Telemedicine-UI)