@edge-zuq/core
v1.3.1
Published
ZUQ App core components
Readme
@edge-zuq/core
ZUQ core components and features common to all apps
Installation
npm install @edge-zuq/core react-native-reanimated react-native-gesture-handler react-native-svg react-native-safe-area-context react-native-keyboard-controller react-native-permissions @notifee/react-native react-native-mmkv @react-native-community/netinfo react-native-uuid react-native-currency-input react-native-blob-util react-native-workletsLibraries setup
react-native-reanimated
Add react-native-reanimated/plugin plugin to your babel.config.js.
module.exports = {
presets: [
... // don't add it here :)
],
plugins: [
...
'react-native-worklets/plugin',
],
};react-native-permissions
iOS
- By default, no permissions are available. First, require the setup script in your Podfile:
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')- In the same Podfile, call setup_permissions with the permissions you need. Only the permissions specified here will be added:
platform :ios, min_ios_version_supported
prepare_react_native_project!
setup_permissions([
'Camera',
'Notifications',
])- Then execute pod install in your ios directory (📌 Note that it must be re-executed each time you update this config).
- Finally, add the corresponding permissions usage descriptions to your Info.plist. For example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- 🚨 Keep only the permissions specified in `setup_permissions` 🚨 -->
<key>NSCameraUsageDescription</key>
<string>[REASON]</string>
<key>NSRemindersFullAccessUsageDescription</key>
<string>[REASON]</string>
<!-- … -->
</dict>
</plist>Android
- Add all wanted permissions to your app android/app/src/main/AndroidManifest.xml file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>License
MIT
