-
Notifications
You must be signed in to change notification settings - Fork 8.2k
[Permissions] Make requester registrable #5187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Permissions] Make requester registrable #5187
Conversation
* fix scoped permissions status (never undetermind) * EXRemoteNotificationRequester is EXPermissionBaseRequester
packages/expo-permissions/ios/EXPermissions/EXPermissionRequester.h
Outdated
Show resolved
Hide resolved
|
||
+ (EXPermissionStatus)statusForPermissions:(NSDictionary *)permissions; | ||
- (void)askForGlobalPermissionWithRequesterClass:(Class)requesterClass | ||
withResolver:(void (^)(NSDictionary *))resolver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't that be just:
withResolver:(void (^)(NSDictionary *))resolver | |
withResolver:(UMPromiseResolveBlock)resolver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That couldn't be UMPromiseResolveBlock
, because this type is defined as void (^UMPromiseResolveBlock)(id result);
} | ||
|
||
- (void)setModuleRegistry:(UMModuleRegistry *)moduleRegistry | ||
{ | ||
_moduleRegistry = moduleRegistry; | ||
|
||
// only for test purpose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that should be addressed?
packages/unimodules-permissions-interface/ios/UMPermissionsInterface/UMPermissionsInterface.h
Outdated
Show resolved
Hide resolved
packages/unimodules-permissions-interface/ios/UMPermissionsInterface/UMPermissionsInterface.h
Outdated
Show resolved
Hide resolved
packages/unimodules-permissions-interface/ios/UMPermissionsInterface/UMPermissionsInterface.h
Show resolved
Hide resolved
packages/unimodules-permissions-interface/ios/UMPermissionsInterface/UMPermissionsInterface.h
Outdated
Show resolved
Hide resolved
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* Clean iOS * Fix scoped permissions status (never undetermind) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (expo#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (expo#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (expo#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (expo#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (expo#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (expo#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (expo#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (expo#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (expo#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (expo#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (expo#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (expo#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (expo#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (expo#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (expo#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (expo#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
Why
Part of #5061.