It does not work in my project
See original GitHub issueHello. Thank you for you work. But this package works fine in a new empty project, created a moment ago, but does not work in my real project. React-native version is 0.52.2 in both projects. Maybe you know what could be the causes of incorrect work?
Works fine
{
"name": "rnKeepAwakeTest",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.2.0",
"react-native": "0.52.2",
"react-native-keep-awake": "^2.0.6",
},
"devDependencies": {
"babel-jest": "22.1.0",
"babel-preset-react-native": "4.0.0",
"jest": "22.1.4",
"react-test-renderer": "16.2.0"
},
"jest": {
"preset": "react-native"
}
}
Does not work
{
"name": "yufuphone",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"camelcase-keys": "^4.1.0",
"color": "^3.0.0",
"lodash": "^4.17.4",
"moment": "^2.18.1",
"native-base": "^2.3.7",
"prop-types": "^15.5.10",
"react": "16.2.0",
"react-native": "0.52.2",
"react-native-action-button": "^2.8.4",
"react-native-actioncable": "^0.0.3",
"react-native-android-permissions": "^1.0.0",
"react-native-animatable": "^1.2.4",
"react-native-callkit": "^1.3.1",
"react-native-code-push": "^5.2.1",
"react-native-communications": "^2.2.1",
"react-native-config": "^0.11.5",
"react-native-contacts": "^2.1.1",
"react-native-device-info": "^0.14.0",
"react-native-exception-handler": "^2.7.1",
"react-native-flags": "^1.0.0",
"react-native-geocoder": "^0.5.0",
"react-native-i18n": "^2.0.11",
"react-native-image-crop-picker": "^0.19.1",
"react-native-image-picker": "^0.26.7",
"react-native-image-progress": "^1.0.1",
"react-native-in-app-notification": "^2.2.0",
"react-native-infinite-scroll-view": "^0.4.3",
"react-native-keep-awake": "^2.0.6",
"react-native-keyboard-aware-scroll-view": "^0.4.3",
"react-native-linear-gradient": "^2.4.0",
"react-native-material-tabs": "https://github.com/pohodnya/react-native-material-tabs",
"react-native-navigation-redux-helpers": "^0.5.0",
"react-native-newrelic": "^1.1.1",
"react-native-onesignal": "^3.0.9",
"react-native-pjsip": "^2.7.1",
"react-native-progress": "^3.4.0",
"react-native-prompt": "https://github.com/pohodnya/react-native-prompt",
"react-native-qrcode-svg": "^5.0.6",
"react-native-restart": "^0.0.6",
"react-native-round-flags": "^1.0.4",
"react-native-sglistview": "^0.4.5",
"react-native-share": "^1.0.24",
"react-native-slider": "^0.11.0",
"react-native-statusbar-alert": "^0.4.0",
"react-native-svg": "6.0.0",
"react-native-swipe-list-view": "^1.0.5",
"react-native-switch-pro": "^0.4.6",
"react-native-table-component": "^1.1.3",
"react-native-vector-icons": "^4.5.0",
"react-native-version-number": "^0.3.1",
"react-native-voip-push-notification": "^1.1.1",
"react-navigation": "^1.0.0-beta.27",
"react-redux": "^5.0.6",
"realm": "^2.2.6",
"redux": "^3.7.2",
"redux-api": "^0.11.2",
"redux-logger": "^3.0.6",
"redux-mock-store": "^1.5.1",
"redux-persist": "^4.6.0-es",
"redux-storage": "^4.1.2",
"redux-storage-engine-reactnativeasyncstorage": "^1.0.5",
"redux-thunk": "^2.2.0",
"remote-redux-devtools": "^0.5.12",
"snakecase-keys": "^1.1.0",
"url": "^0.11.0",
"uuid": "^3.1.0"
},
"devDependencies": {
"babel-jest": "19.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "19.0.2",
"react-test-renderer": "~15.4.1"
},
"jest": {
"preset": "react-native"
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
5 reasons your project management process isn't working
Are you working or scrambling? · Problem 1: You can't keep up with all the ad hoc requests. · Problem 2: You can't...
Read more >Project Not Working - Microsoft Community
I just signed up for this. I need to use it and I can't. I keep getting this error whenever I try to...
Read more >I did not work on my final year project properly, now ... - Quora
I did not work on my final year project properly, now what should I say in interviews?
Read more >Just found I was supposed to be working on a completely ...
Do not try to blame anyone, but make clear that you never received any order to do something on this project and thus...
Read more >Troubleshooting - What to do when it won't work! - YouTube
It happens to everyone - you build a project, turn it on and it doesn't work ! Today I'll go over the art...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Won’t stay awake in one of my apps. The screen turns off after the time specified in the settings.
A bit of a late comment, but for anyone that that has problems with this plugin not working and finding this issue, here are my findings.
For me, the KeepAwake.activate() call did not have any effect and the screen went to sleep.
This happened on iOS only (tested on iPad Air 2, iPhone 6 and iPhone XS) and I realised that when running the app from Xcode (running by pressing play button), then the plugin doesn’t seem to work.
As soon as I don’t run from Xcode and just start the app from the device the screen does not go to sleep.
Thanks for a great plugin!