| Dependency | Previous | New |
|---|---|---|
react |
>= 16.8.6 |
>= 19.1.0 |
react-native |
>= 0.60.0 |
>= 0.80.0 |
@maplibre/maplibre-react-native |
>= 10.2.1 |
^11.0.0 |
react-native-safe-area-context^5.6.2is now an optional peer dependency. If installed, theRadarAutocompletecomponent will use it automatically. If not installed, it falls back to the deprecatedSafeAreaViewfromreact-native.
- Upgrade React and React Native:
npm install react@^19.1.0 react-native@^0.80.0- Upgrade MapLibre React Native:
npm install @maplibre/maplibre-react-native@^11.0.0- (Recommended) Install
react-native-safe-area-contextif not already present:
npm install react-native-safe-area-context@^5.6.2You can now pass a ref to the underlying MapLibre Map component via mapOptions.mapRef to access imperative map methods like getCenter(), getZoom(), getBounds(), etc.
import { useRef } from 'react';
import type { MapRef } from '@maplibre/maplibre-react-native';
const mapRef = useRef<MapRef>(null);
<RadarMap mapOptions={{ mapRef }} />iOS*
In 3.x, the iOS Radar SDK shipped attestation/fraud detection inline within the main RadarSDK. In 4.x, react-native-radar vendors RadarSDK.xcframework and RadarSDKMotion.xcframework directly, and fraud detection lives in a separate RadarSDKFraud.xcframework that you must opt into. If you call Radar.trackVerified() without opting in, it will reject with ERROR_PLUGIN.
Expo users: set iosFraud: true in your react-native-radar config plugin, then re-run prebuild and pod install:
npx expo prebuild --clean
cd ios && pod installThis also configures SSL pinning to api-verified.radar.io in Info.plist (existing behavior in 3.x).
Bare React Native users: add the following to your ios/Podfile inside the target block, then run pod install:
pod 'RadarSDKFraud', :path => '../node_modules/react-native-radar'Android
set androidFraud: true in your react-native-radar config plugin, then re-run prebuild and a clean Android build:
npx expo prebuild --cleanThis adds io.radar:sdk-fraud (and com.google.android.play:integrity) to your android/app/build.gradle, plus network_security_config.xml for SSL pinning.
Bare React Native users: add the following to your android/app/build.gradle dependencies block:
implementation "io.radar:sdk-fraud:1.1.0"
implementation "com.google.android.play:integrity:1.2.0"Radar.on()andRadar.off()calls are deprecated, the new interfaces are
onLocationUpdate: (callback: RadarLocationUpdateCallback) => void;
clearLocationUpdate: () => void;
onClientLocationUpdate: (callback: RadarClientLocationUpdateCallback) => void;
clearClientLocationUpdate: () => void;
onError: (callback: RadarErrorCallback) => void;
clearError: () => void;
onLog: (callback: RadarLogUpdateCallback) => void;
clearLog: () => void;
onEventUpdate: (callback: RadarEventUpdateCallback) => void;
clearEventUpdate: () => void;
onTokenUpdate: (callback: RadarTokenUpdateCallback) => void;
clearTokenUpdate: () => void;
- Web support is no longer included in default export and is now a separate export
RadarRNWeb. Callimport Radar, { RadarRNWeb } from 'react-native-radar'
- On
optionsforautocompleteUI,thresholdis nowminCharacters.