<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKAsset/init(importing:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "s:So7CKAssetC8CloudKitE9importingA2bCE15ExportedAssetIDV_tcfc"
  },
  "title" : "init(importing:)"
}
-->

# init(importing:)

Initialize a new [`CKAsset`](/documentation/CloudKit/CKAsset) that can be used to create a copy of an asset that already exists in iCloud,
potentially in a different container.

```
convenience init(importing exportedAssetID: CKAsset.ExportedAssetID)
```

## Parameters

`exportedAssetID`

Identifies the source asset that this [`CKAsset`](/documentation/CloudKit/CKAsset) will copy.
The `exportedAssetID` is only valid on the same device it was created,
and it expires after a few days.

## Discussion

When this asset is saved, a server-side copy of the referenced asset is created.

The new [`CKAsset`](/documentation/CloudKit/CKAsset) does not reference any data on the local device (its [`fileURL`](/documentation/CloudKit/CKAsset/fileURL) is `nil`).

When you assign this asset to a field in a [`CKRecord`](/documentation/CloudKit/CKRecord) and save the record,
the CloudKit server creates a new asset by copying the contents of the asset identified
by the `exportedAssetID`.

If the source asset no longer exists on the server, saving the record fails with [`CKError.Code.unknownItem`](/documentation/CloudKit/CKError/Code/unknownItem).

If the `exportedAssetID` is invalid or expired, saving the record fails with [`CKError.Code.assetNotAvailable`](/documentation/CloudKit/CKError/Code/assetNotAvailable).

Assets created this way are supported starting with iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, and visionOS 1.0.
Devices running older OS versions may fail to download the created asset.

---

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)