@@ -11,41 +11,52 @@ type EPushType string
11
11
const (
12
12
// PushTypeAlert is used for notifications that trigger a user interaction —
13
13
// for example, an alert, badge, or sound. If you set this push type, the
14
- // apns-topic header field must use your app’s bundle ID as the topic. The
15
- // alert push type is required on watchOS 6 and later. It is recommended on
16
- // macOS, iOS, tvOS, and iPadOS.
14
+ // topic field must use your app’s bundle ID as the topic. If the
15
+ // notification requires immediate action from the user, set notification
16
+ // priority to 10; otherwise use 5. The alert push type is required on
17
+ // watchOS 6 and later. It is recommended on macOS, iOS, tvOS, and iPadOS.
17
18
PushTypeAlert EPushType = "alert"
18
19
19
20
// PushTypeBackground is used for notifications that deliver content in the
20
21
// background, and don’t trigger any user interactions. If you set this push
21
- // type, the apns-topic header field must use your app’s bundle ID as the
22
- // topic. The background push type is required on watchOS 6 and later. It is
23
- // recommended on macOS, iOS, tvOS, and iPadOS.
22
+ // type, the topic field must use your app’s bundle ID as the topic. Always
23
+ // use priority 5. Using priority 10 is an error. The background push type
24
+ // is required on watchOS 6 and later. It is recommended on macOS, iOS,
25
+ // tvOS, and iPadOS.
24
26
PushTypeBackground EPushType = "background"
25
27
28
+ // PushTypeLocation is used for notifications that request a user’s
29
+ // location. If you set this push type, the topic field must use your app’s
30
+ // bundle ID with .location-query appended to the end. The location push
31
+ // type is recommended for iOS and iPadOS. It isn’t available on macOS,
32
+ // tvOS, and watchOS. If the location query requires an immediate response
33
+ // from the Location Push Service Extension, set notification apns-priority
34
+ // to 10; otherwise, use 5. The location push type supports only token-based
35
+ // authentication.
36
+ PushTypeLocation EPushType = "location"
37
+
26
38
// PushTypeVOIP is used for notifications that provide information about an
27
- // incoming Voice-over-IP (VoIP) call. If you set this push type, the
28
- // apns-topic header field must use your app’s bundle ID with .voip appended
29
- // to the end. If you’re using certificate-based authentication, you must
30
- // also register the certificate for VoIP services. The voip push type is
31
- // not available on watchOS. It is recommended on macOS, iOS, tvOS, and
32
- // iPadOS.
39
+ // incoming Voice-over-IP (VoIP) call. If you set this push type, the topic
40
+ // field must use your app’s bundle ID with .voip appended to the end. If
41
+ // you’re using certificate-based authentication, you must also register the
42
+ // certificate for VoIP services. The voip push type is not available on
43
+ // watchOS. It is recommended on macOS, iOS, tvOS, and iPadOS.
33
44
PushTypeVOIP EPushType = "voip"
34
45
35
46
// PushTypeComplication is used for notifications that contain update
36
47
// information for a watchOS app’s complications. If you set this push type,
37
- // the apns- topic header field must use your app’s bundle ID with
38
- // .complication appended to the end. If you’re using certificate-based
39
- // authentication, you must also register the certificate for WatchKit
40
- // services. The complication push type is recommended for watchOS and iOS.
41
- // It is not available on macOS, tvOS, and iPadOS.
48
+ // the topic field must use your app’s bundle ID with .complication appended
49
+ // to the end. If you’re using certificate-based authentication, you must
50
+ // also register the certificate for WatchKit services. The complication
51
+ // push type is recommended for watchOS and iOS. It is not available on
52
+ // macOS, tvOS, and iPadOS.
42
53
PushTypeComplication EPushType = "complication"
43
54
44
55
// PushTypeFileProvider is used to signal changes to a File Provider
45
- // extension. If you set this push type, the apns- topic header field must
46
- // use your app’s bundle ID with .pushkit.fileprovider appended to the end.
47
- // The fileprovider push type is not available on watchOS. It is recommended
48
- // on macOS, iOS, tvOS, and iPadOS.
56
+ // extension. If you set this push type, the topic field must use your app’s
57
+ // bundle ID with .pushkit.fileprovider appended to the end. The
58
+ // fileprovider push type is not available on watchOS. It is recommended on
59
+ // macOS, iOS, tvOS, and iPadOS.
49
60
PushTypeFileProvider EPushType = "fileprovider"
50
61
51
62
// PushTypeMDM is used for notifications that tell managed devices to
0 commit comments