Skip to content

Commit 414327d

Browse files
authored
Merge branch 'master' into @wolewicki/add-fabric
2 parents 045f07b + c22eb85 commit 414327d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4146
-8655
lines changed

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,16 @@ build/
3030
local.properties
3131
*.iml
3232
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
3336

3437
# node.js
3538
#
3639
node_modules/
3740
npm-debug.log
3841
yarn-error.log
3942

40-
# BUCK
41-
buck-out/
42-
\.buckd/
43-
*.keystore
44-
!debug.keystore
45-
4643
# fastlane
4744
#
4845
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
@@ -64,3 +61,6 @@ dist/
6461
# Ruby / CocoaPods
6562
example/ios/Pods/
6663
example/vendor/bundle/
64+
65+
# Temporary files created by Metro to check the health of the file watcher
66+
.metro-health-check*

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ end
157157
Add all wanted permissions to your app `android/app/src/main/AndroidManifest.xml` file:
158158

159159
```xml
160-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
161-
package="com.myawesomeapp">
160+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
162161

163162
<!-- 🚨 Keep only the permissions used in your app 🚨 -->
164163

@@ -984,15 +983,15 @@ Since iOS 15.0, it's impossible to request this permission if the app isn't `act
984983
```js
985984
useEffect(() => {
986985
const callback = (status: AppStateStatus) => {
987-
if (status === "active") {
986+
if (status === 'active') {
988987
request(PERMISSIONS.IOS.APP_TRACKING_TRANSPARENCY)
989988
.then((result) => console.log(result))
990989
.catch((error) => console.log(error));
991990
}
992991
};
993992

994993
callback(AppState.currentState); // initial call
995-
const listener = AppState.addEventListener("change", callback);
994+
const listener = AppState.addEventListener('change', callback);
996995
return listener.remove;
997996
}, []);
998997
```

example/.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

example/.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.5
1+
2.7.6

example/App.tsx

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from 'react';
22
import {Platform, ScrollView, StatusBar, View} from 'react-native';
33
import {Appbar, Button, Divider, Snackbar, Text} from 'react-native-paper';
44
import RNPermissions, {NotificationOption, Permission, PERMISSIONS} from 'react-native-permissions';
5-
import theme from './theme';
65

76
// eslint-disable-next-line @typescript-eslint/no-unused-vars
87
const {SIRI, ...PERMISSIONS_IOS} = PERMISSIONS.IOS; // remove siri (certificate required)
@@ -27,11 +26,11 @@ export const App = () => {
2726
const hideSnackbar = () => setSnackbarContent(undefined);
2827

2928
return (
30-
<View style={{flex: 1, backgroundColor: theme.colors.background}}>
31-
<StatusBar backgroundColor={theme.colors.primary} barStyle="light-content" />
29+
<View style={{flex: 1}}>
30+
<StatusBar barStyle="dark-content" />
3231

3332
<Appbar.Header>
34-
<Appbar.Content title="react-native-permissions" subtitle="Example application" />
33+
<Appbar.Content title="Permissions app" />
3534

3635
{Platform.OS === 'ios' && (
3736
<Appbar.Action
@@ -74,23 +73,14 @@ export const App = () => {
7473
return (
7574
<React.Fragment key={item}>
7675
<View style={{padding: 20}}>
77-
<Text
78-
numberOfLines={1}
79-
style={{
80-
color: 'rgba(0, 0, 0, 0.87)',
81-
fontWeight: '400',
82-
fontSize: 16,
83-
textAlign: 'left',
84-
}}
85-
>
76+
<Text numberOfLines={1} variant="bodyMedium">
8677
{name}
8778
</Text>
8879

8980
<View style={{flexDirection: 'row', marginTop: 12}}>
9081
<Button
91-
compact={true}
9282
icon="eye-outline"
93-
mode="outlined"
83+
mode="contained"
9484
onPress={() => {
9585
RNPermissions.check(value)
9686
.then((status) => {
@@ -107,9 +97,8 @@ export const App = () => {
10797
<View style={{width: 8}} />
10898

10999
<Button
110-
compact={true}
111100
icon="help-circle-outline"
112-
mode="outlined"
101+
mode="contained"
113102
onPress={() => {
114103
RNPermissions.request(value)
115104
.then((status) => {
@@ -131,23 +120,14 @@ export const App = () => {
131120
})}
132121

133122
<View style={{padding: 20, paddingBottom: 32}}>
134-
<Text
135-
numberOfLines={1}
136-
style={{
137-
color: 'rgba(0, 0, 0, 0.87)',
138-
fontWeight: '400',
139-
fontSize: 16,
140-
textAlign: 'left',
141-
}}
142-
>
123+
<Text numberOfLines={1} variant="bodyMedium">
143124
NOTIFICATIONS
144125
</Text>
145126

146127
<View style={{flexDirection: 'row', marginTop: 12}}>
147128
<Button
148-
compact={true}
149129
icon="eye-outline"
150-
mode="outlined"
130+
mode="contained"
151131
onPress={() => {
152132
RNPermissions.checkNotifications()
153133
.then((response) => {
@@ -164,9 +144,8 @@ export const App = () => {
164144
<View style={{width: 8}} />
165145

166146
<Button
167-
compact={true}
168147
icon="help-circle-outline"
169-
mode="outlined"
148+
mode="contained"
170149
onPress={() => {
171150
const options: NotificationOption[] = ['alert', 'badge', 'sound'];
172151

@@ -195,7 +174,6 @@ export const App = () => {
195174
duration={10000}
196175
onDismiss={hideSnackbar}
197176
action={{
198-
color: '#607d8b',
199177
label: 'Hide',
200178
onPress: hideSnackbar,
201179
}}

example/Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby '2.7.5'
4+
ruby File.read(File.join(__dir__, '.ruby-version')).strip
55

6-
gem 'cocoapods', '~> 1.11', '>= 1.11.2'
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.3'

example/__test__/Permissions.test.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

example/android/app/_BUCK

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)