Documentation Archive Developer
Search

iAd Changes for Swift

iAd

Raw Value Type
From--
ToInt

Modified ADBannerView
Declaration
From
class ADBannerView : UIView {
    init!(adType type: ADAdType)
    var adType: ADAdType { get }
    weak var delegate: ADBannerViewDelegate!
    var bannerLoaded: Bool { get }
    var bannerViewActionInProgress: Bool { get }
    func cancelBannerViewAction()
    var advertisingSection: String!
}
extension ADBannerView {
    var requiredContentSizeIdentifiers: Set<NSObject>!
    var currentContentSizeIdentifier: String!
    class func sizeFromBannerContentSizeIdentifier(_ contentSizeIdentifier: String!) -> CGSize
}
To
class ADBannerView : UIView {
    init!(adType type: ADAdType)
    var adType: ADAdType { get }
    weak var delegate: ADBannerViewDelegate?
    var bannerLoaded: Bool { get }
    var bannerViewActionInProgress: Bool { get }
    func cancelBannerViewAction()
    var advertisingSection: String!
}
extension ADBannerView {
    var requiredContentSizeIdentifiers: Set<NSObject>!
    var currentContentSizeIdentifier: String!
    class func sizeFromBannerContentSizeIdentifier(_ contentSizeIdentifier: String!) -> CGSize
}

Declaration
From
weak var delegate: ADBannerViewDelegate!
To
weak var delegate: ADBannerViewDelegate?

Introduction
FromiOS 8.0
ToiOS 4.0

Introduction
FromiOS 8.0
ToiOS 4.0

Introduction
FromiOS 8.0
ToiOS 4.0

Introduction
FromiOS 8.0
ToiOS 4.0

Modified ADClient
Declaration
From
class ADClient : NSObject {
    class func sharedClient() -> ADClient!
    func determineAppInstallationAttributionWithCompletionHandler(_ completionHandler: ((Bool) -> Void)!)
    func lookupAdConversionDetails(_ completionHandler: ((NSDate!, NSDate!) -> Void)!)
    func addClientToSegments(_ segmentIdentifiers: [AnyObject]!, replaceExisting replaceExisting: Bool)
}
To
class ADClient : NSObject {
    class func sharedClient() -> ADClient!
    func determineAppInstallationAttributionWithCompletionHandler(_ completionHandler: ((Bool) -> Void)!)
    func lookupAdConversionDetails(_ completionHandler: ((NSDate!, NSDate!) -> Void)!)
    func requestAttributionDetailsWithBlock(_ completionHandler: (([NSObject : AnyObject]!, NSError!) -> Void)!)
    func addClientToSegments(_ segmentIdentifiers: [AnyObject]!, replaceExisting replaceExisting: Bool)
}

Deprecation
From--
ToiOS 9.0

Deprecation
From--
ToiOS 9.0

Raw Value Type
From--
ToInt

Declaration
From
class ADInterstitialAd : NSObject {
    weak var delegate: ADInterstitialAdDelegate!
    var loaded: Bool { get }
    var actionInProgress: Bool { get }
    func cancelAction()
    func presentInView(_ containerView: UIView!) -> Bool
    func presentFromViewController(_ viewController: UIViewController!)
}
To
class ADInterstitialAd : NSObject {
    weak var delegate: ADInterstitialAdDelegate?
    var loaded: Bool { get }
    var actionInProgress: Bool { get }
    func cancelAction()
    func presentInView(_ containerView: UIView!) -> Bool
    func presentFromViewController(_ viewController: UIViewController!)
}

Declaration
From
weak var delegate: ADInterstitialAdDelegate!
To
weak var delegate: ADInterstitialAdDelegate?

Introduction
FromiOS 8.0
ToiOS 4.3

Introduction
FromiOS 8.0
ToiOS 4.3

Introduction
FromiOS 8.0
ToiOS 4.3

Introduction
FromiOS 8.0
ToiOS 4.3

Introduction
FromiOS 8.0
ToiOS 4.3

Raw Value Type
From--
ToInt