Skip to content

Commit ce1942c

Browse files
author
Nikolaï Roycourt
committed
v4.0.9
1 parent faa6ce5 commit ce1942c

File tree

126 files changed

+36624
-1937
lines changed

Some content is hidden

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

126 files changed

+36624
-1937
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+
v4.0.9
4+
- GDPR support
5+
- Improvements and bug fixes
6+
- Dedicated build to support Xcode 10 & Swift 4.2
7+
38
v4.0.7
49
- Improvement for visibility
510
- Opt-out cookie

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Teads SDK is currently distributed through CocoaPods. It include everything you
1313

1414
```
1515
target 'YourProject' do
16-
pod 'TeadsSDK', '4.0.7'
16+
pod 'TeadsSDK', '4.0.9'
1717
end
1818
```
1919

TeadsDemoApp.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@
411411
);
412412
runOnlyForDeploymentPostprocessing = 0;
413413
shellPath = /bin/sh;
414-
shellScript = "echo \"Target architectures: $ARCHS\"\n\nAPP_PATH=\"${TARGET_BUILD_DIR}/${WRAPPER_NAME}\"\n\necho \"$APP_PATH\"\n\nfind \"$APP_PATH\" -name '*.framework' -type d | while read -r FRAMEWORK\ndo\nFRAMEWORK_EXECUTABLE_NAME=$(defaults read \"$FRAMEWORK/Info.plist\" CFBundleExecutable)\nFRAMEWORK_EXECUTABLE_PATH=\"$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME\"\necho \"Executable is $FRAMEWORK_EXECUTABLE_PATH\"\necho $(lipo -info \"$FRAMEWORK_EXECUTABLE_PATH\")\n\nFRAMEWORK_TMP_PATH=\"$FRAMEWORK_EXECUTABLE_PATH-tmp\"\n\n# remove simulator's archs if location is not simulator's directory\ncase \"${TARGET_BUILD_DIR}\" in\n*\"iphonesimulator\")\necho \"No need to remove archs\"\n;;\n*)\nif $(lipo \"$FRAMEWORK_EXECUTABLE_PATH\" -verify_arch \"i386\") ; then\nlipo -output \"$FRAMEWORK_TMP_PATH\" -remove \"i386\" \"$FRAMEWORK_EXECUTABLE_PATH\"\necho \"i386 architecture removed\"\nrm \"$FRAMEWORK_EXECUTABLE_PATH\"\nmv \"$FRAMEWORK_TMP_PATH\" \"$FRAMEWORK_EXECUTABLE_PATH\"\nfi\nif $(lipo \"$FRAMEWORK_EXECUTABLE_PATH\" -verify_arch \"x86_64\") ; then\nlipo -output \"$FRAMEWORK_TMP_PATH\" -remove \"x86_64\" \"$FRAMEWORK_EXECUTABLE_PATH\"\necho \"x86_64 architecture removed\"\nrm \"$FRAMEWORK_EXECUTABLE_PATH\"\nmv \"$FRAMEWORK_TMP_PATH\" \"$FRAMEWORK_EXECUTABLE_PATH\"\nfi\n;;\nesac\n\necho \"Completed for executable $FRAMEWORK_EXECUTABLE_PATH\"\necho $(lipo -info \"$FRAMEWORK_EXECUTABLE_PATH\")\n\ndone";
414+
shellScript = "echo \"Target architectures: $ARCHS\"\n\nAPP_PATH=\"${TARGET_BUILD_DIR}/${WRAPPER_NAME}\"\n\necho \"$APP_PATH\"\n\nfind \"$APP_PATH\" -name '*.framework' -type d | while read -r FRAMEWORK\ndo\nFRAMEWORK_EXECUTABLE_NAME=$(defaults read \"$FRAMEWORK/Info.plist\" CFBundleExecutable)\nFRAMEWORK_EXECUTABLE_PATH=\"$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME\"\necho \"Executable is $FRAMEWORK_EXECUTABLE_PATH\"\necho $(lipo -info \"$FRAMEWORK_EXECUTABLE_PATH\")\n\nFRAMEWORK_TMP_PATH=\"$FRAMEWORK_EXECUTABLE_PATH-tmp\"\n\n# remove simulator's archs if location is not simulator's directory\ncase \"${TARGET_BUILD_DIR}\" in\n*\"iphonesimulator\")\necho \"No need to remove archs\"\n;;\n*)\nif $(lipo \"$FRAMEWORK_EXECUTABLE_PATH\" -verify_arch \"i386\") ; then\nlipo -output \"$FRAMEWORK_TMP_PATH\" -remove \"i386\" \"$FRAMEWORK_EXECUTABLE_PATH\"\necho \"i386 architecture removed\"\nrm \"$FRAMEWORK_EXECUTABLE_PATH\"\nmv \"$FRAMEWORK_TMP_PATH\" \"$FRAMEWORK_EXECUTABLE_PATH\"\nfi\nif $(lipo \"$FRAMEWORK_EXECUTABLE_PATH\" -verify_arch \"x86_64\") ; then\nlipo -output \"$FRAMEWORK_TMP_PATH\" -remove \"x86_64\" \"$FRAMEWORK_EXECUTABLE_PATH\"\necho \"x86_64 architecture removed\"\nrm \"$FRAMEWORK_EXECUTABLE_PATH\"\nmv \"$FRAMEWORK_TMP_PATH\" \"$FRAMEWORK_EXECUTABLE_PATH\"\nfi\n;;\nesac\n\necho \"Completed for executable $FRAMEWORK_EXECUTABLE_PATH\"\necho $(lipo -info \"$FRAMEWORK_EXECUTABLE_PATH\")\n\ndone\n";
415415
};
416416
/* End PBXShellScriptBuildPhase section */
417417

TeadsSDK.framework/226A93AE-9FA1-3159-ADE5-D7404027E573.bcsymbolmap renamed to TeadsSDK.framework/4DCF2DEB-9D44-336B-9124-82797CABAE05.bcsymbolmap

Lines changed: 1670 additions & 649 deletions
Large diffs are not rendered by default.

TeadsSDK.framework/CBAF6A84-25D3-306B-BE2C-2615297CFF16.bcsymbolmap renamed to TeadsSDK.framework/BEDF0CAC-A281-3BE4-ADDB-08383FD7FC62.bcsymbolmap

Lines changed: 1670 additions & 649 deletions
Large diffs are not rendered by default.

TeadsSDK.framework/46C7B758-4EF8-3E74-BA4C-6DBDEF607C62.bcsymbolmap renamed to TeadsSDK.framework/F04F243A-3897-3BF7-8B25-0D36DBE38E51.bcsymbolmap

Lines changed: 1653 additions & 633 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+
* @discussion 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+
* @abstract 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+
* @abstract Notifies the ad session that an impression event has occurred.
27+
*
28+
* @discussion 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+
* @discussion 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+
* @abstract The AdSession configuration is used for check owners.
25+
*/
26+
@property(nonatomic, readonly, nonnull) OMIDTeadstvAdSessionConfiguration *configuration;
27+
/*!
28+
* @abstract The native view which is used for viewability tracking.
29+
*/
30+
@property(nonatomic, weak, nullable) UIView *mainAdView;
31+
32+
/*!
33+
* @abstract 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+
* @abstract Notifies all verification providers that the ad session has started and ad view tracking will begin.
56+
*
57+
* @discussion This method will have no affect if called after the ad session has finished.
58+
*/
59+
- (void)start;
60+
61+
/*!
62+
* @abstract Notifies all verification providers that the ad session has finished and all ad view tracking will stop.
63+
*
64+
* @discussion 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+
* @abstract Adds friendly obstruction which should then be excluded from all ad session viewability calculations.
75+
*
76+
* @discussion 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+
* @abstract Removes registered friendly obstruction.
84+
*
85+
* @discussion 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+
* @abstract Utility method to remove all registered friendly obstructions.
93+
*
94+
* @discussion This method will have no affect if called after the ad session has finished.
95+
*/
96+
- (void)removeAllFriendlyObstructions;
97+
98+
/*!
99+
* @abstract Notifies the ad session that an error has occurred.
100+
*
101+
* @discussion 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: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
typedef NS_ENUM(NSUInteger, OMIDOwner) {
11+
OMIDJavaScriptOwner = 1, // will translate into "JAVASCRIPT" when published to the OMID JS service.
12+
OMIDNativeOwner = 2, // will translate into "NATIVE" when published to the OMID JS service.
13+
OMIDNoneOwner = 3 // will translate into "NONE" when published to the OMID JS service.
14+
};
15+
16+
@interface OMIDTeadstvAdSessionConfiguration : NSObject
17+
18+
@property OMIDOwner impressionOwner;
19+
@property OMIDOwner videoEventsOwner;
20+
@property BOOL isolateVerificationScripts;
21+
22+
/// Returns nil and sets error if OMID isn't active or arguments are invalid.
23+
/// @param impressionOwner providing details of who is responsible for triggering the impression event.
24+
/// @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.
25+
/// @param isolateVerificationScripts determines whether verification scripts will be placed in a sandboxed environment. This will not have any effect for native sessions.
26+
- (nullable instancetype)initWithImpressionOwner:(OMIDOwner)impressionOwner
27+
videoEventsOwner:(OMIDOwner)videoEventsOwner
28+
isolateVerificationScripts:(BOOL)isolateVerificationScripts
29+
error:(NSError *_Nullable *_Nullable)error;
30+
31+
#pragma mark - Deprecated Methods
32+
33+
- (nullable instancetype)initWithImpressionOwner:(OMIDOwner)impressionOwner
34+
videoEventsOwner:(OMIDOwner)videoEventsOwner
35+
error:(NSError *_Nullable *_Nullable)error __deprecated_msg("Use -initWithImpressionOwner:videoEventsOwner:isolateVerificationScripts:error: instead.");
36+
37+
@end
38+
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+
* @discussion 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+
* @abstract Initializes a new ad session context providing reference to partner and web view where OMID JS has been injected.
18+
*
19+
* @discussion 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+
* @abstract Initializes a new ad session context providing reference to partner and a list of script resources which should be managed by OMID.
35+
*
36+
* @discussion 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

0 commit comments

Comments
 (0)