Skip to content
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

Feature_MC-1970 #88

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Feature_MC-1970 #88

wants to merge 5 commits into from

Conversation

AlokKumar-CT
Copy link
Contributor

Implemented _i and _j functionality

@AlokKumar-CT AlokKumar-CT changed the base branch from develop to fix_MC-1992 October 1, 2024 06:43
@AlokKumar-CT AlokKumar-CT changed the title Feature mc 1970 Feature_MC-1970 Oct 1, 2024
@AlokKumar-CT AlokKumar-CT changed the base branch from fix_MC-1992 to develop October 1, 2024 06:45
using CleverTapSDK.Utilities;

#if (!UNITY_IOS && !UNITY_ANDROID) || UNITY_EDITOR
namespace Native.UnityNativeWrapper
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix namespace to be CleverTapSDK.Native and remove it from the usings.

#if (!UNITY_IOS && !UNITY_ANDROID) || UNITY_EDITOR
namespace Native.UnityNativeWrapper
{
internal class UnityNativeMetadataResponseInterceptor : IUnityNativeResponseInterceptor
Copy link
Contributor

Choose a reason for hiding this comment

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

The response interceptor is unused, it is not added to the engine interceptors.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it is better for the interceptor to not have a reference to the network engine. This creates a circular reference since the engine adds and holds the interceptors.
The options on top of my head are:

  1. The interceptor to set the _i and _j in the preferences and the engine to use them from there. The interceptor can get the preference manager using the account id.
  2. Do this logic directly in the network engine.
    I believe it might be cleaner to go with 1. since you also already started with that approach.

_networkEngine.SetI(i);
}
} catch (Exception t) {
// Ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not ignore the exception.

_networkEngine.SetJ(j);
}
} catch (Exception t) {
// Ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

Do not ignore the exception.

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