-
-
Notifications
You must be signed in to change notification settings - Fork 840
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
Invalid RNPermission 'ios.permission.LOCATION_WHEN_IN_USE'. should be one of: ( ) #326
Comments
Hi @mtt87 ! I created a small repo to reproduce the issue, and it does not happen: https://github.com/zoontek/react-native-permissions-issue-326 I did: $ npx react-native init HelloPermissions
$ cd HelloPermissions
$ yarn add react-native-permissions
# Edit the `Podfile`, run `pod install`
# Edit the JS
$ open ./ios/HelloPermissions.xcworkspace And compile ( Can you check that you followed the same steps? Check that your project looks like this? (RNPermissions + Permission-LocationWhenInUse pods) |
I tried again from scratch with
and now it worked fine 🤔 Thanks for looking into it @zoontek really appreciate, I'm gonna close the issue then. |
@mtt87 It might be Xcode build cache. A neat trick is |
Even that clean isn't good enough. I have been bitten by stale DerivedData state a few times as well. I only use the react-native-clean-project 'wipe iOS build' option now (and I've PRd to it a couple times, including to clean DerivedData). Good luck :-) |
@Under-Warz Can you provides more details? Cocoapods version, Xcode version, iOS version? |
@zoontek of course.
Cocoapods : 1.7.5 |
Same error here on React native 0.60.5 and Cocoapods 1.7.5. Seems like the array for checking the permission is empty. Error is around here. RNPermissions.h
OR RNPermissions.m
|
@Under-Warz @kkusanagi Could you check that CocoaPods is properly integrated in your project and add Headers search paths automatically? (This is what CocoaPods does normally by default) Also, try:
And open the new |
hahaha i fix it my self. Seems there is invalid data while creating a list. I changed the code as below. And it is fixed. RNPermissions.h
|
@zoontek I can't find any headers about RNPermission and permissions itself ( |
@kkusanagi I will made a minor release tomorrow with the fix, thanks! @Under-Warz Do you use EDIT: It does not seems to solve all cases ( |
This is still an issue when using |
@timmywil If none of the solutions worked for you, can you open a new issue with some infos on your setup (RN version, CocoaPods version, your Podfile?). It will be easier to help you 🙂 |
@zoontek I have the same issue. RNPermissions does not see RNPermissionHandlerX. |
I had to add "${PODS_CONFIGURATION_BUILD_DIR}/Permission-X" to RNPermissions "Framework Search Paths" to make it works :) |
@Under-Warz but in this way, I should always add it manually. |
@chelovekdrakon I didn't suggest anything but you're welcome if it's helped you ^^ For now I'm stop using this lib for my dev but I'll back on it later. @zoontek sry for the delay, yes I'm also using |
I'm not sure this may be cause. Starting on react-native 0.61 above, the react native developer had removed the react.xproject (something) from the library. and this may cause a lot of trouble for other library that use this library. I'm meet this issue with realm. so i need to downgrade to 0.60.5 with fresh setup. If you downgrade from 0.61, you need to add back the react.xproject back to ios library. |
rm -rf node_modules |
this is happening to me as well, |
@menesh2 what version you are using for react-native-permissions and React Native? it work just fined. |
@kkusanagi |
I had the same issue but I realized that I forgot to add a permission handler in the Podfile ^^
|
@ozgurchn i have those handlers in my podfile: do you have another idea? |
tried it already, unfortunately it did not help |
After adding the pods to the Podfile, this ended up fixing the issue for me. Thanks 👍 |
Bug
Environment info
Library version: 2.0.0
Steps To Reproduce
Podfile
pod install
info.plist
The text was updated successfully, but these errors were encountered: