美文网首页
iOS消息推送研究

iOS消息推送研究

作者: 我是小胡胡123 | 来源:发表于2017-07-26 23:37 被阅读30次

1,mutable-content:1 才会进入notifcaitonservice扩展。
友盟,推送勾选内容链接,则自动增加mutable-content:1
mutable-content
2,友盟的自定义参数,为加到aps之外。

UNNotificationResponse = {
  "actionIdentifier" : "com.apple.UNNotificationDefaultActionIdentifier",
  "UNNotificationResponse" : {
    "date" : "2017-07-26  23:34:09",
    "UNNotificationRequest" : {
      "UNNotificationContent" : {
        "userInfo" : {
          "d" : "us11522150108324571311",
          "mutable-content" : "1",
          "p" : 0,
          "aps" : {
            "sound" : "default",
            "alert" : {
              "title" : "sfdasdf",
              "subtitle" : "asdfas",
              "body" : "dfasdf"
            }
          }
        },
        "badge" : 0,
        "launchImageName" : "",
        "subtitle" : "asdfas",
        "threadIdentifier" : "",
        "title" : "sfdasdf",
        "body" : "dfasdf",
        "categoryIdentifier" : "",
        "UNNotificationAttachment" : [

        ]
      },
      "identifier" : "us11522150108324571311"
    }
  }
}




{
    "aps":{
        "alert":{
            "title":"3",
            "subtitle":"sdfashello",
            "body":"你有新的消息请注意查收"
        },
        "sound":"11.aif",
        "badge":0,
        "mutable-content":1,
        "category":"myNotificationCategory"
    },
    "sound":"2.jpeg",
    "sound2":"01.mp3"
}



UNNotificationRequest = {
    UNNotificationContent =     {
        UNNotificationAttachment =         (
        );
        badge = 0;
        body = "\U4f60\U6709\U65b0\U7684\U6d88\U606f\U8bf7\U6ce8\U610f\U67e5\U6536";
        categoryIdentifier = myNotificationCategory;
        launchImageName = "";
        subtitle = sdfashello;
        threadIdentifier = "";
        title = 3;
        userInfo =         {
            aps =             {
                alert =                 {
                    body = "\U4f60\U6709\U65b0\U7684\U6d88\U606f\U8bf7\U6ce8\U610f\U67e5\U6536";
                    subtitle = sdfashello;
                    title = 3;
                };
                badge = 0;
                category = myNotificationCategory;
                "mutable-content" = 1;
                sound = "11.aif";
            };
            sound = "2.jpeg";
            sound2 = "01.mp3";
        };
    };
    identifier = "E1B3D9D5-4EF7-4551-B697-A67FB0B52DB4";
}


UNNotification = {
  "date" : "2017-06-29  22:32:27",
  "UNNotificationRequest" : {
    "UNNotificationContent" : {
      "userInfo" : {
        "aps" : {
          "badge" : 0,
          "mutable-content" : 1,
          "alert" : {
            "title" : "3",
            "subtitle" : "sdfashello",
            "body" : "你有新的消息请注意查收"
          },
          "category" : "myNotificationCategory",
          "sound" : "11.aif"
        },
        "sound" : "2.jpeg",
        "sound2" : "01.mp3"
      },
      "badge" : 0,
      "launchImageName" : "",
      "subtitle" : "sdfashello",
      "threadIdentifier" : "",
      "title" : "3 [modified]",
      "body" : "你有新的消息请注意查收",
      "categoryIdentifier" : "myNotificationCategory",
      "UNNotificationAttachment" : [
        {
          "URL" : "file:\/\/\/var\/mobile\/Library\/SpringBoard\/PushStore\/Attachments\/com.lanqxyihhenguisleu.1\/56cac0f0c13a47ce9483d994427f5c381db40cc1.mp3",
          "type" : "public.mp3",
          "identifier" : "attachmentid"
        }
      ]
    },
    "identifier" : "2867A40B-A0B6-4451-98A5-457744292EEC"
  }
}



UNNotification = {
  "date" : "2017-06-29  22:34:08",
  "UNNotificationRequest" : {
    "UNNotificationContent" : {
      "userInfo" : {
        "aps" : {
          "sound" : "11.aif",
          "mutable-content" : 1,
          "alert" : {
            "title" : "3",
            "subtitle" : "sdfashello",
            "body" : "你有新的消息请注意查收"
          },
          "category" : "myNotificationCategory",
          "badge" : 0
        },
        "sound" : "2.jpeg",
        "sound2" : "01.mp3"
      },
      "badge" : 0,
      "launchImageName" : "",
      "subtitle" : "sdfashello",
      "threadIdentifier" : "",
      "title" : "3 [modified]",
      "body" : "你有新的消息请注意查收",
      "categoryIdentifier" : "myNotificationCategory",
      "UNNotificationAttachment" : [
        {
          "URL" : "file:\/\/\/var\/mobile\/Library\/SpringBoard\/PushStore\/Attachments\/com.lanqxyihhenguisleu.1\/56cac0f0c13a47ce9483d994427f5c381db40cc1.mp3",
          "type" : "public.mp3",
          "identifier" : "attachmentid"
        }
      ]
    },
    "identifier" : "2C0FF4EE-286A-4739-BB0F-BBD7889A236B"
  }
}



UNNotificationResponse = {
  "actionIdentifier" : "查看",
  "UNNotificationResponse" : {
    "date" : "2017-06-29  22:32:27",
    "UNNotificationRequest" : {
      "UNNotificationContent" : {
        "userInfo" : {
          "aps" : {
            "badge" : 0,
            "mutable-content" : 1,
            "alert" : {
              "title" : "3",
              "subtitle" : "sdfashello",
              "body" : "你有新的消息请注意查收"
            },
            "category" : "myNotificationCategory",
            "sound" : "11.aif"
          },
          "sound" : "2.jpeg",
          "sound2" : "01.mp3"
        },
        "badge" : 0,
        "launchImageName" : "",
        "subtitle" : "sdfashello",
        "threadIdentifier" : "",
        "title" : "3 [modified]",
        "body" : "你有新的消息请注意查收",
        "categoryIdentifier" : "myNotificationCategory",
        "UNNotificationAttachment" : [
          {
            "URL" : "file:\/\/\/var\/mobile\/Library\/SpringBoard\/PushStore\/Attachments\/com.lanqxyihhenguisleu.1\/56cac0f0c13a47ce9483d994427f5c381db40cc1.mp3",
            "type" : "public.mp3",
            "identifier" : "attachmentid"
          }
        ]
      },
      "identifier" : "2867A40B-A0B6-4451-98A5-457744292EEC"
    }
  }
}

相关文章

  • iOS消息推送研究

    1,mutable-content:1 才会进入notifcaitonservice扩展。友盟,推送勾选内容链接,...

  • 细说 iOS 消息推送

    细说 iOS 消息推送 细说 iOS 消息推送

  • iOS-推送(基础)

    一、iOS推送原理 IOS推送消息是许多IOS应用都具备的功能,最近也在研究这个功能,参考了很多资料终于搞定了,下...

  • 阿里云消息推送

    消息推送大部分App都要,这里引用了阿里云推送,不过说的是数据结构设计和研究。 iOS/Android 消息推送,...

  • 极光推送(Jpush) Java实现

    大家在做消息推送时, 有没有去分别研究过android 和ios的消息推送原理,反正我觉得挺恶心的,所以还是借力于...

  • iOS 远程推送通知

    iOS 远程推送通知 分分钟搞定IOS远程消息推送 iOS推送通知的实现步骤 推送通知iOS客户端编写实现及推送服...

  • iOS 远程消息推送 APNS推送原理和一步一步开发详解篇(新手

    iOS 远程消息推送 APNS推送原理和一步一步开发详解篇(新手推荐) iOS 远程消息推送 APNS推送原理和一...

  • iOS 10新特性 - 自定义消息推送界面

    关于消息推送,网路上的博客已经讲得非常详尽,最近研究一个自定义消息推送界面的需求,是iOS 10以后才有的新特性,...

  • 技术贴合集

    iOS网络图片尺寸适配 iOS 10 消息推送(UserNotifications)秘籍总结 静默推送 iOS 面...

  • iOS开发常用之消息相关

    消息相关 消息推送客户端 SGPushDemo - 消息推送客户端 Orbiter - 消息推送客户端:iOS...

网友评论

      本文标题:iOS消息推送研究

      本文链接:https://www.haomeiwen.com/subject/sgjakxtx.html