-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nkws
committed
Jul 28, 2017
1 parent
5ff5552
commit 8070203
Showing
48 changed files
with
1,112 additions
and
190 deletions.
There are no files selected for viewing
Binary file not shown.
13 changes: 13 additions & 0 deletions
13
FluctSDK/FluctSDK.framework/Headers/FSSNativeTableViewCell.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// FSSNativeTableViewCell.h | ||
// FluctSDK | ||
// | ||
// Copyright © 2017年 fluct, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface FSSNativeTableViewCell : UITableViewCell | ||
|
||
- (void)loadAdWithGroupID:(NSString *)groupID unitID:(NSString *)unitID; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// FSSNativeView.h | ||
// FluctSDK | ||
// | ||
// Copyright © 2017年 fluct, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
typedef NS_ENUM(NSInteger, FSSErrorType) { | ||
FSSErrorTypeNoAd, | ||
FSSErrorTypeBadRequest, | ||
FSSErrorTypeNetworkConnection, | ||
FSSErrorTypeServerError, | ||
FSSErrorTypeOther | ||
}; | ||
|
||
typedef NS_ENUM(NSInteger, FSSNativeViewCallbackType) { | ||
FSSNativeViewCallbackTypeLoadFinish, | ||
FSSNativeViewCallbackTypeTap | ||
}; | ||
|
||
@protocol FSSNativeViewDelegate; | ||
|
||
@interface FSSNativeView : UIView <UIWebViewDelegate> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
@property (nullable, nonatomic, weak) id<FSSNativeViewDelegate> delegate; | ||
|
||
- (id)init __attribute__((unavailable("FSSNativeView's init is not available"))); | ||
- (id)initWithFrame:(CGRect)frame; | ||
- (id)initWithFrame:(CGRect)frame groupID:(NSString *)groupID unitID:(NSString *)unitID; | ||
|
||
- (void)setGroupID:(NSString *)groupID unitID:(NSString *)unitID; | ||
- (void)loadRequest; | ||
@end | ||
|
||
@protocol FSSNativeViewDelegate <NSObject> | ||
@optional | ||
- (void)nativeView:(FSSNativeView *)nativeView callbackType:(FSSNativeViewCallbackType)callbackType; | ||
- (void)nativeView:(FSSNativeView *)nativeView callbackErrorType:(FSSErrorType)callbackErrorType; | ||
@end | ||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file modified
BIN
+1.61 MB
(110%)
SampleApp/Objective-C/SampleApp/FluctSDK/FluctSDK.framework/FluctSDK
Binary file not shown.
13 changes: 13 additions & 0 deletions
13
SampleApp/Objective-C/SampleApp/FluctSDK/FluctSDK.framework/Headers/FSSNativeTableViewCell.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// FSSNativeTableViewCell.h | ||
// FluctSDK | ||
// | ||
// Copyright © 2017年 fluct, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface FSSNativeTableViewCell : UITableViewCell | ||
|
||
- (void)loadAdWithGroupID:(NSString *)groupID unitID:(NSString *)unitID; | ||
@end |
43 changes: 43 additions & 0 deletions
43
SampleApp/Objective-C/SampleApp/FluctSDK/FluctSDK.framework/Headers/FSSNativeView.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// FSSNativeView.h | ||
// FluctSDK | ||
// | ||
// Copyright © 2017年 fluct, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
typedef NS_ENUM(NSInteger, FSSErrorType) { | ||
FSSErrorTypeNoAd, | ||
FSSErrorTypeBadRequest, | ||
FSSErrorTypeNetworkConnection, | ||
FSSErrorTypeServerError, | ||
FSSErrorTypeOther | ||
}; | ||
|
||
typedef NS_ENUM(NSInteger, FSSNativeViewCallbackType) { | ||
FSSNativeViewCallbackTypeLoadFinish, | ||
FSSNativeViewCallbackTypeTap | ||
}; | ||
|
||
@protocol FSSNativeViewDelegate; | ||
|
||
@interface FSSNativeView : UIView <UIWebViewDelegate> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
@property (nullable, nonatomic, weak) id<FSSNativeViewDelegate> delegate; | ||
|
||
- (id)init __attribute__((unavailable("FSSNativeView's init is not available"))); | ||
- (id)initWithFrame:(CGRect)frame; | ||
- (id)initWithFrame:(CGRect)frame groupID:(NSString *)groupID unitID:(NSString *)unitID; | ||
|
||
- (void)setGroupID:(NSString *)groupID unitID:(NSString *)unitID; | ||
- (void)loadRequest; | ||
@end | ||
|
||
@protocol FSSNativeViewDelegate <NSObject> | ||
@optional | ||
- (void)nativeView:(FSSNativeView *)nativeView callbackType:(FSSNativeViewCallbackType)callbackType; | ||
- (void)nativeView:(FSSNativeView *)nativeView callbackErrorType:(FSSErrorType)callbackErrorType; | ||
@end | ||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
SampleApp/Objective-C/SampleApp/Native/NativeTableViewController.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// NativeTableViewController.h | ||
// SampleApp | ||
// | ||
// Copyright © 2017年 fluct, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface NativeTableViewController : UITableViewController | ||
|
||
@end |
46 changes: 46 additions & 0 deletions
46
SampleApp/Objective-C/SampleApp/Native/NativeTableViewController.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// | ||
// NativeTableViewController.m | ||
// SampleApp | ||
// | ||
// Copyright © 2017年 fluct, Inc. All rights reserved. | ||
// | ||
|
||
#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"]; | ||
} else { | ||
UITableViewCell *otherCell = [tableView dequeueReusableCellWithIdentifier:@"other"]; | ||
return otherCell; | ||
} | ||
return self.cell; | ||
} | ||
|
||
@end |
12 changes: 12 additions & 0 deletions
12
SampleApp/Objective-C/SampleApp/Native/NativeViewController.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// | ||
// NativeViewController.h | ||
// SampleApp | ||
// | ||
// Copyright © 2017年 fluct, Inc. All rights reserved. | ||
// | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@interface NativeViewController : UIViewController | ||
|
||
@end |
21 changes: 21 additions & 0 deletions
21
SampleApp/Objective-C/SampleApp/Native/NativeViewController.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// NativeViewController.m | ||
// SampleApp | ||
// | ||
// Copyright © 2017年 fluct, Inc. All rights reserved. | ||
// | ||
|
||
#import "NativeViewController.h" | ||
@import FluctSDK; | ||
|
||
@implementation NativeViewController | ||
|
||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
|
||
FSSNativeView *nativeView = [[FSSNativeView alloc] initWithFrame:CGRectMake(0, 100, 320, 50) groupID: @"1000076934" unitID: @"1000115021"]; | ||
[nativeView loadRequest]; | ||
[self.view addSubview:nativeView]; | ||
} | ||
|
||
@end |
Oops, something went wrong.