Skip to content

Commit d50ad4b

Browse files
committed
Add a basic migration guide
1 parent c45f008 commit d50ad4b

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

MIGRATION.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Migration from v2
2+
3+
## What's new
4+
5+
- Windows support ([#530](https://github.com/zoontek/react-native-permissions/pull/530))
6+
- Android 11 support
7+
- iOS 9 support dropped
8+
- A new iOS permission handler: `Permission-LocationAccuracy` ([#503](https://github.com/zoontek/react-native-permissions/pull/503))
9+
- A new iOS permission handler: `Permission-PhotoLibraryAddOnly` ([#510](https://github.com/zoontek/react-native-permissions/pull/510))
10+
- New methods for iOS14+: `checkLocationAccuracy`, `requestLocationAccuracy`, `openLimitedPhotoLibraryPicker` ([#503](https://github.com/zoontek/react-native-permissions/pull/503), [#510](https://github.com/zoontek/react-native-permissions/pull/510))
11+
- Support of the new `Limited` status for `PhotoLibrary` permission ([#510](https://github.com/zoontek/react-native-permissions/pull/510))
12+
- Support of the new `Limited` status for `Notifications` permission (=`Ephemeral`, (see [Apple doc](https://developer.apple.com/documentation/usernotifications/unauthorizationstatus/unauthorizationstatusephemeral?language=objc))
13+
14+
## Code modifications
15+
16+
1. `.podspec` extension is no longer required in your `Podfile`:
17+
18+
```diff
19+
target 'YourAwesomeProject' do
20+
21+
# …
22+
23+
permissions_path = '../node_modules/react-native-permissions/ios'
24+
25+
- pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars.podspec"
26+
+ pod 'Permission-Calendars', :path => "#{permissions_path}/Calendars"
27+
- pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
28+
+ pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
29+
30+
# …
31+
32+
end
33+
```
34+
35+
2. `request(PERMISSIONS.IOS.PHOTO_LIBRARY)` and `requestNotifications` could now resolve with a `RESULTS.LIMITED` permission status.
36+
37+
## Known issues
38+
39+
Updating the permission status to `Ask me next time` in your app settings will not work on Android 11.

0 commit comments

Comments
 (0)