DBSHARINGLinkMetadata

Objective-C

@interface DBSHARINGLinkMetadata : NSObject <DBSerializable, NSCopying>

Swift

class 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.

Instance fields

  • url

    URL of the shared link.

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var expires: Date? { get }

Constructors

  • 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.