Skip to content

Commit

Permalink
chore: remove permission request on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mastro993 committed Jan 24, 2024
1 parent 761919d commit cc11ea9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ts/utils/permission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const requestIOPermission = async (
}

const requestStatus = await RNPermissions.request(permission, rationale);
return requestStatus === "granted" || requestStatus === "limited";
return requestStatus === "granted";
};

/**
Expand All @@ -33,7 +33,7 @@ export const checkIOPermission = async (
// (such as PHOTO_LIBRARY_ADD_ONLY is), then you should not use this function to
// check nor to request such permission
const checkResult = await RNPermissions.check(permission);
return checkResult === "granted" || checkResult === "limited";
return checkResult === "granted";
};

/**
Expand Down Expand Up @@ -68,11 +68,6 @@ export const requestMediaPermission = async () => {
? RNPermissions.PERMISSIONS.ANDROID.READ_MEDIA_IMAGES
: RNPermissions.PERMISSIONS.ANDROID.READ_EXTERNAL_STORAGE
);
case "ios":
if (parseInt(Platform.Version, 10) >= 17) {
return true;
}
return requestIOPermission(RNPermissions.PERMISSIONS.IOS.PHOTO_LIBRARY);
default:
return false;
}
Expand Down

0 comments on commit cc11ea9

Please sign in to comment.