GREYManagedObjectContextIdlingResource
@interface GREYManagedObjectContextIdlingResource
: NSObject <GREYIdlingResource>
Idling resource that tracks core data managed object context operations.
Tracks the managed object context’s internal operation queue and optionally any pending changes yet to be committed.
-
Creates an idling resource tracking @c managedObjectContext.
A weak reference is held to @c managedObjectContext. If @c managedObjectContext is deallocated, then the idling resource will deregister itself from the thread executor.
Declaration
Objective-C
+ (instancetype)resourceWithManagedObjectContext: (NSManagedObjectContext *)managedObjectContext trackPendingChanges:(BOOL)trackPendingChanges name:(NSString *)name;
Swift
convenience init!(managedObjectContext: NSManagedObjectContext!, trackPendingChanges: Any!, name: Any!)
Parameters
managedObjectContext
The managed object context to be tracked by the resource.
trackPendingChanges
If @c YES, then the idling resource will report that it is busy when the managed object context has pending changes.
name
A descriptive name for the idling resource.
Return Value
An idling resource tracking @c managedObjectContext.
-
@remark init is not an available initializer. Use the other initializers.
Declaration
Objective-C
- (instancetype)init;
Swift
init!()