<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Contacts",
  "identifier" : "/documentation/Contacts/CNSocialProfile/init(urlString:username:userIdentifier:service:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Contacts"
    ],
    "preciseIdentifier" : "c:objc(cs)CNSocialProfile(im)initWithUrlString:username:userIdentifier:service:"
  },
  "title" : "init(urlString:username:userIdentifier:service:)"
}
-->

# init(urlString:username:userIdentifier:service:)

Initializes a new social profile object with the specified URL.

```
init(urlString: String?, username: String?, userIdentifier: String?, service: String?)
```

## Parameters

`urlString`

The URL for the social profile.

`username`

The user name for the social profile.

`userIdentifier`

The service’s user identifier for the social profile.

`service`

The service name of the social profile.

## Return Value

An initialized social profile.

---

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)