One Logo Pool Ball
CoreData · IOS API REFERENCE

NSManagedObject

class · iOS 3.0+ · SDK 27.1

nonisolated class NSManagedObject

Members (44)

static · iOS 10.0+

fetchRequest

TypeScript
static fetchRequest(): NSFetchRequest<SDKHandle>
Swift declaration
@objc dynamic class func fetchRequest() -> NSFetchRequest<any NSFetchRequestResult>
static · iOS 10.0+

entity

TypeScript
static entity(): NSEntityDescription
Swift declaration
class func entity() -> NSEntityDescription
get · iOS 3.0+

contextShouldIgnoreUnmodeledPropertyChanges

TypeScript
static get contextShouldIgnoreUnmodeledPropertyChanges(): boolean
Swift declaration
class var contextShouldIgnoreUnmodeledPropertyChanges: Bool { get }
method · iOS 3.0+

awakeFromFetch

TypeScript
awakeFromFetch(): void
Swift declaration
func awakeFromFetch()
method · iOS 3.0+

awakeFromInsert

TypeScript
awakeFromInsert(): void
Swift declaration
func awakeFromInsert()
method · iOS 3.0+

awake

TypeScript
awake(flags: NSSnapshotEventType): void
Swift declaration
func awake(fromSnapshotEvents flags: NSSnapshotEventType)
method · iOS 3.0+

changedValues

TypeScript
changedValues(): Record<string, unknown>
Swift declaration
func changedValues() -> [String : Any]
method · iOS 5.0+

changedValuesForCurrentEvent

TypeScript
changedValuesForCurrentEvent(): Record<string, unknown>
Swift declaration
func changedValuesForCurrentEvent() -> [String : Any]
method · iOS 3.0+

committedValues

TypeScript
committedValues(keys?: (Array<string>) | null): Record<string, unknown>
Swift declaration
func committedValues(forKeys keys: [String]?) -> [String : Any]
method · iOS 3.0+

didAccessValue

TypeScript
didAccessValue(key?: (string) | null): void
Swift declaration
func didAccessValue(forKey key: String?)
method · iOS 3.0+

didChangeValue

TypeScript
didChangeValueForKey(key: string): void
Swift declaration
func didChangeValue(forKey key: String)
method · iOS 3.0+

didChangeValue

TypeScript
didChangeValueForKeyWithSetMutationUsing(inKey: string, inMutationKind: _Foundation_NSKeyValueSetMutationKind, inObjects: Array<unknown>): void
Swift declaration
func didChangeValue(forKey inKey: String, withSetMutation inMutationKind: NSKeyValueSetMutationKind, using inObjects: Set<AnyHashable>)
method · iOS 3.0+

didSave

TypeScript
didSave(): void
Swift declaration
func didSave()
method · iOS 3.0+

didTurnIntoFault

TypeScript
didTurnIntoFault(): void
Swift declaration
func didTurnIntoFault()
method · iOS 3.0+

hasFault

TypeScript
hasFault(key: string): boolean
Swift declaration
func hasFault(forRelationshipNamed key: String) -> Bool
init · iOS 10.0+

init

TypeScript
static initContext(moc: NSManagedObjectContext): NSManagedObject
Swift declaration
convenience init(context moc: NSManagedObjectContext)
init · iOS 3.0+

init

TypeScript
static initEntityInsertInto(entity: NSEntityDescription, context?: (NSManagedObjectContext) | null): NSManagedObject
Swift declaration
init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?)
method · iOS 8.3+

objectIDs

TypeScript
objectIDs(key: string): Array<NSManagedObjectID>
Swift declaration
func objectIDs(forRelationshipNamed key: String) -> [NSManagedObjectID]
method · iOS 3.0+

prepareForDeletion

TypeScript
prepareForDeletion(): void
Swift declaration
func prepareForDeletion()
method · iOS 3.0+

primitiveValue

TypeScript
primitiveValue(key: string): (unknown) | null
Swift declaration
func primitiveValue(forKey key: String) -> Any?
method · iOS 3.0+

setPrimitiveValue

TypeScript
setPrimitiveValue(value: (unknown) | null, key: string): void
Swift declaration
func setPrimitiveValue(_ value: Any?, forKey key: String)
method · iOS 3.0+

setValue

TypeScript
setValue(value: (unknown) | null, key: string): void
Swift declaration
func setValue(_ value: Any?, forKey key: String)
method · iOS 3.0+

validateForDelete

TypeScript
validateForDelete(): void
Swift declaration
func validateForDelete() throws
method · iOS 3.0+

validateForInsert

TypeScript
validateForInsert(): void
Swift declaration
func validateForInsert() throws
method · iOS 3.0+

validateForUpdate

TypeScript
validateForUpdate(): void
Swift declaration
func validateForUpdate() throws
method · iOS 3.0+

validateValue

TypeScript
validateValue(key: string): { $ret: null; $out: { "value": (unknown) | null } }
Swift declaration
func validateValue(_ value: AutoreleasingUnsafeMutablePointer<AnyObject?>, forKey key: String) throws

Omit the output parameters from the call. The result contains $ret and $out, with value inside $out.

method · iOS 3.0+

value

TypeScript
value(key: string): (unknown) | null
Swift declaration
func value(forKey key: String) -> Any?
method · iOS 3.0+

willAccessValue

TypeScript
willAccessValue(key?: (string) | null): void
Swift declaration
func willAccessValue(forKey key: String?)
method · iOS 3.0+

willChangeValue

TypeScript
willChangeValueForKey(key: string): void
Swift declaration
func willChangeValue(forKey key: String)
method · iOS 3.0+

willChangeValue

TypeScript
willChangeValueForKeyWithSetMutationUsing(inKey: string, inMutationKind: _Foundation_NSKeyValueSetMutationKind, inObjects: Array<unknown>): void
Swift declaration
func willChangeValue(forKey inKey: String, withSetMutation inMutationKind: NSKeyValueSetMutationKind, using inObjects: Set<AnyHashable>)
method · iOS 3.0+

willSave

TypeScript
willSave(): void
Swift declaration
func willSave()
method · iOS 3.0+

willTurnIntoFault

TypeScript
willTurnIntoFault(): void
Swift declaration
func willTurnIntoFault()
get · iOS 3.0+

isDeleted

TypeScript
get isDeleted(): boolean
Swift declaration
var isDeleted: Bool { get }
get · iOS 3.0+

entity

TypeScript
get entity2423(): NSEntityDescription
Swift declaration
var entity: NSEntityDescription { get }
get · iOS 3.0+

isFault

TypeScript
get isFault(): boolean
Swift declaration
var isFault: Bool { get }
get · iOS 3.0+

faultingState

TypeScript
get faultingState(): number
Swift declaration
var faultingState: Int { get }
get · iOS 5.0+

hasChanges

TypeScript
get hasChanges(): boolean
Swift declaration
var hasChanges: Bool { get }
get · iOS 7.0+

hasPersistentChangedValues

TypeScript
get hasPersistentChangedValues(): boolean
Swift declaration
var hasPersistentChangedValues: Bool { get }
get · iOS 3.0+

isInserted

TypeScript
get isInserted(): boolean
Swift declaration
var isInserted: Bool { get }
get · iOS 3.0+

managedObjectContext

TypeScript
get managedObjectContext(): (NSManagedObjectContext) | null
Swift declaration
unowned(unsafe) var managedObjectContext: NSManagedObjectContext? { get }
get · iOS 3.0+

objectID

TypeScript
get objectID(): NSManagedObjectID
Swift declaration
var objectID: NSManagedObjectID { get }
get · iOS 3.0+

isUpdated

TypeScript
get isUpdated(): boolean
Swift declaration
var isUpdated: Bool { get }
get · iOS 13.0+

objectWillChange

TypeScript
get objectWillChange(): _Combine_ObservableObjectPublisher
Swift declaration
nonisolated var objectWillChange: ObservableObjectPublisher { get }

A publisher that emits before the object has changed.

subscript · iOS 18.0+

subscript

TypeScript
subscript(key: string): (unknown) | null
Swift declaration
nonisolated subscript(key: String) -> Any? { get set }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

NSManagedObject.init()

inherited init: cannot prove legal (class declares 3 custom initializers)

All CoreData types →