---
title: "initWithInvocation:"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsinvocationoperation/initwithinvocation:"
---

# initWithInvocation:

Returns an NSInvocationOperation object initialized with the specified invocation object.

## Declaration

```occ
- (instancetype) initWithInvocation:(NSInvocation *) inv;
```

## Parameters

- `inv`: The invocation object identifying the target object, selector, and parameter objects.

## Return Value

Return Value An initialized NSInvocationOperation object or nil if the object could not be initialized.

## Discussion

Discussion This method is the designated initializer. The receiver tells the invocation object to retain its arguments.

## See Also

### Initialization

- [initWithTarget:selector:object:](foundation/nsinvocationoperation/initwithtarget:selector:object:.md)
