Documentation Archive Developer
Search

NewsstandKit Changes for Swift

NewsstandKit

Declaration
From
class NKAssetDownload : NSObject {
    weak var issue: NKIssue! { get }
    var identifier: String! { get }
    var userInfo: [NSObject : AnyObject]!
    @NSCopying var URLRequest: NSURLRequest! { get }
    func downloadWithDelegate(_ delegate: NSURLConnectionDownloadDelegate!) -> NSURLConnection!
}
To
class NKAssetDownload : NSObject {
    weak var issue: NKIssue? { get }
    var identifier: String { get }
    var userInfo: [NSObject : AnyObject]?
    @NSCopying var URLRequest: NSURLRequest { get }
    func downloadWithDelegate(_ delegate: NSURLConnectionDownloadDelegate) -> NSURLConnection
}

Declaration
From
func downloadWithDelegate(_ delegate: NSURLConnectionDownloadDelegate!) -> NSURLConnection!
To
func downloadWithDelegate(_ delegate: NSURLConnectionDownloadDelegate) -> NSURLConnection

Declaration
From
var identifier: String! { get }
To
var identifier: String { get }

Declaration
From
weak var issue: NKIssue! { get }
To
weak var issue: NKIssue? { get }

Declaration
From
@NSCopying var URLRequest: NSURLRequest! { get }
To
@NSCopying var URLRequest: NSURLRequest { get }

Declaration
From
var userInfo: [NSObject : AnyObject]!
To
var userInfo: [NSObject : AnyObject]?

Modified NKIssue
Declaration
From
class NKIssue : NSObject {
    var downloadingAssets: [AnyObject]! { get }
    @NSCopying var contentURL: NSURL! { get }
    var status: NKIssueContentStatus { get }
    var name: String! { get }
    @NSCopying var date: NSDate! { get }
    func addAssetWithRequest(_ request: NSURLRequest!) -> NKAssetDownload!
}
To
class NKIssue : NSObject {
    var downloadingAssets: [NKAssetDownload] { get }
    @NSCopying var contentURL: NSURL { get }
    var status: NKIssueContentStatus { get }
    var name: String { get }
    @NSCopying var date: NSDate { get }
    func addAssetWithRequest(_ request: NSURLRequest) -> NKAssetDownload
}

Declaration
From
func addAssetWithRequest(_ request: NSURLRequest!) -> NKAssetDownload!
To
func addAssetWithRequest(_ request: NSURLRequest) -> NKAssetDownload

Declaration
From
@NSCopying var contentURL: NSURL! { get }
To
@NSCopying var contentURL: NSURL { get }

Modified NKIssue.date
Declaration
From
@NSCopying var date: NSDate! { get }
To
@NSCopying var date: NSDate { get }

Declaration
From
var downloadingAssets: [AnyObject]! { get }
To
var downloadingAssets: [NKAssetDownload] { get }

Modified NKIssue.name
Declaration
From
var name: String! { get }
To
var name: String { get }

Raw Value Type
From--
ToInt

Modified NKLibrary
Declaration
From
class NKLibrary : NSObject {
    var issues: [AnyObject]! { get }
    var downloadingAssets: [AnyObject]! { get }
    var currentlyReadingIssue: NKIssue!
    class func sharedLibrary() -> NKLibrary!
    func issueWithName(_ name: String!) -> NKIssue!
    func addIssueWithName(_ name: String!, date date: NSDate!) -> NKIssue!
    func removeIssue(_ issue: NKIssue!)
}
To
class NKLibrary : NSObject {
    var issues: [NKIssue] { get }
    var downloadingAssets: [NKAssetDownload] { get }
    var currentlyReadingIssue: NKIssue?
    class func sharedLibrary() -> NKLibrary?
    func issueWithName(_ name: String) -> NKIssue?
    func addIssueWithName(_ name: String, date date: NSDate) -> NKIssue
    func removeIssue(_ issue: NKIssue)
}

Declaration
From
func addIssueWithName(_ name: String!, date date: NSDate!) -> NKIssue!
To
func addIssueWithName(_ name: String, date date: NSDate) -> NKIssue

Declaration
From
var currentlyReadingIssue: NKIssue!
To
var currentlyReadingIssue: NKIssue?

Declaration
From
var downloadingAssets: [AnyObject]! { get }
To
var downloadingAssets: [NKAssetDownload] { get }

Declaration
From
var issues: [AnyObject]! { get }
To
var issues: [NKIssue] { get }

Declaration
From
func issueWithName(_ name: String!) -> NKIssue!
To
func issueWithName(_ name: String) -> NKIssue?

Declaration
From
func removeIssue(_ issue: NKIssue!)
To
func removeIssue(_ issue: NKIssue)

Declaration
From
class func sharedLibrary() -> NKLibrary!
To
class func sharedLibrary() -> NKLibrary?

Declaration
From
weak var newsstandAssetDownload: NKAssetDownload! { get }
To
weak var newsstandAssetDownload: NKAssetDownload? { get }