I have an error I don't seem to be able to resolve. I don't get this while testing on my phones, but it happens after uploading the App for review. The phone used in the received crash report is (iPhone XR). The crash report points to:
UIImage.init+ 92364 (imageLiteralResourceName:) + 144
This happens during app startup, and the code that using the UIImage function when it crash is:
let image = UIImage(imageLiteralResourceName: getCurrrentDayNumber())
... where the getCurrentDayNumber is my function, it returns the day number 1-31 depending on the day of the month as a string ("1" .."31"). This function using the Date() function, so it could be that the Date() function does not give a valid date during startup, and hence the imageLiteralResourceName gets wrong, but I thought that was unlikely.
Again, I don't get this error in any of the devices I have tested, nor in the Test build loaded to TestFlight, only during app review by Apple.
For the resources to load, I have created 31 image resources in Asset.xcassets. Each assets has three images, 1x,2x,3x for all 31 days in a month, where the 1x is typical 300x180 px.
Anyone that can point me to where I might find the issue?
Selecting any option will automatically load the page