-
Notifications
You must be signed in to change notification settings - Fork 165
Added one missing and fixed one existing API definition. #585
base: main
Are you sure you want to change the base?
Conversation
Could this be merged? Native Ads are badly broken at the moment and I didn't manage to do a local build at all as the external dependencies are not downloading (maybe because the file is empty?). |
How can I compile this one to use in my project? |
You can only do it in a Mac and even then you need to install different versions of the tools that come pre-installed with MacOS. I managed to build nuggets with fixes with API Definitions for Native Ads and Rewarded Interstitials, if that's what you are looking for. |
Yeah. That is exactly what I am looking for. I am using Mac. Do you have some resources/steps to do it on the mac? I would be grateful if you have. We are falling behind. It is 10.x Admob out there. :( |
I didn't update version to 10, just fixed the API Definitions. I can upload the nuget files and you can add them manually if you want. I "solved" how to build a few months ago and honestly don't remember all the steps. It took several days to crack it all. |
Okay, you can just upload it. :) Thanks! It will solve my current problem after all. |
The nuget files are here: https://easyupload.io/m/sj1wvj (available for 7 days only). I think that's all you need and you hope you do not have other Firebase dependencies that conflict with them! |
Great. Thanks a lot! |
Also, a note on building: Most of my troubles with build were related to using an M1 Mac. If you have access to an x86 Mac you should have less trouble building. Essentially I had to update Mac tools for versions that supported x86, plus I had to manually input a command to switch to x86 mode. Reason was that some dependencies the cake tool requires are not available for ARM. Only after that did the build work (and even then some projects did not fully build). |
This was one of the steps: https://github.com/rbenv/rbenv |
I used that nuget and it solved one of my problems. But I would like to be on the latest version for many reasons. |
I didn't really try yet and didn't have time since I fixed my issues. |
The first thing would be to update the external dependencies. You can find the download urls inside the *.target files inside each project. I may try at some point to update them, refresh the externals folder and build. Although I expect problems to occur then lol. |
Hi, I managed to update my AdMob to version 10, although I have not fully tested everything yet. The way I did it was creating a bindings library with xcframeworks (look at manual download here: https://developers.google.com/admob/ios/quick-start#update_your_infoplist). After that I copied the generated code from the obj folder in the Mobile Ads project (generated by previous build on the Mac). You still need to be able to build this project on the Mac though to get the generated code. After testing I will move to update Firebase Analytics and Crashlytics (I get conflicts with this project version installed and app does not build) and then I can share the projects on a separate repo for you to clone and build. After that you should only need to update the xcframework files and fix any changes on api definitions that may show up in the future. I'll get back here when done :) |
Oh. That’s awesome. I cloned the branch(Admob 9.2 branch where admob version is bound to 9.3. That worked in my app via local nuget installation. But, the issue is Adloader delegate is always null even though it is just set. I don’t know if the latest version helps out to solve the issue. You can see the issue I have raisen here. I will be waiting for your repo with 10.x. Thanks man for your interest! |
So you were finally able to build the project? Then you can do that I said above to get V10. Regarding native and delegate, I fixed it by adding the missing delegate on API Definitions. When your app is running you should see on the console AdMob saying that the delegate doesn't have the expected parameters. You can find the existing delegates on API Definition file for MobileAds project, copy paste one of them and make the necessary changes (check Google Documentation / Source). |
I've ran into loads of issues with Firebase for Analytics and Crashlytics though :( I can build the libraries fine but then my app will fail to build with 100+ linking errors. It doesn't help that some xcframeworks that the original project used don't seem to exist anymore in version 10. I'll let you know if I can fix it. |
Thanks! I have also experienced the same issue after adding the protocol you mentioned to the api definition. It is built fine in frameworks. But, it fails with the linking errors after I use it in my app. |
I could update my app to use Mobile Ads 10, as it works 100% on its own, but I would lose Analytics and Crashlytics :( Will need up dedicate more time to this but won't really have it from next week as I'll start working with a new client (all this is for my own apps). |
I have managed to solve some of the linking problems by adding the xcframeworks on my app project instead of the library projects and Firebase Analytics 10 working. Will try now the Crashlytics and Core. |
There was also a fix for Swift dependencies that I got from here: xamarin/xamarin-macios#17179 |
Great news. Looking forward to seeing it :) |
It's all working fine now :) I still have to test if the DSYM file is being sent to Crashlytics on a Release build though!
9 - Add the xcframework files the project requires to your Xamarin.iOS app project.
In regards to Google Mobile Ads, you can download the necessary files here, where it says manual download: If you still have issues, the console might point you the right direction. If you have linking issues, googling the missing class usually helps you find the frawework missing, if any. Good luck! |
Comment updated! |
I'll try that out on the first occasion. Thanks for the great explanation! |
By the way, do not forget to update the Output filename from NativeLibrary lol.. I did not initially and it was removing the reference everytime I was adding a new one haha. |
ICustomNativeAdLoaderDelegate
was missing, preventing the ability to receive a Custom Native Ad that was requested.CustomClickHandler
also needs aset
method, so the handler can be overridden to change or prevent default click behavior when desired.