Skip to main content

Migrating to v8

info

The following content describes changes when upgrading from version 7.x.x to version 8.0.0.

CocoaPods Dependencies​

S2S Mediation​

There are no changes to the NDA, NDAVideo, and NDARich modules provided as S2S Mediation.

source 'https://github.com/CocoaPods/Specs.git'

target 'MyApplication' do
pod 'NAMSDK'
pod 'NAMSDK/MediationNDA'
pod 'NAMSDK/MediationNDAVideo'
pod 'NAMSDK/MediationNDARich'
end

C2S Mediation​

Starting from version 8.0.0, C2S Mediation modules are provided as separate modules.

  • Example
    • Before: pod 'NAMSDK/MediationDFP
    • After: pod 'NAMSDKMediationDFP

C2S modules cannot be used standalone; both NAMSDK and NAMSDKMediation must be applied together. For version compatibility between NAMSDK and NAMSDKMediation, refer to Mediation Network Versions.

source 'https://github.com/CocoaPods/Specs.git'

target 'MyApplication' do
pod 'NAMSDK' # SDK Core

pod 'NAMSDKMediationDFP'
pod 'NAMSDKMediationIMA'
pod 'NAMSDKMediationFAN'
pod 'NAMSDKMediationInMobi'
pod 'NAMSDKMediationUnity'
pod 'NAMSDKMediationAppLovin'
pod 'NAMSDKMediationVungle'
pod 'NAMSDKMediationDT'
pod 'NAMSDKMediationIronSource'
pod 'NAMSDKMediationAPS'
pod 'NAMSDKMediationLAN'
end

Removed APIs​

GFPNativeLanguageType​

GFPNativeLanguageType has been removed. languageType can be replaced with GFPLanguageType.

typedef NS_OPTIONS(NSInteger, GFPNativeLanguageType) {
GFPNativeLanguageType_ko,
GFPNativeLanguageType_en,
GFPNativeLanguageType_es,
GFPNativeLanguageType_fr,
GFPNativeLanguageType_id,
GFPNativeLanguageType_th,
GFPNativeLanguageType_zh_HK,
GFPNativeLanguageType_zh_TW,
} DEPRECATED_MSG_ATTRIBUTE("This type will be removed. Use `GFPLanguageType` instead");

typedef NS_ENUM(NSInteger, GFPLanguageType) {
GFPLanguageType_none,
GFPLanguageType_ko,
GFPLanguageType_en,
GFPLanguageType_es,
GFPLanguageType_fr,
GFPLanguageType_id,
GFPLanguageType_th,
GFPLanguageType_zh_Hant,
GFPLanguageType_zh_Hans,
GFPLanguageType_ja,
GFPLanguageType_de,
};

Video Ads​

preferredLanguage​

GFPVideoRenderingSetting.preferredLanguage has been removed. Please set preferredLanguage on GFPAdConfiguration.preferredLanguage instead.

// before
GFPVideoAdRenderingSetting *setting = [[GFPVideoAdRenderingSetting alloc] init];
setting.preferredLanguage = GFPLanguageType_ko;

// after
GFPAdManager.adConfiguration.preferredLanguage = GFPLanguageType_ko;

Native Simple Ads​

image​

nativeSimpleAd.image has been removed. The aspect ratio information for the image can be obtained through GFPMediaData.aspectRatio.

// simpleAd is "GFPNativeSimpleAd"

// before
UIImage *image = nativeSimpleAd.image;

// after
CGFloat aspectRatio = nativeSimpleAd.assets.mediaData.aspectRatio;

Native Normal Ads​

mediaAspectRatio​

nativeAd.mediaAspectRatio has been removed. Please switch to using GFPMediaData.aspectRatio.

// nativeAd is "GFPNativeAd"

// before
CGFloat mediaAspectRatio = nativeAd.mediaAspectRatio;

// after
CGFloat aspectRatio = nativeAd.mediaData.aspectRatio;

imageSize​

nativeAd.imageSize has been removed. The aspect ratio information corresponding to imageSize can be obtained through GFPMediaData.aspectRatio.

// nativeAd is "GFPNativeAd"

// before
CGSize imageSize = nativeAd.imageSize;

// after
CGFloat aspectRatio = nativeAd.mediaData.aspectRatio;

iconSize​

nativeAd.iconSize has been removed. The aspect ratio information corresponding to iconSize can be obtained through GFPIconData.aspectRatio.

// nativeAd is "GFPNativeAd"

// before
CGSize iconSize = nativeAd.iconSize;

// after
CGFloat aspectRatio = nativeAd.iconData.aspectRatio;

Rewarded Ads​

isMuted / setIsMuted​

GFPRewardedAdManager.isMuted and GFPRewardedAdManager.setIsMuted have been removed. Mute status can be queried and set through GFPAdConfiguration.muteAudio.

// before
BOOL isMuted = [GFPRewardedAdManager isMuted];
[GFPRewardedAdManager setIsMuted: YES];

// after
BOOL isMuted = GFPAdManager.adConfiguration.muteAudio;
GFPAdManager.adConfiguration.muteAudio = true;