-
-
Notifications
You must be signed in to change notification settings - Fork 836
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
Add documentation on what the npx react-native setup-ios-permissions
actually does
#799
Comments
Might be worth noting that nx/react-native symlinks the The command seems to follow it okay when you run it from the app folder. |
@david-gettins I published a beta with an alternative already. Instead of relying on a react native CLI command, you can call a ruby function in your Podfile, it achieves the same (updating the podspec require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
+ require_relative '../node_modules/react-native-permissions/scripts/permissions_setup'
platform :ios, min_ios_version_supported
prepare_react_native_project!
+ setup_permissions([
+ 'Camera',
+ 'LocationWhenInUse',
+ 'Microphone'
+ ]) More infos here: #750 (comment) To try it: yarn add react-native-permissions@next |
@david-gettins Published a new beta with an update to latest version of react native for the example app + documentation now mention hoisting support: https://github.com/zoontek/react-native-permissions/tree/add-ruby-setup-script#ios If you confirm that it works correctly with nx, I will publish |
Thank you. I'll give it a try on Monday and get back to you. |
@david-gettins Did you tried? |
Hi, sorry I had a busy few days. I'm on it this evening, though. |
Given this a try and all seems to work well. Thank you for looking into this. I agree that this feels like a better way to do this as you mentioned in an earlier comment. I have added a I have added a comment to an answer I provided on StackOverflow to someone with a similar issue pointing to this conversation. @zoontek will you be putting this in the next stable release and updating the docs for it? |
@david-gettins Yes, it will be in the next release (with a solution for #710 too) |
Excellent, thank you for making this change! I'll close the issue. |
Why it is needed?
For projects that do not follow the standard React Native project structure e.g. nx/react-native it is not clear how to successfully set up for, and run the command.
I managed to figure this as described here where someone else had faced the same issue as me.
The command doesn't allow you to use arguments to specify the
node_modules
folder location.Possible implementation
Include documentation for deeply nested
ios
folders.OR
Add command arguments to the
npx react-native setup-ios-permissions
to allow consumers to specify folder locations.Code sample
Unfortunately, I'm not sure how to make the command changes myself. But the documentation could read something like - maybe a little better than - how I described to someone on Stack Overflow.
The text was updated successfully, but these errors were encountered: