Documentation Archive Developer
Search

iAd Changes for Swift

iAd

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!

Declaration
From
enum ADError : Int {
    case Unknown
    case ServerFailure
    case LoadingThrottled
    case InventoryUnavailable
    case ConfigurationError
    case BannerVisibleWithoutContent
    case ApplicationInactive
    case AdUnloaded
}
To
enum ADError : Int {
    case Unknown
    case ServerFailure
    case LoadingThrottled
    case InventoryUnavailable
    case ConfigurationError
    case BannerVisibleWithoutContent
    case ApplicationInactive
    case AdUnloaded
    case AssetLoadFailure
}

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!