LO - React Native
V 0.5.1 (released 25/06/26)
React Native Wrapper for LANDMARKSID SDK
A convenient wrapper for integrating the LANDMARKSID SDK into React Native applications.
Installation
Run the following command in your React Native project:
npm install @landmarksid/react-native-sdk-wrapper
The native Android and iOS SDKs are bundled with this package — no additional SDK installation or private repository access is required.
Requirements
- React Native 0.77 or higher
- iOS 15.6 or higher
- Android
minSdkVersion26,compileSdkVersion36 - Android Gradle Plugin 8.7.0+, Gradle 8.12+, Kotlin 2.0.21+, JDK 17+
Configuring the Android App
Modify your
MainActivityto extendLandmarksIDActivity:-import com.facebook.react.ReactActivity; +import com.landmarksidreactnativesdkwrapper.LandmarksIDActivity; -public class MainActivity extends ReactActivity { +public class MainActivity extends LandmarksIDActivity {Set the following Gradle properties:
LANDMARKS_ID_SDK_APP_ID=your-app-id LANDMARKS_ID_SDK_APP_KEY=your-app-keyMore information on configuring Gradle properties can be found in the Gradle Documentation.
Configuring the iOS App
Add these properties to your
Info.plist:<key>LANDMARKS_ID_SDK_APP_ID</key> <string>$(LANDMARKS_ID_SDK_APP_ID)</string> <key>LANDMARKS_ID_SDK_APP_KEY</key> <string>$(LANDMARKS_ID_SDK_APP_KEY)</string>Ensure you have an
.xcconfigfile with these properties:LANDMARKS_ID_SDK_APP_ID = your-app-id LANDMARKS_ID_SDK_APP_KEY = your-app-keyConsult the Xcode Documentation for more on using
.xcconfigfiles.
Configuring the React Native App
In your React Native app, initialize the SDK using the provider:
import { LandmarksIdSdkProvider } from '@landmarksid/react-native-sdk-wrapper';
export default function App() {
return (
<LandmarksIdSdkProvider customerId={'123'}>
<SafeAreaView>
<Text>My App</Text>
<MyComponent />
</SafeAreaView>
</LandmarksIdSdkProvider>
)
}
In your component you can use the useLandmarksIdSdk hook to access the SDK functions:
customerId: The current customer IDsetCustomerId: A function that takes a string and sets the customer IDsendCustomFloat: A function that takes a string (key) and a number (value) and sends custom data to the SDKsendCustomString: A function that takes a string (key) and a string (value) and sends custom data to the SDKsendCustomInteger: A function that takes a string (key) and a number (value) and sends custom data to the SDK
import { useLandmarksIdSdk } from '@landmarksid/react-native-sdk-wrapper';
export default function MyComponent() {
const {
customerId,
setCustomerId,
sendCustomFloat,
sendCustomString,
sendCustomInteger,
} = useLandmarksIdSdk();
return (
<Button onPress={setCustomerId('abc')}>
Set Customer ID to abc
</Button>
)
}
Permissions
The SDK requires location permissions on both platforms. The manifest-level permissions (ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION) are already declared by the SDK and will be merged into your app automatically. Your app is responsible for requesting runtime permission from the user.
iOS
Add a usage description to your Info.plist explaining why your app needs location access:
<key>NSLocationWhenInUseUsageDescription</key>
<string>Your reason for requiring location access</string>
If using react-native-permissions, add the following to your Podfile:
node_require('react-native-permissions/scripts/setup.rb')
setup_permissions(['LocationWhenInUse'])
Android
No manifest changes are required — the SDK declares the necessary permissions. However, it is recommended that you show a custom rationale dialog explaining why your app needs location access before requesting the permission at runtime.
Known Issues
Xcode 26 compatibility
If you are building with Xcode 26 (beta), the fmt library bundled with React Native will fail to compile due to stricter consteval enforcement in the new Clang. This affects all current React Native versions.
Add the following to your Podfile's post_install block, after react_native_post_install:
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
# Xcode 26 fix: https://github.com/facebook/react-native/issues/55601
installer.pods_project.targets.each do |target|
if target.name == 'fmt' || target.name == 'RCT-Folly'
target.build_configurations.each do |bc|
bc.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
bc.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
bc.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'FMT_USE_CONSTEVAL=0'
end
end
end
end
This will no longer be needed once React Native ships an updated fmt library.
Migration Guide
Migrating from 0.4.x to 0.5.0
This release upgrades both native SDKs, bundles them directly in the package, upgrades the minimum supported React Native version to 0.77, and updates the Android build toolchain. You no longer need to configure private repository access.
React Native 0.77
React Native 0.77 is now the minimum supported version. If your app is on an older version, follow the official React Native Upgrade Helper to upgrade your app first.
Android: Remove JitPack configuration
Remove the
LANDMARKSID_JITPACK_AUTH_TOKENproperty from yourgradle.properties.Remove the JitPack repository from your
build.gradle(if it was only used for this SDK):-allprojects { - repositories { - maven { url "https://jitpack.io" - credentials { username authToken } - } - } -}
Android: Build toolchain updates
Update your build.gradle and Gradle wrapper to meet the new minimums:
| Component | Previous | New |
|---|---|---|
| Gradle | 8.0+ | 8.12 |
| Android Gradle Plugin | 7.x | 8.7.2 |
| Kotlin | 1.9.x | 2.0.21 |
| NDK | 23.x | 27.1.12297006 |
| compileSdkVersion | 33 | 36 |
| minSdkVersion | 21 | 26 |
iOS: Remove LANDMARKSID pod
Remove the LANDMARKSID pod from your Podfile (it is now provided by the wrapper's podspec):
target 'MyReactNativeIOSApp' do
- pod 'LandmarksID/LO', :git => 'https://github.com/LANDMARKSID/LandmarksID-iOS.git', :tag => '2.5.2'
...
end
Then run pod install.
iOS: Minimum version
The minimum iOS version has been raised from 12.0 to 15.6.
Contact Details
If you have any further questions please do not hesitate to contact our friendly team at;
