Skip to content

Commit

Permalink
add SDK Ver 4.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nkws committed Apr 11, 2018
1 parent 63dabfd commit bac4820
Show file tree
Hide file tree
Showing 27 changed files with 103 additions and 25 deletions.
Binary file modified FluctSDK/FluctSDK.framework/FluctSDK
Binary file not shown.
18 changes: 15 additions & 3 deletions FluctSDK/FluctSDK.framework/Headers/FSSAdRequestTargeting.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
#import <CoreLocation/CoreLocation.h>
#import <Foundation/Foundation.h>

@interface FSSAdRequestTargeting : NSObject
NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, FSSGender) {
FSSGenderUnknown = 0,
FSSGenderMale,
FSSGenderFemale
};

@property (nonatomic, copy) NSString *userID;
@property (nonatomic, copy) CLLocation *location;
@interface FSSAdRequestTargeting : NSObject

@property (nonatomic, copy, nullable) NSString *userID;
@property (nonatomic, copy, nullable) CLLocation *location;
@property (nonatomic) FSSGender gender;
@property (nonatomic, copy, nullable) NSDate *birthday;
@property (nonatomic) NSInteger age;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2017年 fluct, Inc. All rights reserved.
//

#import "FSSAdRequestTargeting.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

Expand All @@ -28,7 +29,8 @@ typedef NS_ENUM(NSInteger, FSSRewardedVideoADNWStatus) {
- (instancetype)initWithDictionary:(NSDictionary *)dictionary
delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate
testMode:(BOOL)testMode
debugMode:(BOOL)debugMode;
debugMode:(BOOL)debugMode
targeting:(FSSAdRequestTargeting *)targeting;

- (void)loadRewardedVideoWithDictionary:(NSDictionary *)dictionary;
- (FSSRewardedVideoADNWStatus)loadStatus;
Expand Down
2 changes: 1 addition & 1 deletion FluctSDK/FluctSDK.framework/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.7.4</string>
<string>4.8.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ pod "FluctSDK"
FluctSDK-iOSの[Wiki](https://github.com/voyagegroup/FluctSDK-iOS/wiki)を参照してください

# FluctSDK Release Note
## v4.8.0 2018/04/11
* 動画リワード広告配信のターゲティングにユーザー属性を利用する機能を追加

## v4.7.4 2018/03/29
* UnityAdsの動画リワード広告配信時にiOS9系以下の端末で `NSInvalidArgumentException` が発生しクラッシュするバグの修正
* `FSSNativeTableViewCell` 内の`FSSNativeView` が常にセルの `ContentView` と同じサイズになる挙動に変更
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ + (ALIncentivizedInterstitialAd *)rewardedVideoWithSdk:(ALSdk *)sdk {
return [[ALIncentivizedInterstitialAd alloc] initWithSdk:sdk];
}

- (instancetype)initWithDictionary:(NSDictionary *)dictionary delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate testMode:(BOOL)testMode debugMode:(BOOL)debugMode {
self = [super initWithDictionary:dictionary delegate:delegate testMode:testMode debugMode:debugMode];
- (instancetype)initWithDictionary:(NSDictionary *)dictionary delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate testMode:(BOOL)testMode debugMode:(BOOL)debugMode targeting:(FSSAdRequestTargeting *)targeting {
self = [super initWithDictionary:dictionary delegate:delegate testMode:testMode debugMode:debugMode targeting:nil];
if (self) {
static dispatch_once_t onceToken;
ALSdk *applovinSDK = [FSSRewardedVideoCustomEventAppLovin sharedWithKey:dictionary[@"sdk_key"]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ @interface FSSRewardedVideoCustomEventUnityAds () <FSSRewardedVideoUnityAdsManag

@implementation FSSRewardedVideoCustomEventUnityAds

- (instancetype)initWithDictionary:(NSDictionary *)dictionary delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate testMode:(BOOL)testMode debugMode:(BOOL)debugMode {
self = [super initWithDictionary:dictionary delegate:delegate testMode:testMode debugMode:debugMode];
- (instancetype)initWithDictionary:(NSDictionary *)dictionary delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate testMode:(BOOL)testMode debugMode:(BOOL)debugMode targeting:(FSSAdRequestTargeting *)targeting {
self = [super initWithDictionary:dictionary delegate:delegate testMode:testMode debugMode:debugMode targeting:nil];
if (self != nil) {
_isInitialNotificationForAdapter = YES;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ @interface FSSRewardedVideoCustomEventMaio ()

@implementation FSSRewardedVideoCustomEventMaio

- (instancetype)initWithDictionary:(NSDictionary *)dictionary delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate testMode:(BOOL)testMode debugMode:(BOOL)debugMode {

self = [super initWithDictionary:dictionary delegate:delegate testMode:testMode debugMode:debugMode];
- (instancetype)initWithDictionary:(NSDictionary *)dictionary delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate testMode:(BOOL)testMode debugMode:(BOOL)debugMode targeting:(FSSAdRequestTargeting *)targeting {
self = [super initWithDictionary:dictionary delegate:delegate testMode:testMode debugMode:debugMode targeting:nil];
if (!self) {
return nil;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@ + (NADRewardedVideo *)initializeNendSDKWithSpotId:(NSString *)spotId apiKey:(NSS
return [[NADRewardedVideo alloc] initWithSpotId:spotId apiKey:apiKey];
}

- (instancetype)initWithDictionary:(NSDictionary *)dictionary delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate testMode:(BOOL)testMode debugMode:(BOOL)debugMode {
- (instancetype)initWithDictionary:(NSDictionary *)dictionary delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate testMode:(BOOL)testMode debugMode:(BOOL)debugMode targeting:(FSSAdRequestTargeting *)targeting {
if (![FSSRewardedVideoCustomEventNend shouldInitNendSDKWithSystemVersion:UIDevice.currentDevice.systemVersion]) {
return nil;
}

self = [super initWithDictionary:dictionary delegate:delegate testMode:testMode debugMode:debugMode];
self = [super initWithDictionary:dictionary delegate:delegate testMode:testMode debugMode:debugMode targeting:nil];

_nendRewardedVideo = [FSSRewardedVideoCustomEventNend initializeNendSDKWithSpotId:dictionary[@"spot_id"] apiKey:dictionary[@"api_key"]];
_nendRewardedVideo.delegate = self;
_nendRewardedVideo.userFeature = [FSSRewardedVideoCustomEventNend generateUserFeatureWithTargeting:targeting];

return self;
}

Expand Down Expand Up @@ -148,4 +151,33 @@ - (void)nadRewardVideoAdDidClickAd:(NADRewardedVideo *)nadRewardedVideoAd {

- (void)nadRewardVideoAd:(NADRewardedVideo *)nadRewardedVideoAd didReward:(NADReward *)reward {
}

+ (NADUserFeature *)generateUserFeatureWithTargeting:(FSSAdRequestTargeting *)targeting {
if (!targeting) {
return nil;
}

NADUserFeature *feature = [FSSRewardedVideoCustomEventNend userFeature];

if (targeting.gender == FSSGenderMale) {
feature.gender = NADGenderMale;
} else if (targeting.gender == NADGenderFemale) {
feature.gender = NADGenderFemale;
}

if (targeting.age) {
feature.age = targeting.age;
}

if (targeting.birthday) {
NSDateComponents *components = [[[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian] components:NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay fromDate:targeting.birthday];
[feature setBirthdayWithYear:components.year month:components.month day:components.day];
}

return feature;
}

+ (NADUserFeature *)userFeature {
return [NADUserFeature new];
}
@end
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
@interface NADInterstitialVideo : NADVideo

@property (nonatomic, weak, readwrite) id<NADInterstitialVideoDelegate> delegate;
@property (nonatomic, copy) UIColor *fallbackFullboardBackgroundColor;

- (void)addFallbackFullboardWithSpotId:(NSString *)spotId apiKey:(NSString *)apiKey;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ FOUNDATION_EXPORT const unsigned char NendAdVersionString[];
#import <NendAd/NADRewardedVideo.h>
#import <NendAd/NADInterstitialVideo.h>
#import <NendAd/NADReward.h>
#import <NendAd/NADVideoError.h>
#import <NendAd/NADVideoError.h>
#import <NendAd/NADUserFeature.h>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
#import <CoreLocation/CoreLocation.h>
#import <Foundation/Foundation.h>

@interface FSSAdRequestTargeting : NSObject
NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, FSSGender) {
FSSGenderUnknown = 0,
FSSGenderMale,
FSSGenderFemale
};

@property (nonatomic, copy) NSString *userID;
@property (nonatomic, copy) CLLocation *location;
@interface FSSAdRequestTargeting : NSObject

@property (nonatomic, copy, nullable) NSString *userID;
@property (nonatomic, copy, nullable) CLLocation *location;
@property (nonatomic) FSSGender gender;
@property (nonatomic, copy, nullable) NSDate *birthday;
@property (nonatomic) NSInteger age;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2017年 fluct, Inc. All rights reserved.
//

#import "FSSAdRequestTargeting.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

Expand All @@ -28,7 +29,8 @@ typedef NS_ENUM(NSInteger, FSSRewardedVideoADNWStatus) {
- (instancetype)initWithDictionary:(NSDictionary *)dictionary
delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate
testMode:(BOOL)testMode
debugMode:(BOOL)debugMode;
debugMode:(BOOL)debugMode
targeting:(FSSAdRequestTargeting *)targeting;

- (void)loadRewardedVideoWithDictionary:(NSDictionary *)dictionary;
- (FSSRewardedVideoADNWStatus)loadStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.7.4</string>
<string>4.8.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,21 @@
#import <CoreLocation/CoreLocation.h>
#import <Foundation/Foundation.h>

@interface FSSAdRequestTargeting : NSObject
NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, FSSGender) {
FSSGenderUnknown = 0,
FSSGenderMale,
FSSGenderFemale
};

@property (nonatomic, copy) NSString *userID;
@property (nonatomic, copy) CLLocation *location;
@interface FSSAdRequestTargeting : NSObject

@property (nonatomic, copy, nullable) NSString *userID;
@property (nonatomic, copy, nullable) CLLocation *location;
@property (nonatomic) FSSGender gender;
@property (nonatomic, copy, nullable) NSDate *birthday;
@property (nonatomic) NSInteger age;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Copyright © 2017年 fluct, Inc. All rights reserved.
//

#import "FSSAdRequestTargeting.h"
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

Expand All @@ -28,7 +29,8 @@ typedef NS_ENUM(NSInteger, FSSRewardedVideoADNWStatus) {
- (instancetype)initWithDictionary:(NSDictionary *)dictionary
delegate:(id<FSSRewardedVideoCustomEventDelegate>)delegate
testMode:(BOOL)testMode
debugMode:(BOOL)debugMode;
debugMode:(BOOL)debugMode
targeting:(FSSAdRequestTargeting *)targeting;

- (void)loadRewardedVideoWithDictionary:(NSDictionary *)dictionary;
- (FSSRewardedVideoADNWStatus)loadStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.7.4</string>
<string>4.8.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
Expand Down

0 comments on commit bac4820

Please sign in to comment.