iOS Developer Library

Developer

NewsstandKit Framework Reference NKIssue Class Reference

Options
Deployment Target:

On This Page
Language:

NKIssue

An instance of the NKIssue class represents an issue of a newsstand content application.

An NKIssue object must have a name and a date. When you create the object using the addIssueWithName:date: method of the NKLibrary class, you must supply these two values. In addition, an NKIssue object can be associated with one or more assets that are downloading. These assets are represented by NKAssetDownload objects, which you create and associate with the issue by calling the addAssetWithRequest: method. If there are downloading assets, the NKIssue object has a status of NKIssueContentStatusDownloading.

As assets are being downloaded for an issue, you should put the processed (for example, unarchived or assembled) issue assets in the sandbox file-system location identified by contentURL. After all downloads of assets for an issue have completed, NKIssue posts the NKIssueDownloadCompletedNotification notification which objects in an application can observe.

  • The location in the application sandbox where issue content should be stored. (read-only)

    Declaration

    Swift

    @NSCopying var contentURL: NSURL { get }

    Objective-C

    @property(readonly, copy) NSURL *contentURL

    Discussion

    The application, after processing downloaded assets, should write the issue content to the filesystem location identified by this property.

    Availability

    Available in iOS 5.0 and later.

  • The status of the newsstand issue. (read-only)

    Declaration

    Swift

    var status: NKIssueContentStatus { get }

    Objective-C

    @property(readonly) NKIssueContentStatus status

    Discussion

    An issue’s status is either available, downloading, or none. Each of these reflect whether assets are downloading for the issue and if there is issue content at contentURL. See the description of the NKIssueContentStatus type for more information.

    Availability

    Available in iOS 5.0 and later.

    See Also

    date
    name

  • date date Property

    The date of the newsstand issue. (read-only)

    Declaration

    Swift

    @NSCopying var date: NSDate { get }

    Objective-C

    @property(readonly, copy) NSDate *date

    Discussion

    This date is provided when the NKIssue instance is created through the addIssueWithName:date: method of NKLibrary.

    Availability

    Available in iOS 5.0 and later.

    See Also

    status
    name

  • name name Property

    The name of the newsstand issue. (read-only)

    Declaration

    Swift

    var name: String { get }

    Objective-C

    @property(readonly, copy) NSString *name

    Discussion

    This name is provided when the NKIssue instance is created through the addIssueWithName:date: method of NKLibrary. The name must be unique across all issues in the library.

    Availability

    Available in iOS 5.0 and later.

    See Also

    status
    date

  • The status of the newsstand issue.

    Declaration

    Swift

    enum NKIssueContentStatus : Int { case None case Downloading case Available }

    Objective-C

    typedef enum { NKIssueContentStatusNone, NKIssueContentStatusDownloading, NKIssueContentStatusAvailable, } NKIssueContentStatus;

    Constants

    • none

      NKIssueContentStatusNone

      Assets are not downloading for the issue and there is no content at contentURL.

      Available in iOS 5.0 and later.

    • downloading

      NKIssueContentStatusDownloading

      The issue has assets that are currently downloading.

      Available in iOS 5.0 and later.

    • available

      NKIssueContentStatusAvailable

      Downloading of assets is not taking place and there is issue content at contentURL.

      Available in iOS 5.0 and later.

    Import Statement

    Objective-C

    @import NewsstandKit;

    Swift

    import NewsstandKit

    Availability

    Available in iOS 5.0 and later.