---
title: "webPlugInMainResourceDidReceive(_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Instance Method
platforms: [macOS 10.6+]
path: "objectivec/nsobject-swift.class/webpluginmainresourcedidreceive(_:)-5b6f6"
---

# webPlugInMainResourceDidReceive(_:)

Invoked when the connection loads data incrementally.

## Declaration

```swift
func webPlugInMainResourceDidReceive(_ data: Data!)
```

## Parameters

- `data`: The newly available data.

## Discussion

Discussion This message is invoked when the WebPlugInShouldLoadMainResourceKey plug-in command-line argument is set to NO and the underlying NSURLConnection object for the main resource sends the connection:didReceiveData: message to its delegate.

## See Also

### Main resource messages

- [webPlugInMainResourceDidFailWithError(_:)](objectivec/nsobject-swift.class/webpluginmainresourcedidfailwitherror(_:).md)
- [webPlugInMainResourceDidFinishLoading()](objectivec/nsobject-swift.class/webpluginmainresourcedidfinishloading().md)
- [webPlugInMainResourceDidReceive(_:)](objectivec/nsobject-swift.class/webpluginmainresourcedidreceive(_:)-6x7b9.md)
