DBSHARINGLinkMetadata

@interface DBSHARINGLinkMetadata : NSObject <DBSerializable, NSCopying>

The LinkMetadata struct.

Metadata for a shared link. This can be either a PathLinkMetadata or CollectionLinkMetadata.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

  • url

    URL of the shared link.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull url;

    Swift

    var url: String { get }
  • Who can access the link.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBSHARINGVisibility *_Nonnull visibility;

    Swift

    var visibility: DBSHARINGVisibility { get }
  • Expiration time, if set. By default the link won’t expire.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSDate *expires;

    Swift

    var expires: Date? { get }
  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUrl:(nonnull NSString *)url
                             visibility:(nonnull DBSHARINGVisibility *)visibility
                                expires:(nullable NSDate *)expires;

    Swift

    init(url: String, visibility: DBSHARINGVisibility, expires: Date?)

    Parameters

    url

    URL of the shared link.

    visibility

    Who can access the link.

    expires

    Expiration time, if set. By default the link won’t expire.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUrl:(nonnull NSString *)url
                             visibility:(nonnull DBSHARINGVisibility *)visibility;

    Swift

    init(url: String, visibility: DBSHARINGVisibility)

    Parameters

    url

    URL of the shared link.

    visibility

    Who can access the link.

    Return Value

    An initialized instance.