我已遵循此Link中提供的文档。我正在使用Bridging标头以Swift语言实现它。
Myapp-Bridging-Header.h
#import "MNGAdsSDKFactory.h"
但是,当我使用方法interstitialAdsFactory.loadInterstitial()
展示插页式广告时,出现以下错误:
Value of type 'MNGAdsSDKFactory?' has no member 'loadInterstitial'
这是我的代码,
在viewDidLoad
HomeViewController.swift
func madvertiseInterstitialAd () {
interstitialAdsFactory = MNGAdsSDKFactory()
interstitialAdsFactory.interstitialDelegate = self
interstitialAdsFactory.viewController = self
interstitialAdsFactory.placementId = String(format: "/%d/%d/interstitial",Constants.kMadvertiseID, Constants.kMadvertisePlacement)
interstitialAdsFactory.viewController = self
interstitialAdsFactory.loadInterstitial() // this lines returns error "Value of type 'MNGAdsSDKFactory?' has no member 'loadInterstitial'"
}