Skip to content

Commit 7b6c92e

Browse files
authored
Merge pull request #70 from teads/develop
Release v2.7.0
2 parents 99b902f + 86d0e8b commit 7b6c92e

File tree

10 files changed

+38
-12
lines changed

10 files changed

+38
-12
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
v2.7.0
4+
- Added new ad format support
5+
- Internal improvements
6+
- Minor internal fixes
7+
38
v2.6.0
49
- Drop iOS 7
510
- Minor improvements on the player

TeadsSDK.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "TeadsSDK"
4-
s.version = "2.6.0"
4+
s.version = "2.7.0"
55
s.summary = "Teads' iOS SDK"
66

77
s.description = <<-DESC

TeadsSDKDemo/AppDelegate.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2121
[TeadsSDK setLogLevel:TeadslogLevelVerbose];
2222

2323
if (![[NSUserDefaults standardUserDefaults] stringForKey:@"pid"]) {
24-
[[NSUserDefaults standardUserDefaults] setObject:@"27695" forKey:@"pid"];
24+
/** /!\ /!\ /!\
25+
* WARNING: Don't use this PID (54934) in production. Contact your Publisher Manager to obtain your own dedicated PID
26+
* /!\ /!\ /!\
27+
*/
28+
[[NSUserDefaults standardUserDefaults] setObject:@"54934" forKey:@"pid"];
2529
}
2630
if (![[NSUserDefaults standardUserDefaults] stringForKey:@"website"]) {
2731
[[NSUserDefaults standardUserDefaults] setObject:@"Default demo website" forKey:@"website"];

TeadsSDKDemo/Demo Pages/inRead/CustomAdCollectionViewController.m

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
114114
if ([indexPath isEqual:self.insertionPath]) {
115115
self.adCell = [collectionView dequeueReusableCellWithReuseIdentifier:@"teadsAdCell" forIndexPath:indexPath];
116116

117-
[self.adCell.contentView addSubview:self.teadsAd.videoView];
118-
if (!self.videoViewAdded) {
119-
[self.teadsAd videoViewWasAdded]; //Inform that Teads Ad was added
120-
self.videoViewAdded = YES;
121-
}
122-
123117
return self.adCell;
124118
} else {
125119
CustomCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:collectionViewCellID forIndexPath:indexPath];
@@ -140,7 +134,9 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
140134
#pragma mark - UIScrollView
141135

142136
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
143-
[self.teadsAd videoViewDidMove:scrollView]; //Inform TeadsAd that the view did move in its scrollView container
137+
if (self.videoViewAdded) {
138+
[self.teadsAd videoViewDidMove:scrollView]; //Inform TeadsAd that the view did move in its scrollView container
139+
}
144140
}
145141

146142
#pragma mark - UICollectionView delegate
@@ -153,6 +149,18 @@ - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollection
153149
}
154150
}
155151

152+
153+
-(void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath :(NSIndexPath *)indexPath {
154+
if ([indexPath isEqual:self.insertionPath]) { //self.insertionPath is the indexPath where TeadsAd was added
155+
if (!self.videoViewAdded) {
156+
[self.adCell.contentView addSubview:self.teadsAd.videoView];
157+
[self.teadsAd videoViewWasAdded]; //Inform that Teads Ad was added and cell will be displayed
158+
self.videoViewAdded = YES;
159+
}
160+
}
161+
}
162+
163+
156164
#pragma mark -
157165
#pragma mark - Your methods to calculate Custom Ad size
158166

TeadsSDKDemo/Intern/DemoUtils.m

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ +(void)presentControllerToChangePid:(id)controller {
1919

2020
[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
2121
textField.clearButtonMode = UITextFieldViewModeWhileEditing;
22-
textField.placeholder = @"27695";
23-
if (![[[NSUserDefaults standardUserDefaults] stringForKey:@"pid"] isEqual:@"27695"]) {
22+
23+
/** /!\ /!\ /!\
24+
* WARNING: Don't use this PID (54934) in production. Contact your Publisher Manager to obtain your own dedicated PID
25+
* /!\ /!\ /!\
26+
*/
27+
textField.placeholder = @"54934";
28+
if (![[[NSUserDefaults standardUserDefaults] stringForKey:@"pid"] isEqual:@"54934"]) {
2429
textField.text = [[NSUserDefaults standardUserDefaults] stringForKey:@"pid"];
2530
}
2631
}];
@@ -33,7 +38,11 @@ +(void)presentControllerToChangePid:(id)controller {
3338
if (![alert.textFields.firstObject.text isEqual:@""]) {
3439
[[NSUserDefaults standardUserDefaults] setObject:alert.textFields.firstObject.text forKey:@"pid"];;
3540
} else {
36-
[[NSUserDefaults standardUserDefaults] setObject:@"27695" forKey:@"pid"];;
41+
/** /!\ /!\ /!\
42+
* WARNING: Don't use this PID (54934) in production. Contact your Publisher Manager to obtain your own dedicated PID
43+
* /!\ /!\ /!\
44+
*/
45+
[[NSUserDefaults standardUserDefaults] setObject:@"54934" forKey:@"pid"];;
3746
}
3847
[alert dismissViewControllerAnimated:YES completion:nil];
3948
}];
0 Bytes
Binary file not shown.
9 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.
-5 Bytes
Binary file not shown.
263 KB
Binary file not shown.

0 commit comments

Comments
 (0)