Skip to content
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

Added alarm call that will work in doze mode #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DavidBriglio
Copy link

Also cleanup and Cordova 7+ compatibility

and Cleanup and cordova 7+ compatibility
@DavidBriglio
Copy link
Author

This PR is necessary since all android phones (API 23+) will not respect alarms set if not called by the new setExactAndAllowWhileIdle() method while in doze mode.

Read here for more information.

alexhisen added a commit to alexhisen/cordova-plugin-wakeuptimer that referenced this pull request Aug 28, 2019
@Pratz007-tech
Copy link

Hi DavidBriglio were you able to install this plugin ? Currently I am using cordova 9.0.0 and after doing cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.gitI got following error :
Failed to fetch plugin https://github.com/wnyc/cordova-plugin-wakeuptimer via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.

@DavidBriglio
Copy link
Author

@Pratz007-tech This is because the current plugin state is very old. Plugins now require a package.json file in the root of the plugin. If you add my fork it will work for you: cordova plugin add https://github.com/DavidBriglio/cordova-plugin-wakeuptimer.git. That was also the point of the PR, in order to bring it back up to speed with the spec at the time. I hope this helps!

@Pratz007-tech
Copy link

Thank you so much David Sure will try this out :) Appreciate your support !!

@Pratz007-tech
Copy link

Does this plugin support has ios UIWebView resolved ? As in if I install this plugin & use will it resolve the ios issue :
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs

@DavidBriglio
Copy link
Author

@Pratz007-tech I do not think this will solve that issue for you. The main issue you are seeing is caused by not using the newer webview: WKWebView. Once you switch to this you should no longer see those errors: https://cordova.apache.org/howto/2020/07/18/uiwebview-warning.html

@Pratz007-tech
Copy link

Hey Thanks David I had already checked and implemented the changes but I am facing issue for the same have added my query comment on the blog you mentioned.

@Pratz007-tech
Copy link

Why am i getting this error in xcode even after installing plugin on cordova setup ERROR: Plugin 'WakeupPlugin' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. When checked in myApp --> plugins --> cordova-plugin-wakeuptimer --> plugin.xml unlike other plugin.xml file I could only see there is no <platform name="ios"'> nor <platform name="'browser"'>. Would be great if you help me out.

@DavidBriglio
Copy link
Author

DavidBriglio commented Aug 5, 2020

You are seeing this because my fork had removed iOS support. Use my 'doze-handling' branch specifically if you want a version that has iOS support and has a valid package.json file:
cordova plugin add https://github.com/DavidBriglio/cordova-plugin-wakeuptimer#doze-handling

I'm not sure what the state is of that iOS support though.

@Pratz007-tech
Copy link

Thanks David. I added your plugin via the command --> cordova plugin add https://github.com/DavidBriglio/cordova-plugin-wakeuptimer#doze-handling. Also tried adding & removing ios platform my build is getting failed . Error trace as follows :
The following build commands failed:
CompileC /Users/abc/Library/Developer/Xcode/DerivedData/myApp-asdsfdfdsfdfdsyevkqfsc/Build/Intermediates.noindex/myApp.build/Debug-iphonesimulator/myApp.build/Objects-normal/x86_64/WakeupPlugin.o /Users/abc/Desktop/myApp/platforms/ios/myApp/Plugins/org.nypr.cordova.wakeupplugin/WakeupPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild: Command failed with exit code 65

@Pratz007-tech
Copy link

While digged in detail via xcode it showed me issue saying Use of undeclared identifier : 'CDVLocalNotification' in myApp --> plugins --> org.nypr.cordova.wakeuptimer --> src -->ios --> WakeUpPlugin.m (line no . 51 & 454)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants