Post

Replies

Boosts

Views

Activity

Core Data crashes while attempting to read external data
I have an iOS app that stores images in Core Data using External Storage. From time to time I get crash reports with the following error (in this particular instance it's running on a M1 Mac via Catalyst): Unable to open file with path /Users/user/Library/Group Containers/group.myapp/.myapp_SUPPORT/_EXTERNAL_DATA/61681DBF-B1A4-4325-9104-E21A1218F046 (92) The relevant stack trace bit looks like this: 0 CoreFoundation +0xfc408 __exceptionPreprocess 1 libobjc.A.dylib +0x1aea4 objc_exception_throw 2 CoreData +0x12cda0 +[_PFRoutines readExternalReferenceDataFromFile:] 3 CoreData +0xe9db8 -[_PFExternalReferenceData _attemptToMapData:] 4 CoreData +0xd7894 -[_PFExternalReferenceData _retrieveExternalData] 5 Foundation +0x46f2f8 specialized static Data._unconditionallyBridgeFromObjectiveC(_:) 6 MyApp +0x15eb80 Image.thumbnailImage.getter (Image.swift:25:22) All I'm doing in Image.swift:25:22 is declaring a variable with the contents of the image: let data = self.thumbnail // 'thumbnail' is my Binary Data attribute I've tried to reproduce this crash on my machine by intentionally deleting, corrupting and changing permissions on external storage files but that doesn't work. Does anyone have the slightest idea of what's going on, or how to prevent or fix this?
1
1
931
Jan ’23
UISplitViewController push UIViewController to supplementary column
I'm trying to implement a three-column style in my Universal app. I want my columns as follows: The primary/master column shows a list of folders The supplementary column shows files in the selected folder The secondary/detail column shows the content of the selected file. I've wired everything up with segues in Storyboards: Master view controller rows to supplementary view controller. Supplementary view controller rows to detail view controller. This all works fine on iPhone. On the iPad however, I can't seem to be able to update the Supplementary column when selecting a row in the Master column. It just replaces the content in the Master column (with "show" adaptive segue) or in the Detail column (with "show detail" adaptive segue). What am I doing wrong?
1
0
1.4k
Sep ’20