Skip to content

Commit 4e99236

Browse files
committed
Merge branch 'master' into admob-spm
# Conflicts: # README.md
2 parents eee8f0b + 3a7faaf commit 4e99236

File tree

6 files changed

+107
-63
lines changed

6 files changed

+107
-63
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ If you want to display Teads ads in your iOS application through AdMob mediation
1111
- ![Platform: iOS 10+](https://img.shields.io/badge/Platform-iOS%2010%2B-blue.svg?style=flat)
1212
- ![Xcode: 12.5+](https://img.shields.io/badge/Xcode-12.5+-blue.svg?style=flat)
1313
- ![GoogleMobileAdsSDK: 9.0+](https://img.shields.io/badge/GoogleMobileAdsSDK-9.0+-blue.svg?style=flat)
14-
- ![Teads SDK: 5.0.3+](https://img.shields.io/badge/Teads%20SDK-5.0.3+-blue.svg?style=flat)
14+
- ![Teads SDK: 5.0.20+](https://img.shields.io/badge/Teads%20SDK-5.0.20+-blue.svg?style=flat)
1515

1616
- ✅ Displaying Teads banners
1717
- ✅ Displaying Teads native ads
@@ -22,7 +22,7 @@ Before installing Teads adapter, you need to implement [Google Mobile Ads](https
2222

2323
### Swift Package Manager
2424

25-
[SPM](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. To integrate TeadsSDK into your Xcode project using SPM, specify package repository url :
25+
[SPM](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies. To integrate TeadsSDK into your Xcode project using SPM, specify the following :
2626

2727
- Repository: `https://github.com/teads/TeadsSDK-iOS`
2828
- Dependency rule: `branch`

TeadsSampleApp/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 74 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,66 @@
150150
"scale" : "1x",
151151
"size" : "1024x1024"
152152
},
153+
{
154+
"filename" : "16.png",
155+
"idiom" : "mac",
156+
"scale" : "1x",
157+
"size" : "16x16"
158+
},
159+
{
160+
"filename" : "32.png",
161+
"idiom" : "mac",
162+
"scale" : "2x",
163+
"size" : "16x16"
164+
},
165+
{
166+
"filename" : "32.png",
167+
"idiom" : "mac",
168+
"scale" : "1x",
169+
"size" : "32x32"
170+
},
171+
{
172+
"filename" : "64.png",
173+
"idiom" : "mac",
174+
"scale" : "2x",
175+
"size" : "32x32"
176+
},
177+
{
178+
"filename" : "128.png",
179+
"idiom" : "mac",
180+
"scale" : "1x",
181+
"size" : "128x128"
182+
},
183+
{
184+
"filename" : "256.png",
185+
"idiom" : "mac",
186+
"scale" : "2x",
187+
"size" : "128x128"
188+
},
189+
{
190+
"filename" : "256.png",
191+
"idiom" : "mac",
192+
"scale" : "1x",
193+
"size" : "256x256"
194+
},
195+
{
196+
"filename" : "512.png",
197+
"idiom" : "mac",
198+
"scale" : "2x",
199+
"size" : "256x256"
200+
},
201+
{
202+
"filename" : "512.png",
203+
"idiom" : "mac",
204+
"scale" : "1x",
205+
"size" : "512x512"
206+
},
207+
{
208+
"filename" : "1024.png",
209+
"idiom" : "mac",
210+
"scale" : "2x",
211+
"size" : "512x512"
212+
},
153213
{
154214
"filename" : "48.png",
155215
"idiom" : "watch",
@@ -225,6 +285,13 @@
225285
"size" : "51x51",
226286
"subtype" : "45mm"
227287
},
288+
{
289+
"idiom" : "watch",
290+
"role" : "appLauncher",
291+
"scale" : "2x",
292+
"size" : "54x54",
293+
"subtype" : "49mm"
294+
},
228295
{
229296
"filename" : "172.png",
230297
"idiom" : "watch",
@@ -257,70 +324,17 @@
257324
"subtype" : "45mm"
258325
},
259326
{
260-
"filename" : "1024.png",
261-
"idiom" : "watch-marketing",
262-
"scale" : "1x",
263-
"size" : "1024x1024"
264-
},
265-
{
266-
"filename" : "16.png",
267-
"idiom" : "mac",
268-
"scale" : "1x",
269-
"size" : "16x16"
270-
},
271-
{
272-
"filename" : "32.png",
273-
"idiom" : "mac",
274-
"scale" : "2x",
275-
"size" : "16x16"
276-
},
277-
{
278-
"filename" : "32.png",
279-
"idiom" : "mac",
280-
"scale" : "1x",
281-
"size" : "32x32"
282-
},
283-
{
284-
"filename" : "64.png",
285-
"idiom" : "mac",
286-
"scale" : "2x",
287-
"size" : "32x32"
288-
},
289-
{
290-
"filename" : "128.png",
291-
"idiom" : "mac",
292-
"scale" : "1x",
293-
"size" : "128x128"
294-
},
295-
{
296-
"filename" : "256.png",
297-
"idiom" : "mac",
298-
"scale" : "2x",
299-
"size" : "128x128"
300-
},
301-
{
302-
"filename" : "256.png",
303-
"idiom" : "mac",
304-
"scale" : "1x",
305-
"size" : "256x256"
306-
},
307-
{
308-
"filename" : "512.png",
309-
"idiom" : "mac",
327+
"idiom" : "watch",
328+
"role" : "quickLook",
310329
"scale" : "2x",
311-
"size" : "256x256"
312-
},
313-
{
314-
"filename" : "512.png",
315-
"idiom" : "mac",
316-
"scale" : "1x",
317-
"size" : "512x512"
330+
"size" : "129x129",
331+
"subtype" : "49mm"
318332
},
319333
{
320334
"filename" : "1024.png",
321-
"idiom" : "mac",
322-
"scale" : "2x",
323-
"size" : "512x512"
335+
"idiom" : "watch-marketing",
336+
"scale" : "1x",
337+
"size" : "1024x1024"
324338
}
325339
],
326340
"info" : {
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# TeadsWebViewHelper
2+
3+
> **⚠️ Important ⚠️**
4+
>
5+
>This helper has been provided to give you a hand in your integration webview.
6+
> It's not designed to work on every integration, it may need to be customized to suit your needs
7+
8+
This helper is designed to fill HTML slot embedded in **your** `WKWebView`
9+
10+
The Teads Webview Helper adds a JavaScript logic (called bootstrap) into the Webview:
11+
12+
## Initial configuration
13+
HTML element is set into your web content loaded into your webview
14+
![Configuration](./README_WebView_configuration.png)
15+
16+
## When an ad is received
17+
1. The bootstrap **expands** the `teads-slot` HTML div to the ad height
18+
2. The `TeadsAdView` is **injected** to `WKWebView.UIScrollView.content` at the `teads-slot` HTML exact position: assuring scroll fluidity
19+
3. The bootstrap **synchronizes** the `teads-slot` vertical position with the Swift `TeadsAdView`
20+
![Hierarchy](./README_WebView_hierarchy.png)
21+
22+
## When an ad is closed
23+
- The bootstrap **collapses** `teads-slot` height to zero
24+
- The `TeadsAdView` is **removed** from `WKWebView`
25+
26+
## When an ad fails to load
27+
- `teads-slot` size remains zero
28+
29+
## When the HTML element position is updated
30+
- The `TeadsAdView` position is **updated** accordingly
166 KB
Loading
149 KB
Loading

TeadsSampleApp/WebViewHelper/TeadsWebViewHelper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88

99
/// ⚠️ This helper has been provided to give you a hand in your integration webview.
10-
/// It's not designed to work on every integration, it may need to be customised to suit your needs
10+
/// It's not designed to work on every integration, it may need to be customized to suit your needs
1111

1212
import TeadsSDK
1313
import UIKit

0 commit comments

Comments
 (0)