Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We found a crash condition on iOS14 when compiled with Xcode 12.1's toolchain (as of November 17, 2020). Trigger conditions are reproducible with this sequence of events:
Starting in iOS14, Core Data will fire a fault request upon accessing one of these results. This request contains a predicate with unsubstituted variables. While the request object contains the variables needed to perform the substitution, I haven't yet found a clean way to access them.
In the course of fixing this bug, I encountered an additional issue that occurs when a predicate includes a collection of unpersisted objects. These objects do not have permanent IDs yet, but EncryptedCoreData code attempts to bind them to the SQL statement, resulting in an error. Existing code handled cases where a predicate includes a single instance of an unpresisted object, but did not handle collections of them. To fix this, I moved the code that successfully handles single objects in parsing expression into the binding method instead.