AppLovin / AppLovin-MAX-SDK-iOS

84 stars 69 forks source link

Internal user identifier setting is not effective in latest versions. #311

Closed Ysix closed 1 week ago

Ysix commented 1 month ago

MAX SDK Version

12.4.0

Device/Platform Info

iOS

Current Behavior

Attaching an internal user identifier with either the newest API

builder.settings.userIdentifier = "«USER-ID»" 

or the deprecated API

ALSdk.shared()!.userIdentifier = "user-id"

doesn't seems to be effective:

IMG_2F7BEBBE0518-1

Expected Behavior

I expect to retrieve the provided user id in the creative debugger and in the data provided by AppLovin Max.

How to Reproduce

Additional Info

This bug is also impacting at least versions 12.3.0 and 12.3.1. It was not present in version 11.9.0

thomasmso commented 1 month ago

@Ysix - Could you provide your integration code for when you set the user id, relative to your other calls to our SDK?

Ysix commented 1 month ago

Sure !

        // Create the app lovin max initialization configuration
        let appLovinInitConfig = ALSdkInitializationConfiguration(sdkKey: Constants.AppLovinSDKKey) { builder in
            builder.mediationProvider = ALMediationProviderMAX
            builder.settings.userIdentifier = installationId
        }

        guard let appLovin = ALSdk.shared() else {
            throw AdvertisingError.appLovinNotFound
        }

        appLovin.initialize(with: appLovinInitConfig) { (configuration: ALSdkConfiguration) in
           // start ad loading
        }

When running this code I can see in the console:

[AppLovinSdk] DEBUG [ALSdkSettings] ALSdkSettings setUserIdentifier: xxxxxx
zdrake314 commented 1 month ago

@Ysix, Can you reproduce this in our demo app: https://github.com/AppLovin/AppLovin-MAX-SDK-iOS

I checked the creative debugger as well, and the User ID shows up there when I do this in my personal test app and our internal diagnostic test app.

Ysix commented 1 month ago

Allow me to clarify my previous message:

Upon running this code, I observed the following output in the console: [AppLovinSdk] DEBUG [ALSdkSettings] ALSdkSettings setUserIdentifier: xxxxxx

Here, xxxxx served as a placeholder for the current user ID.

I intended to convey that despite not locating it in the creative debugger, the log indicated successful provision of the user ID.

--

I'll try to reproduce my issue in the demo app, thanks.

Ysix commented 1 month ago

I confirm I have the same issue in the demo app project:

The user id is correctly shown in the console:

Capture d’écran 2024-04-11 à 15 53 52

But not in the creative debugger: IMG_65222792F345-1

zdrake314 commented 1 month ago

Okay, I've got a clean repro case:

This is in our internal test app (Swift, iOS SDK 12.3.1). I've written up an internal ticket for this and will notify this thread when action is taken.

Ysix commented 3 weeks ago

This is great news, thank you!

By any chance, do you have an estimated time of arrival (ETA)?

Also what is the old method you mention ? Maybe we could use it as a workaround ?

zdrake314 commented 3 weeks ago

No ETA, but I see there's a pull request for the fix, so it will probably be soon.

The old way I mentioned is documented here: https://dash.applovin.com/documentation/mediation/ios/getting-started/integration#initialize-the-sdk

Yes, it would work as a work-around. It is deprecated, but hasn't been removed yet.

zdrake314 commented 1 week ago

This has been fixed in iOS SDK 12.4.2, released May 6 2024. Chagelog: https://developers.applovin.com/en/ios/changelog