calceytechnologies / react-native-local-network-permission

A temporary lib to handle the local network permission after iOS 14.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A temporary lib to handle the local network permission after iOS 14.

License:BSD 2-Clause "Simplified" License


Languages

Language:Objective-C 49.0%Language:JavaScript 20.1%Language:TypeScript 17.5%Language:Ruby 10.7%Language:Shell 2.7%