AppLovin / AppLovin-MAX-SDK-iOS

84 stars 69 forks source link

AppLovin SDK Not Triggering Callback Handler After Initialization in GDPR Region #303

Open maximkir-fl opened 2 months ago

maximkir-fl commented 2 months ago

MAX SDK Version

12.3.0

Device/Platform Info

iOS 17.4

Current Behavior

After initializing the AppLovin SDK (version 12.3.0) on iOS within the GDPR region, the completion handler callback is not being triggered.

Based on the log snippets provided, it appears that the SDK is re-initializing itself. This might be causing the provided callback handler not to be triggered.

Once the app restarted, the callback executed.

[AppLovinSdk] DEBUG [ALGoogleCMPAdapter] Successfully loaded consent form
[AppLovinSdk] DEBUG [ALSdk] Transitioning to state: [ALConsentFlowState: id=21, type=cmp_show, isInitialState=0]
[AppLovinSdk] DEBUG [ALGoogleCMPAdapter] Showing consent form...

[AppLovinSdk] DEBUG [ALGoogleCMPAdapter] Consent form finished showing
[AppLovinSdk] DEBUG [ALSdk] Transitioning to state: [ALConsentFlowStateEvent: id=13, type=event, isInitialState=0, name=gdpr_ok]
[AppLovinSdk] DEBUG [ALEventService] Tracking event: "gdpr_ok"
[AppLovinSdk] DEBUG [ALSdk] Transitioning to state: [ALConsentFlowState: id=1001, type=decision, isInitialState=0]
[AppLovinSdk] DEBUG [ALSdk] Transitioning to state: [ALConsentFlowState: id=14, type=att, isInitialState=0]

[AppLovinSdk] DEBUG [ALSdk] Transitioning to state: [ALConsentFlowState: id=14, type=att, isInitialState=0]
[AppLovinSdk] DEBUG [ALSdk] Transitioning to state: [ALConsentFlowState: id=99, type=reinit, isInitialState=0]
[AppLovinSdk] DEBUG [ALEventService] Tracking event: "tac"
[AppLovinSdk] DEBUG [ALSdk] Unified flow completed with status: [ALConsentFlowCompletionStatus: isCMPPromptShown=1, isATTPromptShown=1, error=(null)]
[AppLovinSdk] DEBUG [ALSdk] Re-initializing SDK with the updated privacy settings...

Expected Behavior

No response

How to Reproduce

Follow the iOS integration guide.

Additional Info

No response

santoshbagadi commented 2 months ago

@maximkir-fl could you confirm if you are initializing the SDK with the new ALSdkInitializationConfiguration API?

maximkir-fl commented 2 months ago

Yes.

On Fri, 15 Mar 2024 at 0:53 Santosh Bagadi @.***> wrote:

@maximkir-fl https://github.com/maximkir-fl could you confirm if you are initializing the SDK with the new ALSdkInitializationConfiguration API?

— Reply to this email directly, view it on GitHub https://github.com/AppLovin/AppLovin-MAX-SDK-iOS/issues/303#issuecomment-1998610717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4TRGHAJZUI4BWSNSGONILYYITAHAVCNFSM6AAAAABEV53626VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYGYYTANZRG4 . You are receiving this because you were mentioned.Message ID: @.***>

santoshbagadi commented 2 months ago

Thank you for confirming and raising the issue. We'll add a fix for this in our next SDK release.

Note that the issue is not present when using our old APIs, so please hold off on updating to the new APIs until our next release. Apologies for the inconvenience

maximkir-fl commented 2 months ago

Thanks! Can you please point out to the docs regarding the old api usage?

On Fri, 15 Mar 2024 at 8:56 Santosh Bagadi @.***> wrote:

Thank you for confirming and raising the issue. We'll add a fix for this in our next SDK release.

Note that the issue is not present when using our old APIs, so please hold off on updating to the new APIs until our next release. Apologies for the inconvenience

— Reply to this email directly, view it on GitHub https://github.com/AppLovin/AppLovin-MAX-SDK-iOS/issues/303#issuecomment-1999047568, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4TRGABPBTAZ7WF64VB7ETYYKLRZAVCNFSM6AAAAABEV53626VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJZGA2DONJWHA . You are receiving this because you were mentioned.Message ID: @.***>

santoshbagadi commented 1 month ago

Our docs are available here: https://dash.applovin.com/documentation/mediation/ios/getting-started/integration#add-the-sdk-key

thomasmso commented 1 month ago

@maximkir-fl - We just released v12.3.1 SDK which fixes this issue. Please let us know if there are any questions.

llfabris commented 1 month ago

I'm having a similar issue outside gpdr, where the initialization callback is never called. Updating to the latest version didn't help.

https://dash.applovin.com/documentation/mediation/ios/getting-started/integration#add-the-sdk-key

All my networks show on the "Completed SDK INTEGRATIONS" and I have the SDK key inside the app's plist as "AppLovinSdkKey".

@thomasmso Any ideas? I'm using debug build. Any info that could help us debug this issue would be greatly appreciated.

` obj-c [ALSdk shared].mediationProvider = @"max";

[[ALSdk shared] initializeSdkWithCompletionHandler:^(ALSdkConfiguration *configuration) {
    // Start loading ads
}];

`

versions:

s.dependency 'AppLovinSDK', '12.3.1' s.dependency 'AppLovinMediationAdColonyAdapter', '4.9.0.0.4' s.dependency 'AppLovinMediationChartboostAdapter', '9.7.0.0' s.dependency 'AppLovinMediationFacebookAdapter', '6.14.0.1' # Meta Audience Network s.dependency 'AppLovinMediationFyberAdapter', '8.2.7.0' # DT Exchange s.dependency 'AppLovinMediationGoogleAdManagerAdapter', '11.2.0.0' s.dependency 'AppLovinMediationGoogleAdapter', '11.2.0.0' # Google AdMob s.dependency 'AppLovinMediationHyprMXAdapter', '6.3.0.1.0' s.dependency 'AppLovinMediationIronSourceAdapter', '7.9.0.0.0' s.dependency 'AppLovinMediationMintegralAdapter', '7.5.9.0.0' s.dependency 'AppLovinMediationByteDanceAdapter', '5.8.0.8.0' # Pangle s.dependency 'AppLovinMediationTapjoyAdapter', '13.2.1.0' s.dependency 'AppLovinMediationUnityAdsAdapter', '4.9.3.0' s.dependency 'AppLovinMediationVungleAdapter', '7.2.2.0' # Liftoff Monetize s.dependency 'AppLovinMediationAmazonAdMarketplaceAdapter', '4.8.0.0' # Amazon s.dependency 'AmazonPublisherServicesSDK', '4.8.0' # Amazon

wootaejeon commented 1 month ago

@llfabris If you are using the new initialization API, you must remove the AppLovinSDKKey entry from your Info.plist. Here is the relevant link to our docs for your reference https://dash.applovin.com/documentation/mediation/ios/getting-started/migration123

llfabris commented 1 month ago

@wootaejeon still didn't work, but thanks!

I see the following line in the logs:

[AppLovinSdk] DEBUG [ALErrorReporter] integration_error reported with code 200

any idea of what it means?

I don't see it in this list: https://support.applovin.com/hc/en-us/articles/13893928943629-Error-Handling

wootaejeon commented 1 month ago

@llfabris Could you share your code for creating the ALSdkInitializationConfiguration object and calling initializeWithConfiguration: method with your completion handler? Feel free to share your code snippet through my email wootae.jeon@applovin.com if you'd like.