Skip to content

Commit

Permalink
Update OMSDK (#655)
Browse files Browse the repository at this point in the history
* chore: update omsdk

* chore: update vendored frameworks for PrebidMobile podspec

* chore: update omsdk.js

* chore: update PrebidMobile podspec & fix pod lib lint error

* chore: delete excluded archs from AdMob adapters and GAM Event Handlers

* chore: turn off shared box for event handlers

* chore: delete unnecessary limits for archs in podpecs

* chore: update scheme settings - mark all schemes shared except event handlers schemes to fix test running

* chore: add missing step for building AdMob Adapters to build script

* chore: update OMSDK to be embedded and signed in PrebidMobile
  • Loading branch information
OlenaPostindustria authored Jun 3, 2022
1 parent 48915bd commit 1336b49
Show file tree
Hide file tree
Showing 52 changed files with 1,372 additions and 253 deletions.
8 changes: 0 additions & 8 deletions EventHandlers/EventHandlers.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,6 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "i386 x86_64";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 arm64e armv7 armv7s";
INFOPLIST_FILE = PrebidMobileGAMEventHandlers/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
Expand Down Expand Up @@ -1265,8 +1263,6 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "i386 x86_64";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 arm64e armv7 armv7s";
INFOPLIST_FILE = PrebidMobileGAMEventHandlers/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
Expand Down Expand Up @@ -1412,8 +1408,6 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
"EXCLUDED_ARCHS[sdk=iphoneos*]" = "i386 x86_64";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 arm64e armv7 armv7s";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Prebid. All rights reserved.";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -1449,8 +1443,6 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
"EXCLUDED_ARCHS[sdk=*]" = "i386 x86_64";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 arm64e armv7 armv7s";
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2021 Prebid. All rights reserved.";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion Frameworks/OMSDK_Prebidorg.framework/Headers

This file was deleted.

1 change: 0 additions & 1 deletion Frameworks/OMSDK_Prebidorg.framework/OMSDK_Prebidorg

This file was deleted.

Binary file not shown.
1 change: 0 additions & 1 deletion Frameworks/OMSDK_Prebidorg.framework/Versions/Current

This file was deleted.

42 changes: 42 additions & 0 deletions Frameworks/OMSDK_Prebidorg.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>OMSDK_Prebidorg.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>OMSDK_Prebidorg.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// OMSDK.h
// OMSDK
//
// Created by Nathanael Hardy on 10/16/20.
//

#import <Foundation/Foundation.h>

//! Project version number for OMSDK.
FOUNDATION_EXPORT double OMSDKVersionNumber;

//! Project version string for OMSDK.
FOUNDATION_EXPORT const unsigned char OMSDKVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <OMSDK/PublicHeader.h>

#import <OMSDK/OMIDImports.h>
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//
// OMIDAdEvents.h
// AppVerificationLibrary
//
// Created by Daria Sukhonosova on 22/06/2017.
//

#import <Foundation/Foundation.h>
#import "OMIDAdSession.h"
#import "OMIDVASTProperties.h"

/**
* Ad event API enabling the integration partner to signal to all verification providers when key events have occurred.
* Only one ad events implementation can be associated with the ad session and any attempt to create multiple instances will result in an error.
*/
@interface OMIDPrebidorgAdEvents : NSObject

/**
* Initializes ad events instance associated with the supplied ad session.
*
* @param session The ad session associated with the ad events.
* @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.
*/
- (nullable instancetype)initWithAdSession:(nonnull OMIDPrebidorgAdSession *)session error:(NSError * _Nullable * _Nullable)error;

/**
* Notifies the ad session that an impression event has occurred.
*
* When triggered all registered verification providers will be notified of this event.
*
* NOTE: the ad session will be automatically started if this method has been called first.
*/
- (BOOL)impressionOccurredWithError:(NSError *_Nullable *_Nullable)error;

/**
* Notifies the ad session that display loaded event has occurred.
*
* When triggered all registered verification providers will be notified of this event.
*/
- (BOOL)loadedWithError:(NSError *_Nullable *_Nullable)error;

/**
* Notifies the ad session that video/audio loaded event has occurred.
*
* When triggered all registered verification providers will be notified of this event.
* @param vastProperties contains static information about the video/audio placement.
*/
- (BOOL)loadedWithVastProperties:(OMIDPrebidorgVASTProperties *_Nonnull)vastProperties
error:(NSError *_Nullable *_Nullable)error;
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
//
// OMIDAdSession.h
// AppVerificationLibrary
//
// Created by Daria on 06/06/2017.
//

#import <UIKit/UIKit.h>
#import "OMIDAdSessionContext.h"
#import "OMIDAdSessionConfiguration.h"
#import "OMIDFriendlyObstructionType.h"

NS_ASSUME_NONNULL_BEGIN

/**
* List of supported error types.
*/
typedef NS_ENUM(NSUInteger, OMIDErrorType) {
/**
* The integration is publishing a "generic" error to verification scripts.
*/
OMIDErrorGeneric = 1,
/**
* The integration is publishing a "video" error to verification scripts.
*/
OMIDErrorMedia = 2
};

/**
* Ad session API enabling the integration partner to notify OMID of key state relating to viewability calculations.
* In addition to viewability this API will also notify all verification providers of key ad session lifecycle events.
*/
@interface OMIDPrebidorgAdSession : NSObject

/**
* The AdSession configuration is used for check owners.
*/
@property(nonatomic, readonly) OMIDPrebidorgAdSessionConfiguration *configuration;
/**
* The native view which is used for viewability tracking.
*/
@property(nonatomic, weak, nullable) UIView *mainAdView;

/**
* Initializes new ad session supplying the context.
*
* Note that creating an OMIDAdSession sends a message to the OM SDK JS Service running in the
* webview. If the OM SDK JS Service has not loaded before the ad session is created, the
* message is lost, and the verification scripts will not receive any events.
*
* To prevent this, the implementation must wait until the webview finishes loading OM SDK
* JavaScript before creating the OMIDAdSession. The easiest way is to create the OMIDAdSession
* in a webview delegate callback (-[WKNavigationDelegate webView:didFinishNavigation:]. Alternatively,
* if an implementation can receive an HTML5 DOMContentLoaded event from the webview, it can create
* the OMIDAdSession in a message handler for that event.
*
* @param context The context that provides the required information for initialising the ad session.
* @return A new OMIDAdSession instance, or nil if the supplied context is nil.
*/
- (nullable instancetype)initWithConfiguration:(OMIDPrebidorgAdSessionConfiguration *)configuration
adSessionContext:(OMIDPrebidorgAdSessionContext *)context
error:(NSError *_Nullable *_Nullable)error;


/**
* Notifies all verification providers that the ad session has started and ad view tracking will begin.
*
* This method will have no affect if called after the ad session has finished.
*/
- (void)start;

/**
* Notifies all verification providers that the ad session has finished and all ad view tracking will stop.
*
* This method will have no affect if called after the ad session has finished.
*
* Note that ending an OMID ad session sends a message to the verification scripts running inside
* the webview supplied by the integration. So that the verification scripts have enough time to
* handle the 'sessionFinish' event, the integration must maintain a strong reference to the webview
* for at least 1.0 seconds after ending the session.
*/
- (void)finish;

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

/**
* Removes registered friendly obstruction.
*
* This method will have no affect if called after the ad session has finished.
*
* @param friendlyObstruction The view to be removed from the list of registered friendly obstructions.
*/
- (void)removeFriendlyObstruction:(UIView *)friendlyObstruction;

/**
* Utility method to remove all registered friendly obstructions.
*
* This method will have no affect if called after the ad session has finished.
*/
- (void)removeAllFriendlyObstructions;

/**
* Notifies the ad session that an error has occurred.
*
* When triggered all registered verification providers will be notified of this event.
*
* @param errorType The type of error.
* @param message The message containing details of the error.
*/
- (void)logErrorWithType:(OMIDErrorType)errorType message:(NSString *)message
NS_SWIFT_NAME(logError(withType:message:));

@end

NS_ASSUME_NONNULL_END
Loading

0 comments on commit 1336b49

Please sign in to comment.