Official MyCover.ai SDK. Supercharge your product with MyCover AI Insurance offerings. Create embedded insurance offerings or full white label insurance applications that excite your customers.
npm install mca-react-native-sdk
- To install all necessary dependencies, run:
npm install mca-react-native-sdk react-native-screens react-native-safe-area-context react-native-svg-transformer @react-native-community/geolocation @react-native-clipboard/clipboard react-native-svg react-native-gesture-handler @react-native-community/datetimepicker @pusher/pusher-websocket-react-native lottie-react-native react-native-image-picker react-native-reanimated react-native-vision-camera react-native-orientation-locker react-native-fs
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts } = defaultConfig.resolver;
const config = {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
};
module.exports = mergeConfig(defaultConfig, config);
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};
For React Native >= 0.60, add this to your react-native.config.js:
module.exports = {
project: {
ios: {},
android: {},
},
assets: ['node_modules/mca-react-native-sdk/src/assets/fonts/'],
};
And run
npx react-native-asset
- In your AndroidManifest.xml, add the following permissions:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
import { multiply } from 'mca-react-native-sdk';
// ...
const result = await multiply(3, 7);
- If you encounter the following errors:
-
Error: ViewManagerResolver returned null for either RNSScreenStackHeaderConfig or RTCTRNSScreenStackHeaderConfig
- Fix: npm install react-native-screens
-
Error: ViewManagerResolver returned null for RNCSafeAreaProvider
- Fix: npm install react-native-safe-area-context
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library