Closed simonayzman closed 2 years ago
@simonayzman I had the same issue. For whatever reason, I was able to finally get it running by profiling the widget in Xcode (Product > Profile).
Doesn't the profiler not listen to memory limits, so you can analyze beyond the limits?
Please check new note about memory limitation: https://github.com/matejkriz/react-native-today-widget#memory-limitation
You need to run the widget on device in Release mode and avoid memory-intensive operations.
I'm trying to investigate possibilities to optimize initial memory consumption, because it looks like the biggest obstacle for creating useful widgets.
@matejkriz @simonayzman , The new 1.0.0 version should fix it
@MaxToyberman So if you display a couple of <Image>
components with web images, it wouldn't crash? Or if you make some sort of API call?
@simonayzman yes, it should work now, I have tested it with some images and it works fine, but the memory limitation still exists, you still can't exceed 16 MB.
That was still the issue before for me. The last version worked for me up until 16 MB, too. For my use case, it just won’t work probably.
@simonayzman did you try the new version ? do you have index.widget.js ?
Don't quite have the bandwidth to test it now, but regardless, this doesn't solve the fundamental issue that there's a very low memory limit. That's an Apple thing, and likely, won't change. 🤷♂️
@simonayzman I agree that there is a memory limit and thats an Apple thing, but the new version has a major improvement, now the widget code and the App code are in different files, and thery are not bundled together. I think it worth a try. before this change I couldn't add images also. but now works perfectly for me.
I can't seem to run the today widget on a device. I've tried creating my own today widget as well, and it seems to crash with an 'Unable to load' screen. This is likely because of too much memory usage. Does anyone have any insight into this?