App crashes when transitioning from Background to Foreground

Hi there, my App crashes when transitioning from Background to Foreground (not immediately, but after being on background for a long period - over 1 hour).

Logs show some Jetsam event and I believe there is some memory issues.

This is what I have allocated for Memory.

#if TARGET_OS_MACCATALYST

    _urlCache = [[NSURLCache alloc] initWithMemoryCapacity:1024*1024*1024

                                              diskCapacity:1024*1024*1024

                                              directoryURL:[NSURL URLWithString:kImageDirectory]];

#else

    _urlCache = [[NSURLCache alloc] **initWithMemoryCapacity:1024*1024*1024

                                             
diskCapacity:1024*1024*1024**

                                                  diskPath:kImageDirectory];

#endif


So, to be clear, you’ve told NSURLCache that it’s OK to use 1 GiB of memory for its cache? That seems… optimistic.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I started with 24MB and the app was crashing eventually. I don't believe this is the issue to be honest.

I have apple support and Google Maps API looking into the crash logs but so far, nothing.

App crashes when transitioning from Background to Foreground
 
 
Q