Closed ajen010 closed 5 months ago
I am happy to pay to have this bug fixed.
@ajen010 Could you give me access to a repository?
I'll have to upload the files to a repo, I'm doing everything on my local. Give me a second.
i also need this solution
Ok I invited you to the private repo @zoontek zoontek
The RNPermissions is used in the ImagePicker.js component.
@ajen010 I don't have the issue:
Are you sure you didn't forget step 3 of iOS setup?
- Then execute pod install in your ios directory (📌 Note that it must be re-executed each time you update this config).
The issue is the simulators don't respond when you do a request. When the code runs on a real mobile device everything works perfectly.
@ajen010 My screen recording is on a simulator.
if you were using an older version of react-native-permissions, you might have reactNativePermissionsIOS in your package.json, can you try removing it, doing pod install again?
@ajen010 Did you tried again? With the example app / after cleaning your project?
It works on the devices every time, just not on the simulator. I've moved on and am working on other projects now. Thanks for your help.
On Mon, 10 June 2024, 10:41 pm Mathieu Acthernoene, < @.***> wrote:
@ajen010 https://github.com/ajen010 Did you tried again? With the example app / after cleaning your project?
— Reply to this email directly, view it on GitHub https://github.com/zoontek/react-native-permissions/issues/873#issuecomment-2158240285, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACOLNLGPNYZNJ2MVZDHMK3ZGWNGFAVCNFSM6AAAAABG76LOCKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJYGI2DAMRYGU . You are receiving this because you were mentioned.Message ID: @.***>
@ajen010 Weird, as I (and others) never had an issue with simulators, I even posted a video of it working for your app.
OK, I'm closing this.
So I had the same issue right now with RN 0.73.6
& "react-native-permissions": "^4.1.5"
FIX:
ios/Pods
folder;node_modules
folder;yarn install
;pod install
in ios
folder;
Before submitting a new issue
Bug summary
const
granted = await request(PERMISSIONS.IOS.PHOTO_LIBRARY); The code never allows granted = 'granted' the only value granted gets is 'unavailable'Library version
4.1.5
Environment info
Steps to reproduce
npm install --save react-native-permissions
import RNPermissions, { openSettings, PERMISSIONS, request } from 'react-native-permissions'; const checkImagePermission = async () => { const granted = await request(PERMISSIONS.IOS.PHOTO_LIBRARY); console.log("granted ",granted); }
Reproducible sample code