/// <summary> /// 推送给指定的账号,限iOS系统使用。 /// </summary> /// <param name="accessId"></param> /// <param name="secretKey"></param> /// <param name="content"></param> /// <param name="account"></param> /// <param name="env"></param> /// <returns></returns> public static string pushAccountIos(long accessId, string secretKey, string content, string account, iOSEnvironment env) { var message = new MessageIOS(); message.setAlert(content); message.setBadge(1); message.setSound(Constants.beep_wav); var xinge = new XingeApp(accessId, secretKey); var ret = xinge.PushSingleAccount(account, message, env); return(ret); }
/// <summary> /// 推送给绑定标签的设备,限iOS系统使用。 /// </summary> /// <param name="accessId"></param> /// <param name="secretKey"></param> /// <param name="content"></param> /// <param name="tag"></param> /// <param name="env"></param> /// <returns></returns> public static string pushTagIos(long accessId, string secretKey, string content, string tag, iOSEnvironment env) { var message = new MessageIOS(); message.setAlert(content); message.setBadge(1); message.setSound(Constants.beep_wav); var xinge = new XingeApp(accessId, secretKey); var tagList = new List <string> { tag }; string ret = xinge.PushTags(tagList, OR, message, env); return(ret); }