diff --git a/SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.dll b/SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.dll index 5051b37..2fb0dac 100644 Binary files a/SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.dll and b/SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.dll differ diff --git a/SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.pdb b/SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.pdb index 3fd3a81..addeaf4 100644 Binary files a/SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.pdb and b/SDK.Test/bin/Debug/netcoreapp2.1/XingeApp.pdb differ diff --git a/SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.csprojAssemblyReference.cache b/SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.csprojAssemblyReference.cache index 6698576..9e41f09 100644 Binary files a/SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.csprojAssemblyReference.cache and b/SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.csprojAssemblyReference.cache differ diff --git a/SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.csprojResolveAssemblyReference.cache b/SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.csprojResolveAssemblyReference.cache index b055c84..7f2e25b 100644 Binary files a/SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.csprojResolveAssemblyReference.cache and b/SDK.Test/obj/Debug/netcoreapp2.1/SDK.Test.csprojResolveAssemblyReference.cache differ diff --git a/SDK/MessageiOS.cs b/SDK/MessageiOS.cs index f993647..aeaf58f 100755 --- a/SDK/MessageiOS.cs +++ b/SDK/MessageiOS.cs @@ -24,6 +24,11 @@ public class MessageiOS private string m_subtitle; private int m_pushID; + + /// -1,表示角标不变; + /// -2,表示角标自动加+; + /// n,(n >= 0)表示自定义角标数值 + private int m_badgeType; public MessageiOS() { @@ -40,6 +45,7 @@ public MessageiOS() this.m_title = ""; this.m_subtitle = ""; this.m_pushID = 0; + this.m_badgeType = -1; } public void setType(string type) @@ -109,10 +115,12 @@ public void setAlert(Dictionary alert) m_alertJo = alert; } + [Obsolete("方法已经停用,请使用setBadgeType")] public void setBadge(int badge) { m_badge = badge; } + public void setTitle(string title) { this.m_title = title; @@ -162,6 +170,31 @@ public int getPushID() return m_pushID; } + /// 设置角标下发的逻辑 + /// + /// + /// -1 + /// 表示角标不变; + /// + /// + /// -2 + /// 表示角标自动加1; + /// + /// + /// n + /// (n>=0)表示自定义下发角标数字. + /// + /// + /// + public void setBadgeType(int type) + { + m_badgeType = type; + } + + public int badgeType() + { + return m_badgeType; + } public Boolean isValid() { @@ -195,8 +228,8 @@ public object toJson() { Dictionary alert = new Dictionary(); aps.Add("alert",alert); - aps.Add("badge",m_badge); - + // aps.Add("badge",m_badge); + aps.Add("badge_type", m_badgeType); if(m_sound.Length != 0) { aps.Add("sound",m_sound); diff --git a/SDK/bin/Debug/netstandard2.0/XingeApp.dll b/SDK/bin/Debug/netstandard2.0/XingeApp.dll index 5051b37..2fb0dac 100644 Binary files a/SDK/bin/Debug/netstandard2.0/XingeApp.dll and b/SDK/bin/Debug/netstandard2.0/XingeApp.dll differ diff --git a/SDK/bin/Debug/netstandard2.0/XingeApp.pdb b/SDK/bin/Debug/netstandard2.0/XingeApp.pdb index 3fd3a81..addeaf4 100644 Binary files a/SDK/bin/Debug/netstandard2.0/XingeApp.pdb and b/SDK/bin/Debug/netstandard2.0/XingeApp.pdb differ diff --git a/SDK/obj/Debug/netstandard2.0/XingeApp.dll b/SDK/obj/Debug/netstandard2.0/XingeApp.dll index 5051b37..2fb0dac 100644 Binary files a/SDK/obj/Debug/netstandard2.0/XingeApp.dll and b/SDK/obj/Debug/netstandard2.0/XingeApp.dll differ diff --git a/SDK/obj/Debug/netstandard2.0/XingeApp.pdb b/SDK/obj/Debug/netstandard2.0/XingeApp.pdb index 3fd3a81..addeaf4 100644 Binary files a/SDK/obj/Debug/netstandard2.0/XingeApp.pdb and b/SDK/obj/Debug/netstandard2.0/XingeApp.pdb differ