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

iOS 7/ iOS 8 backwards compatability #7

Open
wants to merge 168 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
a86a91f
Reference Cordove 2.2.0 and obscure sender id from example
bobeast Dec 4, 2012
24b0e18
Cleanup documentation and sample layout
bobeast Dec 19, 2012
e25e44d
Cleanup file hierarchy and clarify it in manual installation section …
bobeast Dec 19, 2012
ac095d7
cleanup onLoad functionality
bobeast Jan 17, 2013
cb52942
Update README.md
colene Jan 24, 2013
64204b8
Merge pull request #1 from colene/patch-1
bobeast Jan 24, 2013
e52c125
Add compatibility with 2.3.0
bobeast Feb 2, 2013
1d660fe
Add support for background notifications
bobeast Feb 5, 2013
f854ec2
Add v13 compatibility shim
bobeast Feb 5, 2013
f4703ba
Grab app icon without assuming package name
bobeast Feb 7, 2013
d5f78d0
cleanup construction
bobeast Feb 8, 2013
947468b
Remove old cordova alias
bobeast Feb 9, 2013
b7a2569
Add flag for foreground vs. background for iOS
bobeast Feb 12, 2013
60cb9c7
send entire payload to JS app
bobeast Feb 14, 2013
d61412e
Clean up some unused imports
bobeast Feb 14, 2013
33459fc
Update read me and examples to reflect status bar notifications changes
bobeast Feb 15, 2013
778bbbb
Surface custom key/value pairs to JS for iOS
bobeast Feb 19, 2013
a412c1c
Don't choke if no msgcnt or message values are passed in the notifica…
bobeast Feb 21, 2013
08783e4
Dismiss notification from tray once it has been processed
bobeast Feb 21, 2013
a3dc402
Bump the plugin version
bobeast Feb 21, 2013
2ee858f
Always refresh the content Intent on new notifications.
bobeast Mar 6, 2013
fa8ea29
and bump the version
bobeast Mar 6, 2013
de8c1c5
Remove use of now private uniqueIdentifier accessor
bobeast Mar 22, 2013
86bec0e
bump version for uniqueidentifier fix
bobeast Mar 22, 2013
595e762
Add cold-start functionality
bobeast Mar 26, 2013
a6f665d
Update documentation to reflect new coldstart functionality
bobeast Mar 26, 2013
90fe5b0
Update README.md
markeeftb Mar 27, 2013
43c7d53
Update PushPlugin for 2.5.0+
bobeast Mar 28, 2013
33c34d5
Get rid of deprecated call to getContext()
bobeast Apr 9, 2013
8783b8b
Merge pull request #3 from markeeftb/patch-1
bobeast Apr 15, 2013
bf9e047
Add plugman support
bobeast May 10, 2013
3b24728
Add jasmin test spec
bobeast May 10, 2013
7405313
bump version after adding test spec
bobeast May 10, 2013
9c53a2f
Fix the spec
bobeast May 10, 2013
71cb7f3
fully qualified paths for ios.
filmaj May 16, 2013
b4ff58e
Merge pull request #4 from filmaj/master
bobeast May 16, 2013
30a413b
Updated to Cordova 2.7, fixed a number of bugs. Cleaned up some code.
May 17, 2013
00a8a22
moved libs/gcm.jar to src/android/libs/gcm.jar for plugman compatibility
May 28, 2013
0eab86f
bump version to deliniate 1st Plugman version
bobeast May 30, 2013
2d59987
Remove config file from spec for plugman compatibility
bobeast Jun 4, 2013
720fb77
Accept either Boolean or string argiuments to register method for iOS
bobeast Jun 4, 2013
dd4ca03
Merge pull request #5 from NetMatch/master
bobeast Jun 5, 2013
69fc815
Update documentation for pluginstall
bobeast Jun 5, 2013
06dc8cc
error callback for setApplicationIconBadgeNumber
Jun 6, 2013
437fb4a
Merge pull request #11 from Michael-vb/master
bobeast Jun 6, 2013
8e2c25d
surface payload when app is launched from incoming notification on iOS
bobeast Jun 7, 2013
9baf9f7
Bump version
bobeast Jun 7, 2013
c6ce167
[plugman] renaming GCM/ to gcm/ to make plugman work
Jun 10, 2013
4c53bb3
[1.3.2] upped version
Jun 10, 2013
e7f8c81
Add description tag
bobeast Jun 18, 2013
b51d164
made code more readable and better :-)
Jul 7, 2013
3a5229e
[plugin.xml] add license tag
goya Jul 9, 2013
ed96570
Update plugin.xml
jdhiro Jul 23, 2013
2d17b4a
Clean up and formatting
jdhiro Jul 23, 2013
739476f
Updating java imports to work with the new Cordova 3.0 API
jdhiro Jul 23, 2013
fe01c16
Updating iOS PushPlugin for ARC builds (cordova-cli 3.0 default confi…
jdhiro Jul 23, 2013
a359fa5
Getting the plugin to register on iOS in a Cordova 3.0 environment
jdhiro Jul 24, 2013
b5640c6
Fix typo: successCallback should be errorCallback
rjmunro Aug 23, 2013
669c15f
Restrict current version of plugin to PG < 3.0
bobeast Sep 9, 2013
d91f7a2
remove trailing tab
bobeast Sep 9, 2013
dc03338
Add author element
bobeast Sep 9, 2013
1660c4e
Escape < and > in engines element
bobeast Sep 9, 2013
9beb8b2
Use canonical namespace prefix for plugin id
bobeast Sep 9, 2013
4dd9684
Make fuzzy version matching a little less fuzzy
bobeast Sep 9, 2013
ad19c70
Bump version to 1.3.5
bobeast Sep 9, 2013
99050b9
Try with explicit version matching
bobeast Sep 10, 2013
8b23e04
bump version
bobeast Sep 10, 2013
406d138
Return of fuzzy version matching
bobeast Sep 10, 2013
7a5d5fb
Update the readme with new domain prefix and correct plugman instruct…
bobeast Sep 10, 2013
9036ea0
Merge pull request #61 from phonegap-build/bobeast-fixes
bobeast Sep 10, 2013
20bbc66
add support for 3.0.0
bobeast Sep 10, 2013
1247986
Merge pull request #49 from rjmunro/patch-1
bobeast Sep 10, 2013
6ffb58b
Merge pull request #32 from florianbachmann/master
bobeast Sep 10, 2013
91e7878
Bump version after some miner pull requests
bobeast Sep 10, 2013
9f6465d
Eliminate need for GET_TASKS permission
rjmunro Sep 10, 2013
9a89ce8
added a missing comma after errorHanlder
smorstabilini Sep 13, 2013
d2680f1
Merge pull request #65 from smorstabilini/master
bobeast Sep 13, 2013
3a40075
Fixes Cordova error when trying to open the app from the notification…
Sep 24, 2013
82606ac
Sets default notification sound, vibration and lights and removes use…
Sep 24, 2013
585a84c
Merge pull request #69 from rubennorte/master
bobeast Sep 26, 2013
91863c2
Merge pull request #64 from rjmunro/feature/eliminate-get-tasks
bobeast Sep 26, 2013
a7a47ee
enable syntax highlighting for code examples
armno Sep 26, 2013
a5ddf01
use tabs instead of spaces for indentation (to be consistent)
armno Sep 26, 2013
9a745a6
Added getString method to setContentTitle and setTicker
madebycm Oct 1, 2013
860bca6
added foreground boolean
edewit Oct 4, 2013
a5aa12d
initially app is in foreground
edewit Oct 4, 2013
f0b6612
do not add notification if application in foreground
edewit Oct 4, 2013
3b7e924
Don't use two different bundle ids
bobeast Oct 4, 2013
1bbc0a2
Death of a bad idea
bobeast Oct 4, 2013
39c9871
Merge pull request #71 from armno/readme-syntax-highlighting
bobeast Oct 4, 2013
3cff2aa
Merge pull request #76 from madebycm/master
bobeast Oct 4, 2013
486c877
Merge pull request #80 from edewit/foreground
bobeast Oct 4, 2013
8c8db7b
Fix Application badge number issue for >3.0
bobeast Oct 4, 2013
22ad59f
getString should be extras.getString
Oct 7, 2013
b411a38
Merge pull request #83 from igama/master
bobeast Oct 7, 2013
c5dfcb1
Added clobbers
mkuklis Oct 12, 2013
9852a6c
Added PushNotification to module.exports.
mkuklis Oct 12, 2013
2c20456
Fixed clobbers
mkuklis Oct 12, 2013
80735f0
Encapsulating strings in single quotes is not valid JSON. Change to d…
chriswiggins Oct 16, 2013
89477f1
Remove trailing comma for foreground flag and convert to double quotes
chriswiggins Oct 16, 2013
504a8b4
call callbacks
edewit Oct 25, 2013
0720ade
Merge branch 'master' of github.com:phonegap-build/PushPlugin into ca…
edewit Oct 25, 2013
2257ae8
Merge pull request #98 from edewit/callback
bobeast Oct 28, 2013
a22911d
Merge pull request #91 from chriswiggins/json_fix
bobeast Oct 28, 2013
23a130b
Merge pull request #87 from mkuklis/master
bobeast Oct 28, 2013
09570c4
#85 No notifications in android when the app is closed
Oct 31, 2013
8590b64
Merge pull request #99 from scotthooker/master
bobeast Oct 31, 2013
8d91c7d
bump version for cold-start notification fix
bobeast Oct 31, 2013
069c728
Initially the app is not inforeground
Oct 31, 2013
a6d9668
remove changes
Nov 1, 2013
fb22a69
this is the best case
Nov 1, 2013
a0f2427
Merge pull request #102 from scotthooker/master
bobeast Nov 2, 2013
5bc371c
Make notifications more consistent when not in the foreground
bobeast Nov 2, 2013
158f755
json key should be surrounded by quotation
Nov 13, 2013
4a50133
Update plugin.xml
cuatl Nov 13, 2013
258e32a
Merge pull request #114 from cuatl/master
bobeast Nov 13, 2013
cd8bae9
escape newlines, double-quotes and back-slashes of push message
Nov 19, 2013
0eabba5
On Android, don't post notification twice if in the foreground
bobeast Nov 23, 2013
2a36eaa
Merge pull request #111 from ma2/master
bobeast Nov 23, 2013
b0c0327
Capitalization error in example
bobeast Nov 23, 2013
361e957
fix e.regid in README
cuatl Nov 23, 2013
8f11b31
Update README.md
keab42 Nov 25, 2013
e71da3d
Fixed quoute unescaping for non string values
fesor Nov 30, 2013
e42c659
Added instrucction to Android manual installation
sebastiansier Dec 1, 2013
bad78b8
Merge pull request #122 from cuatl/master
bobeast Dec 3, 2013
4487e9e
Merge pull request #129 from fesor/master
bobeast Dec 3, 2013
0b4aa1d
Merge pull request #130 from sebastiansier/android_installation
bobeast Dec 3, 2013
cf88ef4
Fix some assumptions about payload content.
bobeast Dec 3, 2013
93067b9
Merge pull request #124 from keab42/patch-1
bobeast Dec 3, 2013
dc9d495
shutdown cleanup
bobeast Dec 9, 2013
e5ecdc6
Added WP8 support
EddyVerbruggen Mar 14, 2014
b948db3
Added amazon-fireos platform.
Mar 21, 2014
f9f45d6
Updated readme file with Fire OS details.
Mar 26, 2014
e23ef7e
Fixed couple of issues - 1. permission denied when launching the app …
Apr 1, 2014
377ac1a
Config options are persisted now. When app is forced stopped, we read…
Apr 3, 2014
76fde26
Update error message for Otter1 where ADM is not supported
Apr 4, 2014
34b11b6
HTML decoding the message before adding it to notification.
Apr 8, 2014
3cee78a
Updated event names for the callback so existing sample code works wi…
Apr 10, 2014
c1c8a8d
Added amazon-fireos platform.
Mar 21, 2014
da3c5f9
Updated readme file with Fire OS details.
Mar 26, 2014
c66ab15
Fixed couple of issues - 1. permission denied when launching the app …
Apr 1, 2014
eb69be3
Config options are persisted now. When app is forced stopped, we read…
Apr 3, 2014
4aa063a
Update error message for Otter1 where ADM is not supported
Apr 4, 2014
b03226d
HTML decoding the message before adding it to notification.
Apr 8, 2014
dda679a
Updated event names for the callback so existing sample code works wi…
Apr 10, 2014
ce95a56
typo
EddyVerbruggen May 1, 2014
f2b813b
Take deserialization outside the methods as it can be reused.
nadyaA Apr 7, 2014
2071e52
One channel per application and js callback functions.
nadyaA Apr 7, 2014
14e811d
Add unregister channel
nadyaA Apr 7, 2014
aef10ca
Add unified handling of raw and toast notifications
nadyaA Apr 7, 2014
4aa9dc1
Update readme file
nadyaA Apr 8, 2014
334cc09
Update readme file
EddyVerbruggen May 1, 2014
2569134
Merge remote-tracking branch 'upstream/master'
May 9, 2014
ad3993e
Formatting fix
EddyVerbruggen May 9, 2014
ecb94e6
[PushPlugin] Coldstart property missing from notification event in Ja…
May 13, 2014
7814be0
Updated README file. Updated index.html.
May 13, 2014
f70b104
Update README.md
russellbeattie May 13, 2014
2de5253
Update index.html
russellbeattie May 13, 2014
6d318d7
Merge pull request #2 from russellbeattie/patch-2
archananaik May 14, 2014
b603c7e
Merge pull request #1 from russellbeattie/patch-1
archananaik May 14, 2014
97b8038
Merge pull request #216 from archananaik/master
EddyVerbruggen May 14, 2014
60389e4
Fix link
BBosman May 14, 2014
52907a1
Merge pull request #217 from BBosman/incubator
EddyVerbruggen May 14, 2014
e007613
remove condition to test if web view is in loading state
bmatto May 14, 2014
6660fb4
Merge pull request #218 from bmatto/ios-from-active-state
EddyVerbruggen May 19, 2014
f7cadb6
Fix xml validation for plugin.xml
May 27, 2014
54e59bc
Merge pull request #227 from antistatique/hotfix/plugin-xml
EddyVerbruggen May 27, 2014
e4f97f9
backwards compatability for ios7 and ios8
jasonhr13 Jun 23, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix Application badge number issue for >3.0
  • Loading branch information
bobeast committed Oct 4, 2013
commit 8c8db7bb2a1ca9a7dd058d96795051192688a75f
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.phonegap.plugins.PushPlugin"
version="2.0.2">
version="2.0.3">

<name>PushPlugin</name>
<author>Bob Easterday</author>
14 changes: 7 additions & 7 deletions src/ios/PushPlugin.m
Original file line number Diff line number Diff line change
@@ -198,17 +198,17 @@ -(void)parseDictionary:(NSDictionary *)inDictionary intoJSON:(NSMutableString *)
}
}

- (void)setApplicationIconBadgeNumber:(NSMutableArray *)arguments withDict:(NSMutableDictionary *)options {
DLog(@"setApplicationIconBadgeNumber:%@\n withDict:%@", arguments, options);

self.callbackId = [arguments pop];

- (void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command {

self.callbackId = command.callbackId;

NSMutableDictionary* options = [command.arguments objectAtIndex:0];
int badge = [[options objectForKey:@"badge"] intValue] ?: 0;

[[UIApplication sharedApplication] setApplicationIconBadgeNumber:badge];

[self successWithMessage:[NSString stringWithFormat:@"app badge count set to %d", badge]];
}

-(void)successWithMessage:(NSString *)message
{
CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];