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

feat/integrate app lovin max sdk v10.3.0 into the demo apps #34

Conversation

richashukla23
Copy link
Contributor

@@ -102,7 +102,7 @@ - (void)didCompleteRewardedVideoForAd:(MAAd *)ad
[self logCallback: __PRETTY_FUNCTION__];
}

- (void)didRewardUserForAd:(MAAd *)ad withReward:(MAReward *)reward
- (void)didPayRevenueForAd:(MAAd *)ad withReward:(MAReward *)reward
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this is a valid callback.

Copy link
Member

Choose a reason for hiding this comment

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

I'd definitely cmd + B the test apps to see if there are warnings next time when submitting PRs.

@richashukla23
Copy link
Contributor Author

Changes made.

@thomasmso
Copy link
Member

lg2m if lg to @alvarshahanji

@nihp
Copy link

nihp commented Jul 6, 2022

@thomasmso

I am trying to add the applovin. i am getting the error as below. Can anyone provide any inputs on this?

[AppLovinSdk] ERROR [ALSdk] Mediation provider is nil. Please set AppLovin SDK mediation provider via -[ALSdk setMediationProvider:]

I have the code as below

[ALSdk shared].mediationProvider = @"max";

@thomasmso
Copy link
Member

@nihp - Any calls to [ALSdk shared] should be after you call sdk.mediationProvider = "max"

@nihp
Copy link

nihp commented Jul 7, 2022

I have initialized the Applovin as below in my Appdelegate.m file.

  ```

[FBAdSettings setDataProcessingOptions: @[]];
[ALSdk shared].mediationProvider = @"max";
[ALSdk initializeSdk];
[[ALSdk shared] showMediationDebugger];

@thomasmso
Copy link
Member

Any ad classes such as MAInterstitialAd should be instantiated after

let sdk = ALSdk.shared()!
sdk.mediationProvider = "max"
sdk.initializeSdk { (configuration: ALSdkConfiguration) in
    ...
}

@nihp
Copy link

nihp commented Jul 7, 2022

@thomasmso I am using Objective -c

@thomasmso
Copy link
Member

They're very similar languages, I'm sure you can convert

@nihp
Copy link

nihp commented Jul 7, 2022

@thomasmso Thank you so much. It works but facing this two.

I can able to see the mediation debugger and it shows the provider as max. But the Applovin integrrations shows as in incomplete status.
Simulator Screen Shot - iPhone 12 - 2022-07-07 at 13 34 42

Also while trying to add the GoogleMediation it shows the below error

Screenshot 2022-07-07 at 2 38 31 PM

I am getting a warning as below

[AppLovinSdk] DEBUG [MAInterstitialAd] Created new MAInterstitialAd (<MAFullscreenAdController: 0x600003d008f0>) [AppLovinSdk] WARN [ALSdk] Attempted to load ad before SDK initialization. Please wait until after the SDK has initialized, e.g. in the completionHandler of -[ALSdk initializeSdkWithCompletionHandler:]. [AppLovinSdk] DEBUG [MAInterstitialAd] Created new MAInterstitialAd (<MAFullscreenAdController: 0x600003d002c0>) [AppLovinSdk] WARN [ALSdk] Attempted to load ad before SDK initialization. Please wait until after the SDK has initialized, e.g. in the completionHandler of -[ALSdk initializeSdkWithCompletionHandler:]. [AppLovinSdk] WARN [ALMediationAdLoadManager] Attempting to load ad for same ad unit id (adunit) while another ad load is already in progress!

@thomasmso
Copy link
Member

You're integrating using a non-conventional method (probably not using CocoaPods), so we won't be able to assist there.

@nihp
Copy link

nihp commented Jul 7, 2022

Yes, I am using the manual download and using the SDK inside the Link binaries.

Are you mentioning this won't work for the manual linking methods to show the ads in the iOS app using the APplovin?

@nihp
Copy link

nihp commented Jul 7, 2022

@thomasmso Could you please assist to get pass this error.

AppLovinSdk] WARN [ALSdk] Attempted to load ad before SDK initialization. Please wait until after the SDK has initialized, e.g. in the completionHandler of -[ALSdk initializeSdkWithCompletionHandler:].

I will check over the ApplovinGoogleMediation adpater error.

@ddaddy
Copy link

ddaddy commented Jul 7, 2022

I don't use CocoaPods either and have many adapters and SDK's working.
You can install AppLovin and Google SDK's through Swift Package Manager.
For the adapters, use ALGoogleMediationAdapter and make sure the .m file has your app selected in the Target Membership panel.

Screenshot 2022-07-07 at 11 43 04

@nihp
Copy link

nihp commented Jul 7, 2022

@ddaddy Thanks for you inputs.
But I have usind the Applovin as manula linking file. I will use the SPM for thr GoogleMediation and let update. In the same way I have used the GoogleAds sdk via the manual linking. If I use the ApplovinGoogleMediation alone using the SPM, i think it is not an issue. Am I correct?

@nihp
Copy link

nihp commented Jul 7, 2022

@ddaddy I am trying to show the Int ads in the device. But it not showing the ads while debugging the ads always not ready to showAd. Did you know any reason for this?

       [[ALSdk shared] initializeSdkWithCompletionHandler:^(ALSdkConfiguration *configuration) {
               // Start loading ads
           [self.interstitial loadAd];
           }];
       if (self.interstitial.ready){
           [self.interstitial showAd];
        }

@ddaddy
Copy link

ddaddy commented Jul 7, 2022

@ddaddy I am trying to show the Int ads in the device. But it not showing the ads while debugging the ads always not ready to showAd. Did you know any reason for this?

I don't use Int ads sorry. I'm not sure what your problem may be. Perhaps try adding a slight delay before calling loadAd?

@ddaddy
Copy link

ddaddy commented Jul 7, 2022

@nihp Actually, looking at your code. Assuming it is exactly as you have it...
You are calling to initialise the SDK, which is an async task. So it goes off to do that while the code continues to your if statement which will be false as the sdk hasn't finished initialising yet. Then the init completion block is called and you call loadAd

@nihp
Copy link

nihp commented Jul 7, 2022

So here I need to wait the before calling the showAd to initialize.

@ddaddy
Copy link

ddaddy commented Jul 7, 2022

Yes. As a rudimentary test you could use something like:

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        if (self.interstitial.ready) {
            [self.interstitial showAd];
        }
    });

which will wait 5 seconds.

However what you really should be doing, is using the delegate callback from load to know when the ad is loaded, then show it from there.

@nihp
Copy link

nihp commented Jul 8, 2022

@ddaddy Thanks for your input, it really helps me.

@nihp
Copy link

nihp commented Jul 8, 2022

@ddaddy I have an another clarification. The int is working fine, but it automatically closing before the count down is over. Eg) 10 to 5 it showing the ad and it suddenly close the ad and showing the home screen.

Also, I am trying to show the native ads in my app in the list of my app. The view is not adding inbetween the list of my app.

@ddaddy
Copy link

ddaddy commented Jul 8, 2022

I don't use interstitials so can't help sorry. Possibly being deallocated?
Do you hold a strong reference to it.

Shame AppLovin don't have somewhere to get help for this kind of thing 🫣

Maybe try StackOverflow.

@nihp
Copy link

nihp commented Jul 8, 2022

Okay so for Native ads adding in between the list is not available still?

@ddaddy
Copy link

ddaddy commented Jul 8, 2022

I positioned my own ads in a tableview using my own logic, however I eventually changed to using MREC instead of Native.

@nihp
Copy link

nihp commented Jul 8, 2022

Okay Thanks @ddaddy for your inputs.

@nihp
Copy link

nihp commented Jul 11, 2022

@ddaddy I am also trying the same. But I got the below error

[AppLovinSdk] ERROR [ALDelegateCallbackInvoker] Unable to notify ad delegate about native ad being loaded: NSLayoutConstraint for <MANativeAdView: 0x7f7b11a2a7d0; frame = (0 0; 300 250); clipsToBounds = YES; opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x600003ec52a0>>: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs.

[AppLovinSdk] ERROR [ALDelegateCallbackInvoker] Unable to notify ad delegate about native ad being loaded: NSLayoutConstraint for (null): Constraint must contain a first layout item

@nihp
Copy link

nihp commented Jul 19, 2022

I positioned my own ads in a tableview using my own logic, however I eventually changed to using MREC instead of Native.

@ddaddy Can I get any demo repo for this?

@ddaddy
Copy link

ddaddy commented Jul 19, 2022

I'm afraid not sorry, I don't have the time.
Use the docs for how to place an MREC advert and just place it into the right cell in your tableview.

@nihp
Copy link

nihp commented Jul 20, 2022

@ddaddy The native AdPlacer works or not for adding the ads inbetween the list for iOS?

@thomasmso

@nihp
Copy link

nihp commented Aug 4, 2022

Hi all, I need to know after integrating the Google admob and Applovin in the debugger it shows like Incomplete integration.

But I can able to see the impressions for the Google Admob and Applovin networks as expected in the dashboard.

Simulator Screen Shot - iPhone 11 - 2022-08-02 at 10 07 56

@nihp
Copy link

nihp commented Aug 25, 2022

Any one have solution for this?

[BackgroundTask] Background Task 114 from -[ALPostbackService dispatchPostbackRequest:executionQueue:andNotify:]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.

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.

4 participants