diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..8aab9a9d --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# Specifies intentionally untracked files to ignore when using Git +# http://git-scm.com/docs/gitignore + +*~ +*.sw[mnpcod] +*.log +*.tmp +*.tmp.* +log.txt +*.sublime-project +*.sublime-workspace +.vscode/ +npm-debug.log* + +.idea/ +.sourcemaps/ +.sass-cache/ +.tmp/ +tmp/ +$RECYCLE.BIN/ + +.DS_Store +Thumbs.db diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..8aab9a9d --- /dev/null +++ b/.npmrc @@ -0,0 +1,23 @@ +# Specifies intentionally untracked files to ignore when using Git +# http://git-scm.com/docs/gitignore + +*~ +*.sw[mnpcod] +*.log +*.tmp +*.tmp.* +log.txt +*.sublime-project +*.sublime-workspace +.vscode/ +npm-debug.log* + +.idea/ +.sourcemaps/ +.sass-cache/ +.tmp/ +tmp/ +$RECYCLE.BIN/ + +.DS_Store +Thumbs.db diff --git a/CHANGELOG.md b/CHANGELOG.md index bb3e6f6e..30905e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ ## ChangeLog +#### Version 0.7.5 +- Fixed onactivate call +- Merged new Android permissions -#### Version 0.7.3 (07.08.2019) +#### Version 0.7.4 +- Fixed iOS 12.2 crashes +- Merged original repository Android source updates + +#### Version 0.7.3.2 (07.08.2019) This is more a "just publish all changes after long time" release. - [___change___:] Removed code for Windows 10 Mobile - [feature:] Check if screen is off on Android @@ -10,6 +17,12 @@ This is more a "just publish all changes after long time" release. - [bugfix:] Cannot install plugin on cordova > 9 - [bugfix:] Function `onactivate` does no longer exist +#### Version 0.7.3 +- fixed iOS crashes +- Check if screen is off on Android +- Wake-up device on Android +- Unlock device on Android + #### Version 0.7.2 (02.02.2017) - Fixed app freeze on iOS using wkwebview-engine - Websocket sample in SampleApp diff --git a/README.md b/README.md index bde896a8..2bf3b0a2 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,10 @@ SAMPLE APP :point_right:

-Cordova Background Plugin [![npm version](https://badge.fury.io/js/cordova-plugin-background-mode.svg)](http://badge.fury.io/js/cordova-plugin-background-mode) [![Build Status](https://travis-ci.org/katzer/cordova-plugin-background-mode.svg?branch=master)](https://travis-ci.org/katzer/cordova-plugin-background-mode) [![codebeat badge](https://codebeat.co/badges/49709283-b313-4ced-8630-f520baaec7b5)](https://codebeat.co/projects/github-com-katzer-cordova-plugin-background-mode) +Cordova Background Plugin iOS Fix [![npm version](https://badge.fury.io/js/cordova-plugin-background-mode.svg)](http://badge.fury.io/js/cordova-plugin-background-mode) [![Build Status](https://travis-ci.org/katzer/cordova-plugin-background-mode.svg?branch=master)](https://travis-ci.org/katzer/cordova-plugin-background-mode) [![codebeat badge](https://codebeat.co/badges/49709283-b313-4ced-8630-f520baaec7b5)](https://codebeat.co/projects/github-com-katzer-cordova-plugin-background-mode) +Implemented ios 12.2 fix ========================= +[cordova-plugin-background-mode](https://github.com/katzer/cordova-plugin-background-mode) fork. Fixed iOS crashes Plugin for the [Cordova][cordova] framework to perform infinite background execution. @@ -27,21 +29,10 @@ Use the plugin by your own risk! ## Installation The plugin can be installed via [Cordova-CLI][CLI] and is publicly available on [NPM][npm]. -Execute from the projects root folder: - - $ cordova plugin add cordova-plugin-background-mode - -Or install a specific version: - - $ cordova plugin add de.appplant.cordova.plugin.background-mode@VERSION Or install the latest head version: - $ cordova plugin add https://github.com/katzer/cordova-plugin-background-mode.git - -Or install from local source: - - $ cordova plugin add cordova-plugin-background-mode --searchpath + $ cordova plugin add https://github.com/thompsd3/cordova-plugin-background-mode.git ## Usage @@ -91,6 +82,16 @@ cordova.plugins.backgroundMode.un('EVENT', function); ``` +## iOS specifics + +### Update MainController (hacky for now until I can integrate into plugin) +Further information can be found in this post https://stackoverflow.com/questions/9660488/ios-avaudioplayer-doesnt-continue-to-next-song-while-in-background + +You need this code in either your first view controller's init or viewDidLoad method: +```c +[[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; +``` + ## Android specifics ### Transit between application states @@ -205,4 +206,4 @@ Made with :yum: from Leipzig [changelog]: CHANGELOG.md [apache2_license]: http://opensource.org/licenses/Apache-2.0 [appplant]: http://appplant.de -[meshfields]: http://meshfields.de \ No newline at end of file +[meshfields]: http://meshfields.de diff --git a/package.json b/package.json index a0c90c35..13a32e12 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cordova-plugin-background-mode", - "version": "0.7.3", - "description": "Prevent apps from going to sleep in background.", + "version": "0.7.5", + "description": "Prevent apps from going to sleep in background. iOS fix.", "cordova": { "id": "cordova-plugin-background-mode", "platforms": [ @@ -12,7 +12,7 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/katzer/cordova-plugin-background-mode.git" + "url": "git+https://github.com/thompsd3/cordova-plugin-background-mode.git" }, "keywords": [ "appplant", @@ -25,17 +25,17 @@ "engines": [ { "name": "cordova", - "version": ">=3.0.0" + "version": ">=5.0.0" }, { "name": "android-sdk", - "version": ">=16" + "version": ">=21" } ], - "author": "Sebastián Katzer", + "author": "Donnie Thompson", "license": "Apache 2.0", "bugs": { - "url": "https://github.com/katzer/cordova-plugin-background-mode/issues" + "url": "https://github.com/thompsd3/cordova-plugin-background-mode/issues" }, - "homepage": "https://github.com/katzer/cordova-plugin-background-mode#readme" + "homepage": "https://github.com/thompsd3/cordova-plugin-background-mode#readme" } \ No newline at end of file diff --git a/plugin.xml b/plugin.xml index 9ffc87d0..cd38b2aa 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,26 +3,25 @@ - + version="0.7.8"> BackgroundMode - Prevent apps from going to sleep in background. + Prevent apps from going to sleep in background. iOS fix. - https://github.com/katzer/cordova-plugin-background-mode.git + https://github.com/thompsd3/cordova-plugin-background-mode.git appplant, background Apache 2.0 - Sebastián Katzer + Donnie Thompson - + @@ -76,6 +75,8 @@ + +