I'm trying to get an iOS Today widget working using React Native components by following the stuff happening on this issue.
I got it to work on the iOS simulator, but it doesn't work on an actual phone.
If anyone can look at this with me, it would be awesome. It is the minimal amount of stuff to getting a Today widget up and running showing a "Hello World" React component.
https://github.com/rclai/React-Native-Today-Widget
The memory limit for Today Widget on device is 16 MB. Great explanation is in this talk by Conrad Kramer: https://cocoaheads.tv/memory-use-in-extensions-by-conrad-kramer/
Verified experimentally using XCode debugger - while loading big image, Today Widget crashes as soon as it reaches 16 MB memory usage.
Memory usage of basic React native example with just one Text element is about 11 MB. Up to 13 MB during content rendering.
For running Today Widget on device you have to use Release build configuration. Development mode adds too much overhead. Only possibility to run the widget on device in development mode is using Instruments tool to temporarily disable the limit.
Check this library: https://github.com/matejkriz/react-native-today-widget#memory-limitation
It works on device, you just have to think about the memory limits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With