Integrate Ads via Enhance

#1

It’s not a secret that integration of 3rd party SDKs into Defold project is a pain, because 3rd party services don’t make adapters as they do for Unity or other lucky engines. Especially if it’s about Ads SDKs. There are few ready-to-use extensions like UnityAds and AdMob (is there any for Facebook Ads?), but first - you need to implement each one separately, second - if you want to add any other SDK like Applovin, Vungle, Facebook, Ironsource etc, you need to write a native extension. For me it’s the most avoided type of work, don’t want even thinking about it :nauseated_face:

And like a savior coming down from heaven the Enhance service has come to my attention. Saying short - you implement only core high-level calls to their SDK, make a build, upload it to their servers and they give you back a new build with all 3rd party SDKs baked into - Ads, Analytics, Tracking, whatever you’ve chosen. Sounds like a miracle!

So I’ve tried it for Ads and faced a pretty poor and ambiguous documentation. I’ve finally make it show me test ads for Facebook, Unity, AppLovin and Admob (but failed to make Vungle to work) on iOS and want to share some things I tripped over:

  1. One of the first steps is adding a certificate. It’s not said, what type of certificate they want for iOS build - it should be a *.p12 cert
  2. Enhance is going to sign the build for you, so should it be unsigned build (there is such option in Defold build settings for iOS)? If so, where to upload a mobileprovision file? - no, just make your dev build as usual, signed, Enhance will simply re-sign it with the provided *.p12 cert and so the mobileprovision will also be there
  3. [FIXED] Usually there are two ways to implement extension in Defold - point to Git repo in project settings or simply copy-paste sources into the project root. Enhance adapter for Defold also supports both ways, but Git version is outdated! So download the “DragAndDrop Library” as they call it, provided during integration steps.
  4. Ok, before implementing 3rd party SDKs the first thing you probably want to try is the in-house “Enhance Ads”. Well, I failed to get any impressions from it, and failed to find any kind of “test ads” config. So let’s just assume that it probably works, but can’t be tested.
  5. To test Facebook Ads you need to register Test devices by IDFA in FB Ads dashboard, otherwise there is no “fill” for you (despite the fact that you set test mode in app settings)
  6. To test ads with networks marked “GDPR ready” and “requires explicit opt-in” you first need to set GDPR opt-in, otherwise all requests for ads will return “not ready” (moreover, there will be no real requests for ads as I understand). This was freaking not obvious and not clearly covered in the docs, everything you got - “ad is not ready” :face_with_symbols_over_mouth:
  7. I’m not sure if there is a callback for Enhance adapter initialization event, but for sure (a) it’s not synchronous (b) if you call GDPR opt-in method before initialization has finished, it’ll silently fail. So I’m just calling enhance.requiresDataConsentOptIn(callback) after each level and deal with GDPR if parameter in callback is == 1.
  8. There are some undocumented methods, which you can find in enhance_extension/src/enhance.cpp Module_methods const. But I’m not sure if they work and how.
  9. There is no callback to track when interstitial ad was closed, you might need it to mute/unmute sounds when show/close the ad, but you can’t currently.

And all this is said regarding “my own mediation” case, so, using Enhance’s simple waterfall for Ads mediation. Don’t know what new surprises you might find with other mediation options.

But at least it seems working for Interstitial ads from FB, Admob, Unity and Applovin. I wrote a message to their support regarding issues with Vungle and going to try Rewarded Ads integration next. Stay tuned :facepunch:

UPD1: Rewarded ads work for all listed networks including Vungle
UPD2: Vungle ads SDK should be updated soon and issue with git version of extension should be also fixed

8 Likes

Ad mediation with Defold
#2

Update: Rewarded ads work for all listed networks including Vungle

0 Likes

#3

Do we need to pay something or share impressions for using Enhance SDK?

0 Likes

#4

They charge nothing, you do not make any less from using them. They make their money mostly from contracts with the ad networks afaik.

1 Like

#5

Could this be solved. Can we fix this and make a PR?

0 Likes

#6

There is one PR adding GDPR methods (something missing in git repo, but included in downloadsble zip) hanging there without any attention from 2018, so I’m not sure if it’ll help. I wrote a request to sync repos to their support.

1 Like

#7

Regarding signing. Bob.jar can skip signing if you skip passing the .mobileprovision and identityarguments. This should make it possible for you to bundle an (unsigned) .ipa on Windows and Linux.

3 Likes

#8

Got two replies from Enhance support:

  1. About issues with interstitials from Vungle:

It is possible that it is due to our old Vungle version. We are working our way through our iOS SDK update queue.

  1. About Git outdated issue:

We did actually have a patch in the works for this, but it got buried in our review process. We’ve now bumped it up and should be updating it very soon

2 Likes

#10

I wanted to mute/unmute sounds and music while showing ads. To do so I need to track two events - when ad shown and when ad closed. For Rewarded ads there are 3 callbacks - completed, canceled and declined. But for Interstitial ad there is nothing, only “show” method and no callbacks.

I found undocumented method “enhance.setInterstitialCallback(callback)” in “enhance_extension/src/enhance.cpp” but it does something strange - now instead of showing interstitials the app shows “An actual interstitial will show here when your app enhanced” (see the attachment) and callback is never called. But my app is already enhanced, so it makes no sense.

I’ve solved unmuting by reacting on any tap in the game after showing some ad, but it’s bad UX, callback on interstitial close will be much better. Sent another request to enhance support.

2 Likes

#11

Point (3) was fixed, git repo with the extension is now synced with downloadable version. https://github.com/enhance-co/defold-connector - actually they merged this PR I’ve pointed to earlier.

1 Like

#12

Hi there, is anyone using Enhance for iOS? My recently enhanced builds fail to install on my test devices. The build works fine before “enhancing”, certificates are OK, nothing changed from my side (instead of updating to 1.2.165 from 1.2.164), so I think something is broken on their side.

Does anyone face the same issues with enhancing iOS apps right now? I’ve reached their support earlier today, but I did not get any answer for another question I posted a week ago, so asking here as well.

0 Likes