Skip to main content

Migration To SDK v6

info

Apply these mandatory changes while updating the SDK from 5.x to 6.x

Changes in GFPAdParam & GFPUserParam added.

User targeting parameters are moved from GFPAdParam to GFPUserParam. GFPAdParam is needed to be set on every ad request. Meanwhile, GFPUserParam is applied in GFPAdManager which is shared instance.

GFPAdParam Before

GFPAdParam *adParam = [[GFPAdParam alloc] init];
adParam.gender = GFPAdParamGenderTypeFemale;
adParam.yearOfBirth = 1995;
adParam.userCountryCode = @"KR";
adParam.userID = @"abcd";

GFPUserParam Now

GFPUserParam *userParam;
GFPUserParam *userParam;
if (GFPAdManager.userParam != nil) {
userParam = GFPAdManager.userParam;
} else {
userParam = [[GFPUserParam alloc] init];
}
userParam.gender = GFPUserParamGenderTypeFemale;
userParam.yearOfBirth = 1995;
userParam.userCountryCode = @"KR";
userParam.userID = @"abcd";
[GFPAdManager setUserParam: userParam];