Skip to content

APS Updates #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

APS Updates #89

wants to merge 12 commits into from

Conversation

jonathansligh-nimbus
Copy link
Contributor

@jonathansligh-nimbus jonathansligh-nimbus commented Apr 17, 2025

Changed APS Ad Unit Types and updated code to mirror the APS portal.

@jonathansligh-nimbus jonathansligh-nimbus self-assigned this Apr 17, 2025
# Conflicts:
#	com.adsbynimbus.nimbus/Runtime/Plugins/iOS/NimbusManager.swift
#	com.adsbynimbus.nimbus/Runtime/Scripts/Nimbus.Internal/LiveRamp/NimbusLiveRampHelpers.cs
@jonathansligh-nimbus jonathansligh-nimbus marked this pull request as ready for review April 17, 2025 16:23
Copy link
Member

@JasonSznol JasonSznol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment Android does not have the ability to differentiate between Interstiital Video and Rewarded Video using the addApsSlot method so until those changes can be made in the SDK or the code to retrieve the APS params is moved into this project and updated correctly, we should hold off on merging this in.

found = true;
break;
var interstitialVideo = false;
foreach (ApsSlotData slot in _slotData){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous for loop implementation for matching slots was fine since it was only checking a single condition but as the complexity has grown, this pattern becomes much harder to maintain as it is currently lacking adequate testing and will be prone to future error.

Is it possible to replace this with the .Net Find function?

found = true;
break;
var interstitialVideo = false;
foreach (ApsSlotData slot in _slotData){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to be duplicated from the Android code, is it possible to use a single method for retrieving the slot that can be used by both platforms?

@@ -46,39 +47,77 @@ public void InitializeNativeSDK() {
adRegistration.CallStatic("enableTesting", true);
}

private static Tuple<int, int> AdTypeToDim(AdUnitType type) {
private static Tuple<int, int> AdTypeToDim(APSAdUnitType type) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you were to store the width and height of the ad on the ApsAdSlot you could remove this function and reference those values directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants