<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSBatchDeleteResult/result",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSBatchDeleteResult(py)result"
  },
  "title" : "result"
}
-->

# result

The value the request returns after it executes.

```
var result: Any? { get }
```

## Discussion

Use [`resultType`](/documentation/CoreData/NSBatchDeleteResult/resultType) to determine the kind of value this property contains, and then cast to the appropriate type as the following example shows:

```swift
// resultType is .resultTypeCount.
guard let count = batchDeleteResult.result as? Int else { return }
            
// resultType is .resultTypeObjectIDs.
guard let objectIDs = batchDeleteResult.result as? [NSManagedObjectID] 
    else { return }
            
// resultType is .resultTypeStatusOnly.
guard let status = batchDeleteResult.result as? Bool else { return }
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)