iOS 中的本地通知自定义图像图标的大小是多少

What is the size of Local notification custom image icon in iOS

通常 App icon,显示为 Push Notification 图像图标(左侧)。但是如果我想在我的 Push Notification 中添加自定义图像,是否有任何固定尺寸的图像我必须遵循? 感谢您的光临。

如果你查看苹果文档:https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW15

通知负载中没有允许使用自定义图像的内容。我认为你不能那样做。

它与您通常为您的应用提供的启动图像大小相同。

  • 3.5": 640*960
  • 4": 640*1136

等..

以下是 Apple 提供的一些描述:

The string is a filename of an image file in the app bundle. This image is a launching image specified for a given notification; when the user taps the action button (for example, “View”) or moves the action slider, the image is used in place of the default launching image. If the value of this property is nil (the default), the system either uses the previous snapshot, uses the image identified by the UILaunchImageFile key in the app’s Info.plist file, or falls back to Default.png.

https://developer.apple.com/library/ios/documentation/iPhone/Reference/UILocalNotification_Class/index.html#//apple_ref/occ/instp/UILocalNotification/alertLaunchImage