[Enhancement proposal]: Add phone and storage macros so users can choose to include or not #1120
Open
3 of 5 tasks
Labels
good first issue
Good for newcomers who would like to start contributing to the project.
P2
Important issues not at the top of the work list.
platform: ios
Issue is related to the iOS platform
type: enhancement
New feature or request
up for graps
Issues marked with this label are relatively easy problems that are ideal for starting contributors.
Please check the following before submitting a new issue.
Please select affected platform(s)
Proposal
Currently on iOS, no enum values exist for phone and storage permission strategies in
PermissionHandlerEnums.h
. However, enum values exist for all other permission strategies (camera, microphone, etc).Other permission strategies are executed only if their enum values are defined. For example, for bluetooth, the enum value
PERMISSION_BLUETOOTH
is defined inPermissionHandlerEnums.h
. Then, inBluetoothPermissionStrategy.h
, bluetooth permission is only implemented if its enum value is defined:Currently, this if...else block doesn't exist in
PhonePermissionStrategy.h
orStoragePermissionStrategy.h
:This means phone and storage permission strategies are always added, including dependencies like
CoreTelephony
needed for phone permissions strategy.Instead, we can add macros
PERMISSION_STORAGE
andPERMISSION_PHONE
toPermissionHandlerEnums.h
, and add an if...else block in phone and storage permission strategy header files, as follows:Pitch
This will allow users to specify if they want phone and storage permissions in their Podfiles.
For phone permission strategy, this would mean users who don't need phone permissions can leave out the
CoreTelephony
framework from their applications.The text was updated successfully, but these errors were encountered: