Contents

ReplicaAdvertisement

The component for delivering digital versions of print advertisements.

Declaration

object ReplicaAdvertisement

Properties

NameTypeDescription
role Requiredstring

Always replica_advertisement for this component.

URL Requireduri

The URL of the digital version of the print advertisement.

The URL can begin with http://, https://, or bundle://. If it begins with bundle://, the digital version of the print advertisement file must be in the same directory as the document.

Encode image filenames as URLs.

Digital version of the print advertisement filenames should be properly encoded as URLs.

See Preparing Image, Video, Audio, Music, and ARKit Assets.

accessibilityCaptionstring

A caption that describes the image. VoiceOver uses this text. For more information about VoiceOver, see the Vision page in Accessibility. If you don’t provide accessibilityCaption, VoiceOver uses the caption value.

additions[ComponentLink]

An array of ComponentLink objects you can use to create a ComponentLink, allowing a link to anywhere in News.

anchorAnchor

An object that defines vertical alignment with another component.

animation(ComponentAnimation | string("none"))

An object that defines an animation you apply to the component.

Use the none value for conditional design elements. Adding it here has no effect.

behavior(Behavior | string("none"))

An object that defines behavior for a component, like Parallax or Springy.

Use the none value for conditional design elements. Adding it here has no effect.

caption(CaptionDescriptor | string)

A caption that describes the digital version of the print advertisement. The article displays this text when the digital version of the print advertisement is full screen, and VoiceOver uses this text if you don’t provide accessibilityCaption text. For more information about VoiceOver, see the Vision page in Accessibility. The caption text doesn’t appear in the main article view. To display a caption in the main article view, use the Caption component.

conditional(ConditionalComponent | [ConditionalComponent])

An instance or array of component properties that you can apply conditionally, and the conditions that cause Apple News Format to apply them.

explicitContentboolean

A Boolean value that indicates the digital version of the print advertisement may contain explicit content.

hiddenboolean

A Boolean value that determines whether the component is hidden.

identifierstring

An optional unique identifier for this component. If you use identifier, it must be unique across the entire document. You need an identifier for your component if you want to anchor other components to it.

layout(ComponentLayout | string)

An inline ComponentLayout object that contains layout information, or a string reference to a ComponentLayout object that is defined at the top level of the document.

If you don’t define layout, size and position are based on various factors, such as the device type, the length of the content, and the role of this component.

style(ComponentStyle | string | string("none"))

An inline ComponentStyle object that defines the appearance of this component, or a string reference to a ComponentStyle object that you define at the top level of the document.

Use the none value for conditional design elements. Adding it here has no effect.

Discussion

Use the ReplicaAdvertisement component to provide the digital version of the print advertisement as PDF or in image formats like JPG, PNG, and GIF for an article.

Example

{
  "components": [
    {
      "role": "replica_advertisement",
      "URL": "bundle://advertisement.pdf"
    }
  ]
}

See Also

Images