-
-
Notifications
You must be signed in to change notification settings - Fork 817
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
Notifications permission pod is missing in iOS simulator #342
Comments
Including your podfile seems vital |
Running from Xcode to a device works fine. I was running to a simulator using My
|
So from Xcode it works to a simulator but from It appears
When running on a simulator from |
Strange - your assumptions (command line using .xcworkspace) and your Podfile seem fine... I know device and simulator are different CPU architectures (leading to separate build/compile caching and thus odd differences between the two) and I've run into issues on that before, this is a voodoo solution but have you tried the react-native-clean-project module, specifically with a 'Y' on 'wipe iOS build'? sometimes doing a pod deintegrate && pod install is similar voodoo that can work I'm sorry my only suggestions are vague but maybe they help |
Does running from Xcode to the simulator works? I know |
@zoontek yes using the simulator from Xcode does work |
@grit86 Then I'm not sure the issue is with this library. Maybe more an issue for https://github.com/react-native-community/cli ? |
@zoontek I've since discovered react-native-community/cli#626 and the problem was to do with |
@grit96 It's good to know! I will update the |
@zoontek just point to react-native-clean-project and advocate using "wipe iOS build" option. This comes up SO MUCH on react-native-firebase, it's the canonical answer I use this in CI to make sure - I call in to 'deep-clean'
"react-native-clean-project": "^3.2.4",
"deep-clean": "./node_modules/.bin/react-native-clean-project --keep-node-modules --remove-iOS-build --keep-brew --keep-pods --remove-iOS-pods --remove-android-build && yarn clean",
"clean": "\\rm -fr ./node_modules && \\rm -fr dist/* && \\rm -fr ios/build ios/Pods ios/KScoreApp.xcarchive && \\rm -fr android/build android/app/build", Some of that is a little duplicate (ios/build is wiped by react-native-clean-project but it's part of my "lighter clean" I use sometimes). Some is subtle in that I ask react-native-clean-project to keep pods and keep node modules, then I delete ios/Pods and ./node_modules - the reason is that the react-native-clean-project version can invalidate the cache in your home directory as well forcing big network fetches, I only want the project-local stuff deleted, so I override the behavior basically. |
Bug
Related to #331
When using
checkNotifications()
orrequestNotifications()
in the simulator, we get the warningNotifications permission pod is missing
and the functions don't resolve.Environment info
React native info output:
Library version: 2.0.2
Steps To Reproduce
Podfile
cd ios && pod install
checkNotifications()
andrequestNotifications()
The text was updated successfully, but these errors were encountered: