Post

Replies

Boosts

Views

Activity

XCode Simulator Device Class Size Problem
I'm having trouble with XCode Simulator and device rotation using SwiftUI app. (Simulator Version 14.3.1 (994) SimulatorKit 629 CoreSimulator 885.2) The horizontalSizeClass/verticalSizeClass as reported by simulator does not match the sizes given in https://developer.apple.com/design/human-interface-guidelines/layout when rotating the device. It is correct on initial start, but on first device rotation (say e.g. portrait to landscape orientation) the values remain the same, despite monitoring with .onChange suggesting that they have changed! Then it appears to lag one device rotation behind the actual orientation for subsequent rotations. Such that on second device rotation (say landscape back to portrait) the values change to those associated with landscape instead of portrait - and so on for all subsequent rotations. It's a particular issue with "large" iPhones when simulator gives width = .compact and height = .regular in landscape orentation when it should be the other way round! Any insights from anyone as what is going on? Is it a bug or am I doing something wrong? Thanks
2
0
1.1k
Jul ’23
CoreData sqlite-wal file not emptying on checkpoint.
Hi, I have a CoreData based app using NSPersistenCloudKitContainer with SwiftUI. Works fine with small datasets. However there are images stored as BLOBs which increases the size significantly eventually. The problem is that force checkpointing fails to reliably empty the large -wal file, which can reach several hundred MB or GB+ before a checkpoint is done. No amont of pragma settings will override Coredata's apparent reluctance to checkpoint sooner! Then when it does checkpoint (reliably at app start), it fails to clear the -wal file anyway! Consequently, subsequent uses after a checkpoint are all needing force checkpointing again, uncessarily as the main sqlite file now has all the updated data. This will freeze the app for a considerable period (many seconds) and is an unacceptable user experience. Despite many suggestions from Dr. Google I have been unable to overcome CoreData's inability to empty the -wal file, (or to persuade it to checkpoint at smaller file sizes to avoid a freeze). The issue seems to only occur on real devices, whilst on the sim the -wal file is properly emptied by a checkpoint. Any ideas on how to make sure that the -wal file is emptied after a force checkpoint or any pointers as to why this is happening? Thanks
2
0
1.4k
Apr ’21
XCode Simulator Device Class Size Problem
I'm having trouble with XCode Simulator and device rotation using SwiftUI app. (Simulator Version 14.3.1 (994) SimulatorKit 629 CoreSimulator 885.2) The horizontalSizeClass/verticalSizeClass as reported by simulator does not match the sizes given in https://developer.apple.com/design/human-interface-guidelines/layout when rotating the device. It is correct on initial start, but on first device rotation (say e.g. portrait to landscape orientation) the values remain the same, despite monitoring with .onChange suggesting that they have changed! Then it appears to lag one device rotation behind the actual orientation for subsequent rotations. Such that on second device rotation (say landscape back to portrait) the values change to those associated with landscape instead of portrait - and so on for all subsequent rotations. It's a particular issue with "large" iPhones when simulator gives width = .compact and height = .regular in landscape orentation when it should be the other way round! Any insights from anyone as what is going on? Is it a bug or am I doing something wrong? Thanks
Replies
2
Boosts
0
Views
1.1k
Activity
Jul ’23
CoreData sqlite-wal file not emptying on checkpoint.
Hi, I have a CoreData based app using NSPersistenCloudKitContainer with SwiftUI. Works fine with small datasets. However there are images stored as BLOBs which increases the size significantly eventually. The problem is that force checkpointing fails to reliably empty the large -wal file, which can reach several hundred MB or GB+ before a checkpoint is done. No amont of pragma settings will override Coredata's apparent reluctance to checkpoint sooner! Then when it does checkpoint (reliably at app start), it fails to clear the -wal file anyway! Consequently, subsequent uses after a checkpoint are all needing force checkpointing again, uncessarily as the main sqlite file now has all the updated data. This will freeze the app for a considerable period (many seconds) and is an unacceptable user experience. Despite many suggestions from Dr. Google I have been unable to overcome CoreData's inability to empty the -wal file, (or to persuade it to checkpoint at smaller file sizes to avoid a freeze). The issue seems to only occur on real devices, whilst on the sim the -wal file is properly emptied by a checkpoint. Any ideas on how to make sure that the -wal file is emptied after a force checkpoint or any pointers as to why this is happening? Thanks
Replies
2
Boosts
0
Views
1.4k
Activity
Apr ’21