<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/webPlugInMainResourceDidReceive(_:)-6x7b9",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)webPlugInMainResourceDidReceiveResponse:"
  },
  "title" : "webPlugInMainResourceDidReceive(_:)"
}
-->

# webPlugInMainResourceDidReceive(_:)

Invoked when the connection receives sufficient data to construct the URL response for its request.

```
func webPlugInMainResourceDidReceive(_ response: URLResponse!)
```

## Parameters

`response`

The URL response for the connection’s request.

## Discussion

This message is invoked when the `WebPlugInShouldLoadMainResourceKey` plug-in command-line argument is set to [`NO`](/documentation/ObjectiveC/NO) and the underlying `NSURLConnection` object for the main resource sends the connection:didReceiveResponse: message to its delegate.

---

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)