README
react-native-abi-detector
An ABI detector for react-native android app.
Getting Started
$ yarn add react-native-abi-detector
or
$ npm install --save react-native-abi-detector
Using React Native >= 0.60
Linking the package manually is not required anymore with Autolinking.
Using React Native < 0.60
$ react-native link react-native-abi-detector
Usage
import React, { useState, useEffect } from 'react';
import { ABIDetector, ABIs } from 'react-native-abi-detector';
const App = () => {
const [abi, setAbi] = useState(ABIs.UNKNOWN)
useEffect(() => {
ABIDetector.get().then(abi => {
setAbi(abi)
})
}, [])
return (
<View style={{ flex: 1, backgroundColor: '#212121' }}>
<Text>
{abi}
</Text>
</View>
)
}
Props
interface ABIDetector {
get: () => Promise<string>
}
interface ABIs {
ARMV8: string
ARMV7: string
ARMV5: string
X86_64: string
X86: string
UNKNOWN: string
}
Thanks
- zhaobozhen/LibChecker, the methods of ABI detecting is basically copied from it