Clarity on Sticker File Size Limitation

https://developer.apple.com/reference/messages


The documentation states:

The file must be less than 500KB.


  • Is this limit enforced by Xcode, App Store Submission, or runtime for the Messages framework?
  • Is the limit for the _entire file_, or each frame of an animated png sequence?
  • Is this only limited to sticker pack apps that ship with no native code? Can apps dynamically create stickers that exceed this limit?


Thanks!

Accepted Reply

The limit is enforced by the asset compiler at build time. It is also enforced at runtime by MSConversation’s insert(_:completionHandler:), so it applies to stickers created at runtime as well. The limit is for the entire file, not an individual frame.

Replies

The limit is enforced by the asset compiler at build time. It is also enforced at runtime by MSConversation’s insert(_:completionHandler:), so it applies to stickers created at runtime as well. The limit is for the entire file, not an individual frame.

Thanks mitz for the clarity!


Is the expected behavior that the sticker will fail to send, or will the system attempt to make it smaller?


If it fails, do you know what error we should receive?

insert(_:completionHandler:) will invoke the completion handler with MSMessageErrorCodeStickerFileImproperFileSize.

Strangely, it will still compile (because Xcode only shows you a warning about the size limitation) and while it will show the animation on the stickers list, when you tried to drag it, it won't detach. Sending it, will result on a blank image attached to the message. After that, the whole iMessages app stops working and you won't be able to drag stickers anymore (no matter which one). I tested this on both an actual device and the sim, and the behaviour is just the same.