Post

Replies

Boosts

Views

Created

Crash on updateValue for Dictionary
At the moment, I have a dictionary written like this, where Model is a generic: private var cache = [String: Model]() Sometime when I call the following: cache.updateValue(model, forKey: uid) I get the following crash: Thread 14: "-[NSIndexPath count]: unrecognized selector sent to instance 0x8000000000000000" Some other info about the state of the cache when the crash occurs: The dictionary is storing 1205 key/value pairs The value being updated does not exist According to the summary on Apples documentation for updateValue: Updates the value stored in the dictionary for the given key, or adds a new key-value pair if the key does not exist. Can someone please explain what is happening and how to fix this issue?
3
1
914
Feb ’23
Crash on updateValue for Dictionary
At the moment, I have a dictionary written like this, where Model is a generic: private var cache = [String: Model]() Sometime when I call the following: cache.updateValue(model, forKey: uid) I get the following crash: Thread 14: "-[NSIndexPath count]: unrecognized selector sent to instance 0x8000000000000000" Some other info about the state of the cache when the crash occurs: The dictionary is storing 1205 key/value pairs The value being updated does not exist According to the summary on Apples documentation for updateValue: Updates the value stored in the dictionary for the given key, or adds a new key-value pair if the key does not exist. Can someone please explain what is happening and how to fix this issue?
Replies
3
Boosts
1
Views
914
Activity
Feb ’23
Deleting files with no target membership
I recently deleted a Target from a large Xcode project and would love to delete all files that no longer have any Target Memberships. How can I achieve that?
Replies
0
Boosts
0
Views
372
Activity
Nov ’22