pub enum PushType {
Alert,
Background,
Location,
Voip,
Complication,
Fileprovider,
Mdm,
}Expand description
The apns-push-type header field has the following valid values. The
descriptions below describe when and how to use these values.
Variants§
Alert
Use the alert push type for notifications that trigger a user
interaction—for example, an alert, badge, or sound. If you set this push
type, the apns-topic header field must use your app’s bundle ID as the
topic. For more information, see Generating a remote
notification.
If the notification requires immediate action from the user, set notification priority to 10; otherwise use 5.
The alert push type is required on watchOS 6 and later. It is
recommended on macOS, iOS, tvOS, and iPadOS.
Background
Use the background push type for notifications that deliver content in
the background, and don’t trigger any user interactions. If you set this
push type, the apns-topic header field must use your app’s bundle ID
as the topic. Always use priority 5. Using priority 10 is an error. For
more information, see Pushing Background Updates to Your
App.
The background push type is required on watchOS 6 and later. It is
recommended on macOS, iOS, tvOS, and iPadOS.
Location
Use the location push type for notifications that request a user’s
location. If you set this push type, the apns-topic header field must
use your app’s bundle ID with .location-query appended to the end. For
more information, see Creating a location push service extension.
The location push type is recommended for iOS and iPadOS. It isn’t
available on macOS, tvOS, and watchOS.
If the location query requires an immediate response from the Location
Push Service Extension, set notification apns-priority to 10;
otherwise, use 5.
The location push type supports only token-based authentication.
Voip
Use the voip push type for notifications that provide information
about an incoming Voice-over-IP (VoIP) call. For more information, see
Responding to VoIP Notifications from
PushKit.
If you set this push type, the apns-topic header field must use your
app’s bundle ID with .voip appended to the end. If you’re using
certificate-based authentication, you must also register the certificate
for VoIP services. The topic is then part of the
1.2.840.113635.100.6.3.4 or 1.2.840.113635.100.6.3.6 extension.
The voip push type is not available on watchOS. It is recommended on macOS, iOS, tvOS, and iPadOS.
Complication
Use the complication push type for notifications that contain update
information for a watchOS app’s complications. For more information, see
Keeping Your Complications Up to Date.
If you set this push type, the apns-topic header field must use your
app’s bundle ID with .complication appended to the end. If you’re
using certificate-based authentication, you must also register the
certificate for WatchKit services. The topic is then part of the
1.2.840.113635.100.6.3.6 extension.
The complication push type is recommended for watchOS and iOS. It is
not available on macOS, tvOS, and iPadOS.
Fileprovider
Use the fileprovider push type to signal changes to a File Provider
extension. If you set this push type, the apns-topic header field must
use your app’s bundle ID with .pushkit.fileprovider appended to the
end. For more information, see Using push notifications to signal
changes.
The fileprovider push type is not available on watchOS. It is
recommended on macOS, iOS, tvOS, and iPadOS.
Mdm
Use the mdm push type for notifications that tell managed devices to
contact the MDM server. If you set this push type, you must use the
topic from the UID attribute in the subject of your MDM push
certificate. For more information, see Device
Management.
The mdm push type is not available on watchOS. It is recommended on macOS, iOS, tvOS, and iPadOS.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PushType
impl<'de> Deserialize<'de> for PushType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<PushType> for HeaderValue
impl From<PushType> for HeaderValue
impl Copy for PushType
impl Eq for PushType
impl StructuralPartialEq for PushType
Auto Trait Implementations§
impl Freeze for PushType
impl RefUnwindSafe for PushType
impl Send for PushType
impl Sync for PushType
impl Unpin for PushType
impl UnwindSafe for PushType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.