1.0.1 • Published 5 years ago
react-native-local-network-permission
Licence
BSD-2
Version
1.0.1
Deps
0
Size
18 kB
Vulns
0
Weekly
0
React Native Local Network Permission
A temporary lib to handle the local network permission after iOS 14
Getting started
$ npm install react-native-local-network-permission
$ yarn add react-native-local-network-permission
Usage
import { checkLocalNetworkAccess, requestLocalNetworkAccess } from 'react-native-local-network-permission';
//you need to make sure the local network permission dialog popup once
const result = await requestLocalNetworkAccess();
//then use checkLocalNetworkAccess when you need
const result = await checkLocalNetworkAccess();
//here run the code depends local network access