IOS 10 extension incompatible

Although there is a similarity with another question: iOS 10 does not cause an extension of the notification service

I want to give a more specific problem with a specific misconduct. Consider the following payload:

{ "service-alert":{ "title":"[Service]Title", "subtitle":"[Service]Subtitle", "body":"[Service]Body may be substituted." }, "image":"https://some.small/thumbnail.jpg", "aps":{ "badge":1, "alert":{ "title":"[Default]Title", "subtitle":"[Default]Subtitle", "body":"[Default]A simple body of text." }, "sound":"default", "mutable-content":1 } } 

(the "service-alert" dictionary is designed to test redirects in the default warning text for devices that support it)

I am debugging Xcode on my iOS 10 device (iPhone 6+), I set a breakpoint in the Service Extension to check if it gets the ability to change push before presentation.

When I send push, there are times when the Service Extension (breakpoint) is clicked, I can verify that the push payload is correct, and the displayed push only shows the default “aps” payload. No image. The title / subtitle / body is not changed.

My breakpoint serviceExtensionTimeWillExpire not hit serviceExtensionTimeWillExpire . The notification mechanism seems to work, but the result is incorrect.

When I send the same click again, it works.
The image is downloaded from the image URL, and the changed “service warning” text is displayed according to the design. Sometimes I have to send the same push 2 or 3 times before it works, but after that it seems consistent after that. Thus, if I see the modified notification once, from this point each test test works fine.

I feel, but do not yet have convincing data to support, that a period of inactivity causes the Service Distribution to be reddened, and wake up too slowly when called. If so, it makes him useless, because he will never be completely awake when he receives a click.

Current Wednesday:

  • Xcode 8.2 beta (8C30a)
  • iOS 10.2 beta 2, 3, and 4
  • Debugging Scheme

Can this behavior be confirmed or refuted on iOS 10 beta and / or non-beta? I found error 10.2, or is this "normal behavior?"

+6
source share
1 answer

Using this Pay load Push feature comes with default sound.

 { "aps" : { "alert": { "title": "main title", "subtitle":"Subtitle", "body": "Custom message" }, "badge" : 0, "sound" : "default" } } } 
0
source

Source: https://habr.com/ru/post/1260806/


All Articles