Skip to content

Commit f166313

Browse files
author
J. Doe (https://devcenter.bitrise.io/builds/setting-your-git-credentials-on-build-machines/)
committed
Release 4.7.2
1 parent 2c73722 commit f166313

Some content is hidden

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

51 files changed

+29861
-1
lines changed

TeadsSDK.framework/4469B1A0-004F-3D57-B078-AE220B046324.bcsymbolmap

Lines changed: 11355 additions & 0 deletions
Large diffs are not rendered by default.

TeadsSDK.framework/81C8AFAC-304B-333D-B96E-09573C5AA0BB.bcsymbolmap

Lines changed: 11990 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//
2+
// OMIDAdEvents.h
3+
// AppVerificationLibrary
4+
//
5+
// Created by Daria Sukhonosova on 22/06/2017.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
#import "OMIDAdSession.h"
10+
11+
/**
12+
* Ad event API enabling the integration partner to signal to all verification providers when key events have occurred.
13+
* Only one ad events implementation can be associated with the ad session and any attempt to create multiple instances will result in an error.
14+
*/
15+
@interface OMIDTeadstvAdEvents : NSObject
16+
17+
/**
18+
* Initializes ad events instance associated with the supplied ad session.
19+
*
20+
* @param session The ad session associated with the ad events.
21+
* @return A new ad events instance associated with the supplied ad session. Returns nil if the supplied ad session is nil or if an ad events instance has already been registered with the ad session.
22+
*/
23+
- (nullable instancetype)initWithAdSession:(nonnull OMIDTeadstvAdSession *)session error:(NSError * _Nullable * _Nullable)error;
24+
25+
/**
26+
* Notifies the ad session that an impression event has occurred.
27+
*
28+
* When triggered all registered verification providers will be notified of this event.
29+
*
30+
* NOTE: the ad session will be automatically started if this method has been called first.
31+
*/
32+
- (BOOL)impressionOccurredWithError:(NSError *_Nullable *_Nullable)error;
33+
34+
@end
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
//
2+
// OMIDAdSession.h
3+
// AppVerificationLibrary
4+
//
5+
// Created by Daria on 06/06/2017.
6+
//
7+
8+
#import <UIKit/UIKit.h>
9+
#import "OMIDAdSessionContext.h"
10+
#import "OMIDAdSessionConfiguration.h"
11+
12+
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.
15+
};
16+
17+
/**
18+
* Ad session API enabling the integration partner to notify OMID of key state relating to viewability calculations.
19+
* In addition to viewability this API will also notify all verification providers of key ad session lifecycle events.
20+
*/
21+
@interface OMIDTeadstvAdSession : NSObject
22+
23+
/**
24+
* The AdSession configuration is used for check owners.
25+
*/
26+
@property(nonatomic, readonly, nonnull) OMIDTeadstvAdSessionConfiguration *configuration;
27+
/**
28+
* The native view which is used for viewability tracking.
29+
*/
30+
@property(nonatomic, weak, nullable) UIView *mainAdView;
31+
32+
/**
33+
* Initializes new ad session supplying the context.
34+
*
35+
* Note that creating an OMIDAdSession sends a message to the OM SDK JS Service running in the
36+
* webview. If the OM SDK JS Service has not loaded before the ad session is created, the
37+
* message is lost, and the verification scripts will not receive any events.
38+
*
39+
* To prevent this, the implementation must wait until the webview finishes loading OM SDK
40+
* 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.
45+
*
46+
* @param context The context that provides the required information for initialising the ad session.
47+
* @return A new OMIDAdSession instance, or nil if the supplied context is nil.
48+
*/
49+
- (nullable instancetype)initWithConfiguration:(nonnull OMIDTeadstvAdSessionConfiguration *)configuration
50+
adSessionContext:(nonnull OMIDTeadstvAdSessionContext *)context
51+
error:(NSError *_Nullable *_Nullable)error;
52+
53+
54+
/**
55+
* Notifies all verification providers that the ad session has started and ad view tracking will begin.
56+
*
57+
* This method will have no affect if called after the ad session has finished.
58+
*/
59+
- (void)start;
60+
61+
/**
62+
* Notifies all verification providers that the ad session has finished and all ad view tracking will stop.
63+
*
64+
* This method will have no affect if called after the ad session has finished.
65+
*
66+
* Note that ending an OMID ad session sends a message to the verification scripts running inside
67+
* the webview supplied by the integration. So that the verification scripts have enough time to
68+
* handle the 'sessionFinish' event, the integration must maintain a strong reference to the webview
69+
* for at least 1.0 seconds after ending the session.
70+
*/
71+
- (void)finish;
72+
73+
/**
74+
* Adds friendly obstruction which should then be excluded from all ad session viewability calculations.
75+
*
76+
* This method will have no affect if called after the ad session has finished.
77+
*
78+
* @param friendlyObstruction The view to be excluded from all ad session viewability calculations.
79+
*/
80+
- (void)addFriendlyObstruction:(nonnull UIView *)friendlyObstruction;
81+
82+
/**
83+
* Removes registered friendly obstruction.
84+
*
85+
* This method will have no affect if called after the ad session has finished.
86+
*
87+
* @param friendlyObstruction The view to be removed from the list of registered friendly obstructions.
88+
*/
89+
- (void)removeFriendlyObstruction:(nonnull UIView *)friendlyObstruction;
90+
91+
/**
92+
* Utility method to remove all registered friendly obstructions.
93+
*
94+
* This method will have no affect if called after the ad session has finished.
95+
*/
96+
- (void)removeAllFriendlyObstructions;
97+
98+
/**
99+
* Notifies the ad session that an error has occurred.
100+
*
101+
* When triggered all registered verification providers will be notified of this event.
102+
*
103+
* @param errorType The type of error.
104+
* @param message The message containing details of the error.
105+
*/
106+
- (void)logErrorWithType:(OMIDErrorType)errorType message:(nonnull NSString *)message
107+
NS_SWIFT_NAME(logError(withType:message:));
108+
109+
@end
110+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//
2+
// OMIDAdSessionConfiguration.h
3+
// AppVerificationLibrary
4+
//
5+
// Created by Saraev Vyacheslav on 15/09/2017.
6+
//
7+
8+
#import <UIKit/UIKit.h>
9+
10+
/**
11+
* Identifies which integration layer is responsible for sending certain events.
12+
*/
13+
typedef NS_ENUM(NSUInteger, OMIDOwner) {
14+
/** The integration will send the event from a JavaScript session script. */
15+
OMIDJavaScriptOwner = 1,
16+
/** The integration will send the event from the native layer. */
17+
OMIDNativeOwner = 2,
18+
/** The integration will not send the event. */
19+
OMIDNoneOwner = 3
20+
};
21+
22+
/**
23+
* 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
25+
* events is expected to be received.
26+
*/
27+
@interface OMIDTeadstvAdSessionConfiguration : NSObject
28+
29+
@property OMIDOwner impressionOwner;
30+
@property OMIDOwner videoEventsOwner;
31+
@property BOOL isolateVerificationScripts;
32+
33+
/**
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.
38+
*/
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.");
49+
50+
@end
51+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//
2+
// Created by Daria Sukhonosova on 19/04/16.
3+
//
4+
5+
#import <UIKit/UIKit.h>
6+
#import "OMIDPartner.h"
7+
#import "OMIDVerificationScriptResource.h"
8+
9+
/**
10+
* This class will provide the ad session both details of the partner and whether this is considered HTML or native.
11+
*/
12+
@interface OMIDTeadstvAdSessionContext : NSObject
13+
14+
- (null_unspecified instancetype)init NS_UNAVAILABLE;
15+
16+
/**
17+
* Initializes a new ad session context providing reference to partner and web view where OMID JS has been injected.
18+
*
19+
* Calling this method will set the ad session type to “html”.
20+
* <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).
22+
*
23+
* @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.
26+
* @see OMIDSDK
27+
*/
28+
- (nullable instancetype)initWithPartner:(nonnull OMIDTeadstvPartner *)partner
29+
webView:(nonnull UIView *)webView
30+
customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier
31+
error:(NSError *_Nullable *_Nullable)error;
32+
33+
/**
34+
* Initializes a new ad session context providing reference to partner and a list of script resources which should be managed by OMID.
35+
*
36+
* Calling this method will set the ad session type to “native”.
37+
* <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).
39+
*
40+
* @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.
42+
* @return A new native context instance. Returns nil if OMID has not been activated or if any of the parameters are invalid.
43+
* @see OMIDSDK
44+
*/
45+
- (nullable instancetype)initWithPartner:(nonnull OMIDTeadstvPartner *)partner
46+
script:(nonnull NSString *)script
47+
resources:(nonnull NSArray<OMIDTeadstvVerificationScriptResource *> *)resources
48+
customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier
49+
error:(NSError *_Nullable *_Nullable)error;
50+
51+
@end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#import "OMIDSDK.h"
2+
#import "OMIDScriptInjector.h"
3+
#import "OMIDPartner.h"
4+
#import "OMIDVerificationScriptResource.h"
5+
#import "OMIDAdSessionContext.h"
6+
#import "OMIDAdSession.h"
7+
#import "OMIDAdEvents.h"
8+
#import "OMIDVASTProperties.h"
9+
#import "OMIDVideoEvents.h"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// OMIDPartner.h
3+
// AppVerificationLibrary
4+
//
5+
// Created by Daria on 06/06/2017.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
/**
11+
* Details about the integration partner which will be supplied to the ad session.
12+
*/
13+
@interface OMIDTeadstvPartner : NSObject
14+
15+
@property(nonatomic, readonly, nonnull) NSString *name;
16+
@property(nonatomic, readonly, nonnull) NSString *versionString;
17+
18+
/**
19+
* Initializes new partner instance providing both name and versionString.
20+
*
21+
* Both name and version are mandatory.
22+
*
23+
* @param name It is used to uniquely identify the integration partner.
24+
* @param versionString It is used to uniquely identify the integration partner.
25+
* @return A new partner instance, or nil if any of the parameters are either null or blank
26+
*/
27+
- (nullable instancetype)initWithName:(nonnull NSString *)name
28+
versionString:(nonnull NSString *)versionString;
29+
30+
- (null_unspecified instancetype)init NS_UNAVAILABLE;
31+
32+
@end
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
//
2+
// OMIDSDK.h
3+
// AppVerificationLibrary
4+
//
5+
// Created by Daria on 05/06/2017.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
/// API Note: this value must be copied into the ad SDK's binary. It cannot be an extern defined in
11+
/// the OMID library.
12+
#define OMIDSDKAPIVersionString @"{\"v\":\"1.2.20\",\"a\":\"1\"}"
13+
14+
/**
15+
* This application level class will be called by all integration partners to ensure OM SDK has been activated before calling any other API methods.
16+
* Any attempt to use other API methods prior to activation will result in an error.
17+
*
18+
* Note that OM SDK may only be used on the main UI thread.
19+
* Make sure you are on the main thread when you initialize the SDK, create its
20+
* objects, and invoke its methods.
21+
*/
22+
@interface OMIDTeadstvSDK : NSObject
23+
24+
/**
25+
* The current semantic version of the integrated OMID library.
26+
*/
27+
+ (nonnull NSString *)versionString;
28+
29+
/**
30+
* Allows the integration partner to check that they are compatible with the running OMID library version.
31+
*
32+
* @param OMIDAPIVersion The version of OMID library integrated by the partner.
33+
* @return YES if the version supplied is compatible with the integrated OMID library version.
34+
*
35+
* Note: Planned to be deprecated in next major release
36+
*/
37+
38+
+ (BOOL)isCompatibleWithOMIDAPIVersion:(nonnull NSString *)OMIDAPIVersion
39+
NS_SWIFT_NAME(isCompatible(withOMIDAPIVersion:));
40+
41+
/**
42+
* Shared OMIDSDK instance.
43+
*/
44+
@property(class, readonly, nonnull) OMIDTeadstvSDK *sharedInstance
45+
NS_SWIFT_NAME(shared);
46+
47+
/**
48+
* A Boolean value indicating whether the OMID library has been activated.
49+
*
50+
* The value of this property is YES if the OMID library has already been activated. Allows the integration partner to check that they are compatible with the running OMID library version.
51+
*/
52+
@property(atomic, readonly, getter = isActive) BOOL active;
53+
54+
/**
55+
* Enables the integration partner to activate OMID prior to calling any other API methods.
56+
*
57+
* @param OMIDAPIVersion The version of OMID library integrated by the partner.
58+
* @param error If an error occurs, contains an NSError object that describes the problem.
59+
* @return YES if activation was successful when checking the supplied version number for compatibility.
60+
*
61+
*/
62+
- (BOOL)activateWithOMIDAPIVersion:(nonnull NSString *)OMIDAPIVersion
63+
error:(NSError *_Nullable *_Nullable)error;
64+
65+
@end
66+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// OMIDScriptInjector.h
3+
// AppVerificationLibrary
4+
//
5+
// Created by Daria on 21/06/2017.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
10+
/**
11+
* Utility class which enables integration partners to use a standard approach for injecting OM SDK JS into the served tag HTML content.
12+
*/
13+
@interface OMIDTeadstvScriptInjector : NSObject
14+
15+
/*
16+
Injects the downloaded OMID JS content into the served HTML.
17+
@param scriptContent containing the OMID JS service content to be injected into the hidden tracking web view.
18+
@param html of the tag content which should be modified to include the downloaded OMID JS content.
19+
@param error If an error occurs, contains an NSError object.
20+
@return modified HTML including OMID JS or nil if an error occurs.
21+
*/
22+
+ (nullable NSString *)injectScriptContent:(nonnull NSString *)scriptContent
23+
intoHTML:(nonnull NSString *)html
24+
error:(NSError *_Nullable *_Nullable)error;
25+
26+
@end

0 commit comments

Comments
 (0)