<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Messages",
  "identifier" : "/documentation/Messages/MSSticker/init(contentsOfFileURL:localizedDescription:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Messages"
    ],
    "preciseIdentifier" : "c:objc(cs)MSSticker(im)initWithContentsOfFileURL:localizedDescription:error:"
  },
  "title" : "init(contentsOfFileURL:localizedDescription:)"
}
-->

# init(contentsOfFileURL:localizedDescription:)

Initializes a sticker with the contents of the URL and the localized description.

```
init(contentsOfFileURL fileURL: URL, localizedDescription: String) throws
```

## Parameters

`fileURL`

A URL for the image displayed by this sticker. This URL must refer to a file saved on the device. The file must be a PNG, APNG, GIF, or JPEG, and must be less than 500 KB. For the best results, the image should not be smaller than 100 x 100 points or larger than 206 x 206 points. Always provide @3x images (300 x 300 pixels to 618 x 618 pixels). The system generates the @2x and @1x versions by downscaling the @3x images at runtime.

`localizedDescription`

A succinct, localized description of the sticker. The description is limited to 150 Unicode characters. The system uses this string as an accessibility description of the sticker.

## Return Value

A newly initialized sticker object, or `nil` if an error occurs.

## Discussion

---

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)