Skip to content

Commit

Permalink
add SDK Ver 4.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nkws committed Mar 29, 2018
1 parent 8ca7c8f commit 63dabfd
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 56 deletions.
Binary file modified FluctSDK/FluctSDK.framework/FluctSDK
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
#import <UIKit/UIKit.h>

@interface FSSNativeTableViewCell : UITableViewCell

- (void)loadAdWithGroupID:(NSString *)groupID unitID:(NSString *)unitID;
@end
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.3</string>
<string>4.7.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ pod "FluctSDK"
FluctSDK-iOSの[Wiki](https://github.com/voyagegroup/FluctSDK-iOS/wiki)を参照してください

# FluctSDK Release Note
## v4.7.4 2018/03/29
* UnityAdsの動画リワード広告配信時にiOS9系以下の端末で `NSInvalidArgumentException` が発生しクラッシュするバグの修正
* `FSSNativeTableViewCell` 内の`FSSNativeView` が常にセルの `ContentView` と同じサイズになる挙動に変更

## v4.7.3 2018/03/07
* サンプルコードのプロジェクト構成を修正
* v4.7.2で配布しているSDKバイナリに不要な実装が含まれていたのを削除
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,29 @@ - (instancetype)initWithInterval:(NSTimeInterval)interval
}

- (void)start {
__weak __typeof(self) weakSelf = self;
self.timer = [NSTimer scheduledTimerWithTimeInterval:self.interval
repeats:YES
block:^(NSTimer *_Nonnull timer) {
weakSelf.count += 1;
if (weakSelf.limit < weakSelf.count) {
if (weakSelf.fallback) {
weakSelf.fallback();
}
[weakSelf.timer invalidate];
return;
}
target:self
selector:@selector(notifyIfPossible)
userInfo:nil
repeats:YES];
}

if (!weakSelf.shouldCompletion()) {
return;
}
- (void)notifyIfPossible {
self.count += 1;
if (self.limit < self.count) {
if (self.fallback) {
self.fallback();
}
[self.timer invalidate];
return;
}

weakSelf.completion();
[weakSelf.timer invalidate];
}];
if (!self.shouldCompletion()) {
return;
}

self.completion();
[self.timer invalidate];
}

- (void)invalidate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,25 @@ - (void)nadRewardVideoAd:(NADRewardedVideo *)nadRewardedVideoAd didFailToLoadWit
_adnwStatus = FSSRewardedVideoADNWStatusNotDisplayable;
[weakSelf.delegate rewardedVideoDidFailToLoadForCustomEvent:weakSelf
fluctError:[NSError errorWithDomain:FSSRewardedVideoAdsSDKDomain
code:FSSRewardedVideoAdErrorLoadFailed
code:[self rewardedVideoErrorCodeWithError:error]
userInfo:nil]
adnetworkError:error.code];
});
}

- (FSSRewardedVideoErrorCode)rewardedVideoErrorCodeWithError:(NSError *)error {
switch (error.code) {
case 204:
return FSSRewardedVideoAdErrorNoAds;

case 400:
return FSSRewardedVideoAdErrorBadRequest;

default:
return FSSRewardedVideoAdErrorLoadFailed;
}
}

- (void)nadRewardVideoAdDidFailedToPlay:(NADRewardedVideo *)nadRewardedVideoAd {
__weak __typeof(self) weakSelf = self;
dispatch_async(FSSRewardedVideoWorkQueue(), ^{
Expand Down
2 changes: 2 additions & 0 deletions SampleApp/Objective-C/SampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down Expand Up @@ -579,6 +580,7 @@
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
#import <UIKit/UIKit.h>

@interface FSSNativeTableViewCell : UITableViewCell

- (void)loadAdWithGroupID:(NSString *)groupID unitID:(NSString *)unitID;
@end
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.3</string>
<string>4.7.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
Expand Down
24 changes: 6 additions & 18 deletions SampleApp/Objective-C/SampleApp/Native/NativeTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,27 @@
#import "NativeTableViewController.h"
@import FluctSDK;

@interface NativeTableViewController ()
@property (nonatomic) FSSNativeTableViewCell *cell;
@end

@implementation NativeTableViewController

- (void)viewDidLoad {
[super viewDidLoad];
self.tableView.estimatedRowHeight = 50;
// storyboardでreuse identifierを設定しない場合に設定
// [self.tableView registerClass:FSSNativeTableViewCell.class forCellReuseIdentifier:@"native"];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 50;
}

- (FSSNativeTableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row == 0) {
self.cell = [tableView dequeueReusableCellWithIdentifier:@"native" forIndexPath:indexPath];
[self.cell loadAdWithGroupID:@"1000076934" unitID:@"1000115021"];
} else if (indexPath.row == 20) {
// ※ 広告の更新を行うため広告のインプレッションが発生します
self.cell = [tableView dequeueReusableCellWithIdentifier:@"native" forIndexPath:indexPath];
[self.cell loadAdWithGroupID:@"1000076934" unitID:@"1000115021"];
} else if (indexPath.row == 40) {
self.cell = [tableView dequeueReusableCellWithIdentifier:@"native" forIndexPath:indexPath];
[self.cell loadAdWithGroupID:@"1000076934" unitID:@"1000115021"];
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.row % 20 == 0) {
FSSNativeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"native" forIndexPath:indexPath];
[cell loadAdWithGroupID:@"1000076934" unitID:@"1000115021"];
return cell;

} else {
UITableViewCell *otherCell = [tableView dequeueReusableCellWithIdentifier:@"other"];
return otherCell;
}
return self.cell;
}

@end
2 changes: 2 additions & 0 deletions SampleApp/Swift/SampleApp-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@
"DEBUG=1",
"$(inherited)",
);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down Expand Up @@ -470,6 +471,7 @@
FRAMEWORK_SEARCH_PATHS = "";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -30,6 +40,16 @@
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
Expand Down Expand Up @@ -64,6 +84,11 @@
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
#import <UIKit/UIKit.h>

@interface FSSNativeTableViewCell : UITableViewCell

- (void)loadAdWithGroupID:(NSString *)groupID unitID:(NSString *)unitID;
@end
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.3</string>
<string>4.7.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,23 @@ import FluctSDK

class NativeTableViewController: UITableViewController {

var cell: FSSNativeTableViewCell!

override func viewDidLoad() {
super.viewDidLoad()
self.tableView.estimatedRowHeight = 50
// storyboardで reuse identifierを設定しない場合に設定
// self.tableView.register(FSSNativeTableViewCell.self, forCellReuseIdentifier: "test")
}

override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 50
}

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
cell = tableView.dequeueReusableCell(withIdentifier: "native", for: indexPath) as! FSSNativeTableViewCell
cell.loadAd(withGroupID: "1000076934", unitID: "1000115021")
} else if indexPath.row == 20 {
// ※ 広告の更新を行うため広告のインプレッションが発生します
cell = tableView.dequeueReusableCell(withIdentifier: "native", for: indexPath) as! FSSNativeTableViewCell
cell.loadAd(withGroupID: "1000076934", unitID: "1000115021")
} else if (indexPath.row == 40) {
cell = tableView.dequeueReusableCell(withIdentifier: "native", for: indexPath) as! FSSNativeTableViewCell
if indexPath.row % 20 == 0 {
let cell: FSSNativeTableViewCell = tableView.dequeueReusableCell(withIdentifier: "native", for: indexPath) as! FSSNativeTableViewCell
cell.loadAd(withGroupID: "1000076934", unitID: "1000115021")
return cell
} else {
let otherCell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "other", for: indexPath)
return otherCell
}
return cell
}
}

0 comments on commit 63dabfd

Please sign in to comment.