ti.admob icon indicating copy to clipboard operation
ti.admob copied to clipboard

Updated iOS and Android AdMob SDK, FB Audience Network and InMobi adapter, added new iOS Rewarded Video

Open Astrovic opened this issue 3 years ago • 15 comments

Android: Android v.5.1.0 - 25 Feb 2022

  • Update Google Mobile Ads SDK 20.5.0
  • Update Audience Network SDK 6.+
  • Update Facebook Adapter 6.8.0.0
  • Update InMobi SDK 10.0.1
  • Update InMobiAdapter 10.0.1.0

iOS: iOS v.4.8.0 - 4 Apr 2022

  • Update Google Mobile Ads SDK 8.13.0
  • Update Audience Network SDK 6.9.0
  • Update Facebook Adapter 6.9.0.0
  • Update InMobi SDK 10.0.2
  • Update InMobiAdapter 10.0.2.0
  • Initialize the Mobile Ads SDK
  • Added Admob.showMediationTestSuite()

Both versions are tested and in production on the stores

Astrovic avatar Jan 14 '21 18:01 Astrovic

Fails
:no_entry_sign: version bump was Major in ios/manifest but None in package.json
:no_entry_sign:

npm run lint failed, please check messages below for output.

Warnings
:warning: SDK version declared in Jenkinsfile (9.2.1.GA) does not match iOS' titanium.xcconfig value (10.1.0.GA)
:warning:

:mag: Can't find junit reports at ./TESTS-*.xml, skipping generating JUnit Report.

Messages
:book:

:bomb: Here's the output of npm run lint:

> @titanium-sdk/[email protected] lint
> npm run lint:android && npm run lint:ios && npm run lint:js && npm run lint:docs


> @titanium-sdk/[email protected] lint:android
> clang-format-lint android/src/**/*.java

Error: Formatting incorrect on "android/src/ti/admob/AdmobModule.java", proposed changes: <?xml version='1.0'?>
<replacements xml:space='preserve' incomplete_format='false'>
<replacement offset='338' length='1677'>import android.app.Activity;&#10;import android.content.Context;&#10;import android.net.Uri;&#10;import android.os.AsyncTask;&#10;import android.os.Bundle;&#10;import com.google.ads.consent.AdProvider;&#10;import com.google.ads.consent.ConsentForm;&#10;import com.google.ads.consent.ConsentFormListener;&#10;import com.google.ads.consent.ConsentInfoUpdateListener;&#10;import com.google.ads.consent.ConsentInformation;&#10;import com.google.ads.consent.ConsentStatus;&#10;import com.google.ads.consent.DebugGeography;&#10;import com.google.ads.mediation.admob.AdMobAdapter;&#10;import com.google.ads.mediation.inmobi.InMobiConsent;&#10;import com.google.android.gms.ads.AdRequest;&#10;import com.google.android.gms.ads.MobileAds;&#10;import com.google.android.gms.ads.identifier.AdvertisingIdClient;&#10;import com.google.android.gms.common.GooglePlayServicesNotAvailableException;&#10;import com.google.android.gms.common.GooglePlayServicesRepairableException;&#10;import com.google.android.gms.common.GooglePlayServicesUtil;&#10;import com.inmobi.sdk.InMobiSdk;&#10;import java.io.IOException;&#10;import java.net.MalformedURLException;&#10;import java.net.URL;&#10;import java.util.ArrayList;&#10;import java.util.Arrays;&#10;import java.util.List;&#10;import java.util.Map;&#10;import org.appcelerator.kroll.KrollDict;&#10;import org.appcelerator.kroll.KrollFunction;&#10;import org.appcelerator.kroll.KrollModule;&#10;import org.appcelerator.kroll.KrollObject;&#10;import org.appcelerator.kroll.annotations.Kroll;&#10;import org.appcelerator.kroll.common.Log;&#10;import org.appcelerator.titanium.TiApplication;&#10;import org.appcelerator.titanium.TiBlob;&#10;import org.appcelerator.titanium.io.TiBaseFile;&#10;import org.appcelerator.titanium.util.TiConvert;&#10;import org.json.JSONException;&#10;import org.json.JSONObject;</replacement>
<replacement offset='14763' length='5'>&#10;		</replacement>
<replacement offset='14837' length='0'> </replacement>
</replacements>

Generated by :no_entry_sign: dangerJS against d2d66466e2b1f687166372001ed7604fe3574d13

build avatar Jan 14 '21 18:01 build

The 4.6.0 file linked above gives a 404. It seems like it should go to here: https://github.com/Astrovic/ti.admob/releases/tag/ios-4.5.6

Is this the version I should try out?

dlewis23 avatar Jan 03 '22 21:01 dlewis23

@dlewis23 yes, the last version is 4.6.0 and correct link is https://github.com/Astrovic/ti.admob/releases/tag/ios-4.5.6

Astrovic avatar Jan 03 '22 21:01 Astrovic

I tried to use this updated 4.6.0 Version today on iOS with TI SDK 10.1.0 GA and it does not work. When I go to build the app I just get the basic error message below. If I change the Admob module version back to 3.0.0 it builds just fine.

[ERROR] : ** BUILD FAILED ** [ERROR] : The following build commands failed: [ERROR] : Ld /Users/donovanlewis/Documents/Appcelerator_Studio_Workspace/iPad\ Test/build/iphone/build/Products/Debug-iphonesimulator/iPadTest.app/iPadTest normal (in target 'iPadTest' from project 'iPadTest') [ERROR] : (1 failure)

dlewis23 avatar Jan 16 '22 01:01 dlewis23

Hello,

I put a trace on this today as I had some more time and this is the error I get. Seems like something with Facebook is missing?

[TRACE] ld: warning: directory not found for option '-L/Users/donovanlewis/Documents/Appcelerator_Studio_Workspace/Quick/build/iphone/lib' [TRACE] ld: framework not found FBSDKCoreKit [TRACE] clang: error: linker command failed with exit code 1 (use -v to see invocation) [ERROR] ** BUILD FAILED ** [ERROR] The following build commands failed: [ERROR] Ld /Users/donovanlewis/Documents/Appcelerator_Studio_Workspace/Quick/build/iphone/build/Products/Debug-iphonesimulator/Quick.app/Quick normal (in target 'Quick' from project 'Quick') [ERROR] (1 failure)

dlewis23 avatar Jan 17 '22 22:01 dlewis23

My module version uses Facebook mediation, so you have to add Facebook module in your tiapp.xml

Astrovic avatar Jan 17 '22 23:01 Astrovic

Do you happen to have a build of the Admob Module with arm64 support enabled for M1 Mac's in the simulator?

dlewis23 avatar Mar 19 '22 16:03 dlewis23

@dlewis23 @Astrovic Would you mind giving me a quick update where we're at here? It is ready for review and working for you guys?

hansemannn avatar May 11 '22 17:05 hansemannn

@hansemannn The changes in the PR works correctly, I use it in production both on iOS and Android. However, it would be necessary to change the documentation because over time changes have been made to the methods and properties that are documented only in the notes of the various releases.

@dlewis23 I think the module uses some old framework that does not support M1 yet, unfortunately I have no way of testing

Astrovic avatar May 26 '22 14:05 Astrovic

Okay, I'll check the APIs (vs docs) and check on the arm64 library of the native SDK!

hansemannn avatar May 26 '22 18:05 hansemannn

@Astrovic @hansemannn I tired to update the module with ARM64 support and I get the following message with the frameworks that do not have ARM64 support.

[WARN] The module is using frameworks (MDFInternationalization.framework,MDFTextAccessibility.framework,MaterialComponents.framework,PersonalizedAdConsent.framework) that do not support simulator arm64. Excluding simulator arm64. The app using this module may fail if you're on an arm64 Apple Silicon device.

dlewis23 avatar May 26 '22 18:05 dlewis23

Yeah, all frameworks have to be an .xcframework and include the arm64-maccatalyst slice. Does Google not provide these, yet?

hansemannn avatar May 26 '22 18:05 hansemannn

It says they do in the release notes since version 7.69.0 back at the end of 2020. But this was for version 8.13.0 of the SDK now its change up to 9.5.0 and when I download it now it looks very different. So I'm not 100% sure where to start.

https://developers.google.com/admob/ios/download

dlewis23 avatar May 26 '22 18:05 dlewis23

Okay, so I updated all Admob SDK's to latest and removed the discontinued PersonalizedAdConsent framework and it's API's (while leaving an error log why it was removed). Basically now all thats left to migrate to .xcframework's is:

  • MaterialComponents.framework
  • MDFInternationalization.framework
  • MDFTextAccessibility.framework

They all relate to the material components SDK, which I think should not be part of this module. If some ad-service needs it, the best practive would be to make an own "shallow" module with just these modules, so it can be linked to the required ad service if needed. So it would be good to know why it's here and what we can do about it.

hansemannn avatar May 27 '22 08:05 hansemannn

This PR was very old, and in the meantime the other changes made in my fork have been added here. These Material frameworks have been added in order to use the AdMob Google Mobile Ads Mediation Test Suite But it is not essential, I had already created a module for this: https://github.com/Astrovic/ti.gmamts So we can remove it and use the separate module if necessary

Astrovic avatar May 27 '22 08:05 Astrovic