https://github.com/prscx/react-native-easy-permissions
React Native: Native Easy Permissions
https://github.com/prscx/react-native-easy-permissions
android ios react-native
Last synced: about 1 year ago
JSON representation
React Native: Native Easy Permissions
- Host: GitHub
- URL: https://github.com/prscx/react-native-easy-permissions
- Owner: prscX
- License: apache-2.0
- Created: 2020-01-12T06:12:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-03T08:50:05.000Z (almost 5 years ago)
- Last Synced: 2024-10-29T16:59:08.295Z (over 1 year ago)
- Topics: android, ios, react-native
- Language: Objective-C
- Homepage:
- Size: 266 KB
- Stars: 31
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ReactNative: Native Easy Permissions Library (Android/iOS)
If this project has helped you out, please support us with a star 🌟
This library is a React Native bridge around native library providing Dialog for permissions.
| **iOS: [ivanvorobei/SPPermissions](https://github.com/ivanvorobei/SPPermissions)** |
| ---------------------------------------------------------------------------------------------------------- |
|
|
| **Android: [Facebook/ReactNative.PermissionsAndroid](https://facebook.github.io/react-native/docs/permissionsandroid)** |
| ----------------------------------------------------------------------------------------------------------------------- |
> This library is support RN61+
## 📖 Getting started
`$ npm install react-native-easy-permissions --save`
- **iOS**
> **iOS Prerequisite:** Please make sure `CocoaPods` is installed on your system
- Add the following to your `Podfile` -> `ios/Podfile` and run pod update:
```
use_native_modules!
pod 'RNEasyPermissions', :path => '../node_modules/react-native-easy-permissions/ios'
use_frameworks!
pod 'SPPermissions', :git => 'https://github.com/prscX/SPPermissions', :branch => 'react-native'
```
- [Permissions Pods - Follow](https://github.com/ivanvorobei/SPPermissions/#cocoapods)
- [Keys in Info.plist - Follow](https://github.com/ivanvorobei/SPPermissions/#keys-in-infoplist)
- **Android**
> [Supported Permissions - Follow](https://facebook.github.io/react-native/docs/permissionsandroid)
> No configuration is required
## 🎨 Usage
```
import { RNEasyPermissions } from 'react-native-easy-permissions'
RNEasyPermissions.Show({
// iOS Permissions
permissions: ['Camera', 'Contacts', 'Calendar', 'PhotoLibrary', 'Notification', 'Microphone', 'Reminders', 'SpeechRecognizer', 'Location', 'Motion', 'MediaLibrary', 'Bluetooth']
// Android Permissions
// permissions: [
// 'android.permission-group.CALENDAR',
// 'android.permission-group.CAMERA',
// 'android.permission-group.LOCATION',
// 'android.permission.READ_SMS',
// 'android.permission.ACCESS_FINE_LOCATION'
// ]
});
```
## 💡 Props
- **General(iOS & Android)**
| Prop | Type | Default | Note |
| --------------------------- | ------ | ------- | ----------------------------------- |
| `Show({ permissions: [] })` | `func` | | It invoke native permissions dialog |
## ✨ Credits
- iOS: [ivanvorobei/SPPermissions](https://github.com/ivanvorobei/SPPermissions)
## 🤔 How to contribute
Have an idea? Found a bug? Please raise to [ISSUES](https://github.com/prscX/react-native-easy-permissions/issues).
Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.
## 💫 Where is this library used?
If you are using this library in one of your projects, add it in this list below. ✨
## 📜 License
This library is provided under the Apache 2 License.
RNAppTour @ [prscX](https://github.com/prscX)
## 💖 Support my projects
I open-source almost everything I can, and I try to reply everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
- Starring and sharing the projects you like 🚀
- If you're feeling especially charitable, please follow [prscX](https://github.com/prscX) on GitHub.
Thanks! ❤️
[prscX.github.io](https://prscx.github.io)
Pranav >
