简体   繁体   中英

iOS 14 widget available memory

Searching on the internet I found that in the old version on widgets there was the following memory limit:

Respond appropriately to user interactions. Perform well (in particular, iOS widgets must use memory wisely or the system may terminate them).” The memory limit for the widget is 16 MB, so keep it simple and make sure to test out your widget for memory leaks

I would like to understand if with the new version for iOS 14 the memory possible to use is the same or has changed.

I don't find anything in the documentation.

I would like to write a widget in Swift ui , but first I would like to understand if there are any constraints.

Can anyone give me some clarification?

I would say that memory limit is 30MB . I was trying to use big image inside widget, generated by MKMapSnapshotter and it was crashing with EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0) when calling completion of func getTimeline(in:completion:) . once I downsized the image, it worked normally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM