Skip to content

Commit 862134b

Browse files
author
J. Doe (https://devcenter.bitrise.io/builds/setting-your-git-credentials-on-build-machines/)
committed
Release 4.8.0
1 parent bb6971a commit 862134b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+7555
-6145
lines changed

CHANGELOG.md

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

3+
### v4.8.0
4+
_2020-11-17_
5+
- Latest OM SDK version
6+
- SmartAd adapter support
7+
- ValidationTool: validate resize implementation (direct and mediation)
8+
- Remove UIWebView iOS
9+
310
### v4.7.8
411
_2020-09-21_
512
- Ensuring ratio update is made on main thread \n - Fixing player to have a better creative rendering \n - Improving memory footprint and performance

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Teads SDK is currently distributed through CocoaPods. It include everything you
1515

1616
```
1717
target 'YourProject' do
18-
pod 'TeadsSDK', '4.7.8'
18+
pod 'TeadsSDK', '4.8.0'
1919
end
2020
```
2121

@@ -30,7 +30,7 @@ $ pod install --repo-update
3030
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate TeadsSDK into your Xcode project using Carthage, specify it in your `Cartfile`:
3131

3232
```ogdl
33-
github "teads/TeadsSDK-iOS" "4.7.8"
33+
github "teads/TeadsSDK-iOS" "4.8.0"
3434
```
3535

3636
## Integration Documentation

TeadsSDK.framework/Assets.car

1.91 KB
Binary file not shown.

TeadsSDK.framework/25B50ADB-5BD4-3566-A355-7A72A1516818.bcsymbolmap renamed to TeadsSDK.framework/E936605F-4721-33CC-9403-EA0F4D4C6133.bcsymbolmap

Lines changed: 3220 additions & 2877 deletions
Large diffs are not rendered by default.

TeadsSDK.framework/DCA72F74-4AB1-3481-BDE1-2747C30EFCB8.bcsymbolmap renamed to TeadsSDK.framework/F447533D-4483-3F85-B305-2E8F6DFA1B07.bcsymbolmap

Lines changed: 3453 additions & 2749 deletions
Large diffs are not rendered by default.

TeadsSDK.framework/Headers/OMIDAdEvents.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#import <Foundation/Foundation.h>
99
#import "OMIDAdSession.h"
10+
#import "OMIDVASTProperties.h"
1011

1112
/**
1213
* Ad event API enabling the integration partner to signal to all verification providers when key events have occurred.
@@ -31,4 +32,19 @@
3132
*/
3233
- (BOOL)impressionOccurredWithError:(NSError *_Nullable *_Nullable)error;
3334

35+
/**
36+
* Notifies the ad session that display loaded event has occurred.
37+
*
38+
* When triggered all registered verification providers will be notified of this event.
39+
*/
40+
- (BOOL)loadedWithError:(NSError *_Nullable *_Nullable)error;
41+
42+
/**
43+
* Notifies the ad session that video/audio loaded event has occurred.
44+
*
45+
* When triggered all registered verification providers will be notified of this event.
46+
* @param vastProperties contains static information about the video/audio placement.
47+
*/
48+
- (BOOL)loadedWithVastProperties:(OMIDTeadstvVASTProperties *_Nonnull)vastProperties
49+
error:(NSError *_Nullable *_Nullable)error;
3450
@end

TeadsSDK.framework/Headers/OMIDAdSession.h

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,22 @@
88
#import <UIKit/UIKit.h>
99
#import "OMIDAdSessionContext.h"
1010
#import "OMIDAdSessionConfiguration.h"
11+
#import "OMIDFriendlyObstructionType.h"
1112

13+
NS_ASSUME_NONNULL_BEGIN
14+
15+
/**
16+
* List of supported error types.
17+
*/
1218
typedef NS_ENUM(NSUInteger, OMIDErrorType) {
13-
OMIDErrorGeneric = 1, // will translate into "GENERIC" when published to the OMID JS service.
14-
OMIDErrorVideo = 2 // will translate into "VIDEO" when published to the OMID JS service.
19+
/**
20+
* The integration is publishing a "generic" error to verification scripts.
21+
*/
22+
OMIDErrorGeneric = 1,
23+
/**
24+
* The integration is publishing a "video" error to verification scripts.
25+
*/
26+
OMIDErrorMedia = 2
1527
};
1628

1729
/**
@@ -23,7 +35,7 @@ typedef NS_ENUM(NSUInteger, OMIDErrorType) {
2335
/**
2436
* The AdSession configuration is used for check owners.
2537
*/
26-
@property(nonatomic, readonly, nonnull) OMIDTeadstvAdSessionConfiguration *configuration;
38+
@property(nonatomic, readonly) OMIDTeadstvAdSessionConfiguration *configuration;
2739
/**
2840
* The native view which is used for viewability tracking.
2941
*/
@@ -38,16 +50,15 @@ typedef NS_ENUM(NSUInteger, OMIDErrorType) {
3850
*
3951
* To prevent this, the implementation must wait until the webview finishes loading OM SDK
4052
* JavaScript before creating the OMIDAdSession. The easiest way is to create the OMIDAdSession
41-
* in a webview delegate callback (-[WKNavigationDelegate webView:didFinishNavigation:] or
42-
* -[UIWebViewDelegate webViewDidFinishLoad:]). Alternatively, if an implementation can receive an
43-
* HTML5 DOMContentLoaded event from the webview, it can create the OMIDAdSession in a message
44-
* handler for that event.
53+
* in a webview delegate callback (-[WKNavigationDelegate webView:didFinishNavigation:]. Alternatively,
54+
* if an implementation can receive an HTML5 DOMContentLoaded event from the webview, it can create
55+
* the OMIDAdSession in a message handler for that event.
4556
*
4657
* @param context The context that provides the required information for initialising the ad session.
4758
* @return A new OMIDAdSession instance, or nil if the supplied context is nil.
4859
*/
49-
- (nullable instancetype)initWithConfiguration:(nonnull OMIDTeadstvAdSessionConfiguration *)configuration
50-
adSessionContext:(nonnull OMIDTeadstvAdSessionContext *)context
60+
- (nullable instancetype)initWithConfiguration:(OMIDTeadstvAdSessionConfiguration *)configuration
61+
adSessionContext:(OMIDTeadstvAdSessionContext *)context
5162
error:(NSError *_Nullable *_Nullable)error;
5263

5364

@@ -72,12 +83,24 @@ typedef NS_ENUM(NSUInteger, OMIDErrorType) {
7283

7384
/**
7485
* Adds friendly obstruction which should then be excluded from all ad session viewability calculations.
86+
* It also provides a purpose and detailed reason string to pass forward to the measurement vendors.
7587
*
7688
* This method will have no affect if called after the ad session has finished.
7789
*
7890
* @param friendlyObstruction The view to be excluded from all ad session viewability calculations.
91+
* @param purpose The purpose of why this obstruction was necessary.
92+
* @param detailedReason An explanation for why this obstruction is part of the ad experience if not already
93+
* obvious from the purpose. Can be nil. If not nil, must be 50 characters or less and only contain characers
94+
* `A-z`, `0-9`, or spaces.
95+
* @return Whether this friendly obstruction was successfully added. If the session has finished or the
96+
* friendlyObstruction has already been added for this session, this method will return NO with no associated
97+
* error object. However, if one or more arguments are against requirements, it will return NO with an error
98+
* object assigned.
7999
*/
80-
- (void)addFriendlyObstruction:(nonnull UIView *)friendlyObstruction;
100+
- (BOOL)addFriendlyObstruction:(UIView *)friendlyObstruction
101+
purpose:(OMIDFriendlyObstructionType)purpose
102+
detailedReason:(nullable NSString *)detailedReason
103+
error:(NSError *_Nullable *_Nullable)error;
81104

82105
/**
83106
* Removes registered friendly obstruction.
@@ -86,7 +109,7 @@ typedef NS_ENUM(NSUInteger, OMIDErrorType) {
86109
*
87110
* @param friendlyObstruction The view to be removed from the list of registered friendly obstructions.
88111
*/
89-
- (void)removeFriendlyObstruction:(nonnull UIView *)friendlyObstruction;
112+
- (void)removeFriendlyObstruction:(UIView *)friendlyObstruction;
90113

91114
/**
92115
* Utility method to remove all registered friendly obstructions.
@@ -103,8 +126,9 @@ typedef NS_ENUM(NSUInteger, OMIDErrorType) {
103126
* @param errorType The type of error.
104127
* @param message The message containing details of the error.
105128
*/
106-
- (void)logErrorWithType:(OMIDErrorType)errorType message:(nonnull NSString *)message
129+
- (void)logErrorWithType:(OMIDErrorType)errorType message:(NSString *)message
107130
NS_SWIFT_NAME(logError(withType:message:));
108131

109132
@end
110133

134+
NS_ASSUME_NONNULL_END

TeadsSDK.framework/Headers/OMIDAdSessionConfiguration.h

Lines changed: 100 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,117 @@ typedef NS_ENUM(NSUInteger, OMIDOwner) {
1919
OMIDNoneOwner = 3
2020
};
2121

22+
23+
/**
24+
* List of supported creative types.
25+
*/
26+
typedef NS_ENUM(NSUInteger, OMIDCreativeType) {
27+
/**
28+
* Creative type will be set by JavaScript session script.
29+
* Integrations must also pass `OMIDJavaScriptOwner` for `impressionOwner`.
30+
*/
31+
OMIDCreativeTypeDefinedByJavaScript = 1,
32+
// Remaining values set creative type in native layer.
33+
/**
34+
* Rendered in webview, verification code can be inside creative or in metadata.
35+
*/
36+
OMIDCreativeTypeHtmlDisplay = 2,
37+
/**
38+
* Rendered by native, verification code provided in metadata only.
39+
*/
40+
OMIDCreativeTypeNativeDisplay = 3,
41+
/**
42+
* Rendered instream or as standalone video, verification code provided in metadata.
43+
*/
44+
OMIDCreativeTypeVideo = 4,
45+
/**
46+
* Similar to video but only contains audio media.
47+
*/
48+
OMIDCreativeTypeAudio = 5
49+
};
50+
51+
/**
52+
* The criterion for an ad session's OMID impression event.
53+
* Declaring an impression type makes it easier to understand discrepancies between measurers
54+
* of the ad session, since many metrics depend on impressions.
55+
*/
56+
typedef NS_ENUM(NSUInteger, OMIDImpressionType) {
57+
/**
58+
* ImpressionType will be set by JavaScript session script.
59+
* Integrations must also pass `OMIDJavaScriptOwner` for `impressionOwner`.
60+
*/
61+
OMIDImpressionTypeDefinedByJavaScript = 1,
62+
// Remaining values set ImpressionType in native layer.
63+
/**
64+
* The integration is not declaring the criteria for the OMID impression.
65+
*/
66+
OMIDImpressionTypeUnspecified = 2,
67+
/**
68+
* The integration is using count-on-download criteria for the OMID impression.
69+
*/
70+
OMIDImpressionTypeLoaded = 3,
71+
/**
72+
* The integration is using begin-to-render criteria for the OMID impression.
73+
*/
74+
OMIDImpressionTypeBeginToRender = 4,
75+
/**
76+
* The integration is using one-pixel criteria (when the creative has at least 1 visible pixel on
77+
* screen) for the OMID impression.
78+
*/
79+
OMIDImpressionTypeOnePixel = 5,
80+
/**
81+
* The integration is using viewable criteria (1 second for display, 2 seconds while playing for
82+
* video, and at least 50% of the creative is visible) for the OMID impression.
83+
*/
84+
OMIDImpressionTypeViewable = 6,
85+
/**
86+
* The integration is using audible criteria (2 continuous second of media playback with non-zero
87+
* volume) for the OMID impression.
88+
*/
89+
OMIDImpressionTypeAudible = 7,
90+
/**
91+
* The integration's criteria uses none of the above criteria for the OMID impression.
92+
*/
93+
OMIDImpressionTypeOther = 8
94+
};
95+
2296
/**
2397
* The ad session configuration supplies the owner for both the impression and video events.
24-
* The OMID JS service will use this information to help identify where the source of these
98+
* The OM SDK JS service will use this information to help identify where the source of these
2599
* events is expected to be received.
26100
*/
27101
@interface OMIDTeadstvAdSessionConfiguration : NSObject
28102

103+
@property OMIDCreativeType creativeType;
104+
@property OMIDImpressionType impressionType;
29105
@property OMIDOwner impressionOwner;
30-
@property OMIDOwner videoEventsOwner;
106+
@property OMIDOwner mediaEventsOwner;
31107
@property BOOL isolateVerificationScripts;
32108

33109
/**
34-
* Returns nil and sets error if OMID isn't active or arguments are invalid.
35-
* @param impressionOwner providing details of who is responsible for triggering the impression event.
36-
* @param videoEventsOwner providing details of who is responsible for triggering video events. This is only required for video ad sessions and should be set to videoEventsOwner:OMIDNoneOwner for display ad sessions.
37-
* @param isolateVerificationScripts determines whether verification scripts will be placed in a sandboxed environment. This will not have any effect for native sessions.
110+
* Create new ad session configuration supplying the owner for both the impression and media
111+
* events along with the type of creative being rendered/measured.
112+
* The OM SDK JS service will use this information to help identify where the source of these
113+
* events is expected to be received.
114+
* @param creativeType the type of creative to be rendered in this session.
115+
* @param impressionType the type of impression to be triggered in this session.
116+
* @param impressionOwner whether the native or JavaScript layer should be responsible for supplying
117+
* the impression event.
118+
* @param mediaEventsOwner whether the native or JavaScript layer should be responsible for
119+
* supplying media events. This needs to be set only for non-display ad sessions and can be set to
120+
* `OMIDNoneOwner` for display. When the creativeType is `OMIDCreativeTypeDefinedByJavaScript` then
121+
* this should be set to `OMIDJavaScriptOwner`
122+
* @param isolateVerificationScripts determines whether verification scripts will be placed in a
123+
* sandboxed environment. This will not have any effect for native sessions.
124+
* @return A new session configuration instance. Returns nil and sets error if OM SDK isn't active
125+
* or arguments are invalid.
38126
*/
39-
- (nullable instancetype)initWithImpressionOwner:(OMIDOwner)impressionOwner
40-
videoEventsOwner:(OMIDOwner)videoEventsOwner
41-
isolateVerificationScripts:(BOOL)isolateVerificationScripts
42-
error:(NSError *_Nullable *_Nullable)error;
43-
44-
#pragma mark - Deprecated Methods
45-
46-
- (nullable instancetype)initWithImpressionOwner:(OMIDOwner)impressionOwner
47-
videoEventsOwner:(OMIDOwner)videoEventsOwner
48-
error:(NSError *_Nullable *_Nullable)error __deprecated_msg("Use -initWithImpressionOwner:videoEventsOwner:isolateVerificationScripts:error: instead.");
127+
- (nullable instancetype)initWithCreativeType:(OMIDCreativeType)creativeType
128+
impressionType:(OMIDImpressionType)impressionType
129+
impressionOwner:(OMIDOwner)impressionOwner
130+
mediaEventsOwner:(OMIDOwner)mediaEventsOwner
131+
isolateVerificationScripts:(BOOL)isolateVerificationScripts
132+
error:(NSError *_Nullable *_Nullable)error;
49133

50134
@end
51135

TeadsSDK.framework/Headers/OMIDAdSessionContext.h

Lines changed: 54 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,87 @@
33
//
44

55
#import <UIKit/UIKit.h>
6+
#import <WebKit/WebKit.h>
67
#import "OMIDPartner.h"
78
#import "OMIDVerificationScriptResource.h"
89

10+
NS_ASSUME_NONNULL_BEGIN
11+
912
/**
10-
* This class will provide the ad session both details of the partner and whether this is considered HTML or native.
13+
* Provides the ad session with details of the partner and whether to an HTML,
14+
* JavaScript, or native session.
1115
*/
1216
@interface OMIDTeadstvAdSessionContext : NSObject
1317

1418
- (null_unspecified instancetype)init NS_UNAVAILABLE;
1519

1620
/**
17-
* Initializes a new ad session context providing reference to partner and web view where OMID JS has been injected.
21+
* Initializes a new ad session context providing reference to partner and web view where
22+
* the OM SDK JavaScript service has been injected.
1823
*
19-
* Calling this method will set the ad session type to html.
24+
* Calling this method will set the ad session type to `html`.
2025
* <p>
21-
* NOTE: any attempt to create a new ad session will fail if OMID has not been activated (see {@link OMIDSDK} class for more information).
26+
* NOTE: any attempt to create a new ad session will fail if OM SDK has not been
27+
* activated (see {@link OMIDSDK} class for more information).
2228
*
2329
* @param partner Details of the integration partner responsible for the ad session.
24-
* @param webView The webView responsible for serving the ad content. Must be a UIWebView or WKWebView instance. The receiver holds a weak reference only.
25-
* @return A new HTML context instance. Returns nil if OMID has not been activated or if any of the parameters are nil.
30+
* @param webView The WKWebView responsible for serving the ad content. The receiver holds a weak reference only.
31+
* @param contentUrl contains the universal link to the ad's screen.
32+
* @return A new HTML context instance. Returns nil if OM SDK has not been activated or if
33+
* any of the parameters are nil.
2634
* @see OMIDSDK
2735
*/
28-
- (nullable instancetype)initWithPartner:(nonnull OMIDTeadstvPartner *)partner
29-
webView:(nonnull UIView *)webView
36+
- (nullable instancetype)initWithPartner:(OMIDTeadstvPartner *)partner
37+
webView:(WKWebView *)webView
38+
contentUrl:(nullable NSString *)contentUrl
3039
customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier
3140
error:(NSError *_Nullable *_Nullable)error;
32-
3341
/**
34-
* Initializes a new ad session context providing reference to partner and a list of script resources which should be managed by OMID.
42+
* Initializes a new ad session context providing reference to partner and a list of
43+
* script resources which should be managed by OMID.
3544
*
36-
* Calling this method will set the ad session type to native.
45+
* Calling this method will set the ad session type to `native`.
3746
* <p>
38-
* NOTE: any attempt to create a new ad session will fail if OMID has not been activated (see {@link OMIDSDK} class for more information).
47+
* NOTE: any attempt to create a new ad session will fail if OMID has not been activated
48+
* (see {@link OMIDSDK} class for more information).
3949
*
4050
* @param partner Details of the integration partner responsible for the ad session.
41-
* @param resources The array of all verification providers who expect to receive OMID event data. Must contain at least one verification script. The receiver creates a deep copy of the array.
51+
* @param resources The array of all verification providers who expect to receive OMID
52+
* event data. Must contain at least one verification script. The receiver creates a
53+
* deep copy of the array.
54+
* @param contentUrl contains the universal link to the ad's screen.
4255
* @return A new native context instance. Returns nil if OMID has not been activated or if any of the parameters are invalid.
4356
* @see OMIDSDK
4457
*/
45-
- (nullable instancetype)initWithPartner:(nonnull OMIDTeadstvPartner *)partner
46-
script:(nonnull NSString *)script
47-
resources:(nonnull NSArray<OMIDTeadstvVerificationScriptResource *> *)resources
58+
- (nullable instancetype)initWithPartner:(OMIDTeadstvPartner *)partner
59+
script:(NSString *)script
60+
resources:(NSArray<OMIDTeadstvVerificationScriptResource *> *)resources
61+
contentUrl:(nullable NSString *)contentUrl
62+
customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier
63+
error:(NSError *_Nullable *_Nullable)error;
64+
65+
/**
66+
* Initializes a new ad session context providing reference to partner and web view where
67+
* OM SDK JavaScript service has been injected.
68+
*
69+
* Calling this method will set the ad session type to `javascript`.
70+
* <p>
71+
* NOTE: any attempt to create a new ad session will fail if OMID has not been activated
72+
* (see {@link OMIDSDK} class for more information).
73+
*
74+
* @param partner Details of the integration partner responsible for the ad session.
75+
* @param webView The WKWebView responsible for serving the ad content. The receiver holds a weak reference only.
76+
* @param contentUrl contains the universal link to the ad's screen.
77+
* @return A new JavaScript context instance. Returns nil if OM SDK has not been
78+
* activated or if any of the parameters are invalid.
79+
* @see OMIDSDK
80+
*/
81+
- (nullable instancetype)initWithPartner:(OMIDTeadstvPartner *)partner
82+
javaScriptWebView:(WKWebView *)webView
83+
contentUrl:(nullable NSString *)contentUrl
4884
customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier
4985
error:(NSError *_Nullable *_Nullable)error;
5086

5187
@end
88+
89+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)