https://github.com/erossini/mmtadmobsample
Example how to use MMTAdmobSample with NET8
https://github.com/erossini/mmtadmobsample
Last synced: 7 months ago
JSON representation
Example how to use MMTAdmobSample with NET8
- Host: GitHub
- URL: https://github.com/erossini/mmtadmobsample
- Owner: erossini
- Created: 2024-03-07T08:40:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-07T10:17:12.000Z (over 1 year ago)
- Last Synced: 2025-01-12T10:07:19.195Z (9 months ago)
- Language: C#
- Size: 222 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MMTAdmobSample
Example of how to use [MMTAdmobSample](https://github.com/marcojak/MauiMTAdmob) with [NET8](https://puresourcecode.com/tag/net8/). My focus is on the iOS version and in particular on rewarded advertisement. The first reward is displayed but the following is not.## Fix for iOS
When I run the project, I get this error
> /usr/local/share/dotnet/packs/Microsoft.iOS.Sdk/17.0.8478/targets/Xamarin.Shared.Sdk.targets(3,3): Error: clang++ exited with code 1:
> Undefined symbols for architecture arm64:
> "OBJC_CLASS$_UMPConsentForm", referenced from:
> objc-class-ref in registrar.o
> "OBJC_CLASS$_UMPConsentInformation", referenced from:
> objc-class-ref in registrar.o
> "OBJC_CLASS$_UMPDebugSettings", referenced from:
> objc-class-ref in registrar.o
> "OBJC_CLASS$_UMPRequestParameters", referenced from:
> objc-class-ref in registrar.o
> ld: symbol(s) not found for architecture arm64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)To fix the error, only for iOS, I have to add those packages:
- Xamarin.Google.iOS.MobileAds
- Xamarin.Google.iOS.UserMessagingPlatformFor that, you can add the packages from Visual Studio or edit the project and add those lines:
```xml
```
## Steps
### First example
- Open the example app
- Tap on **Load** the reward
- Tap on **Show** the reward
- Waiting and closing the reward
- Tap on **Load** the reward again
- Tap on **Show** the reward -> not displaying### Second example
- Open the example app
- Tap on **Load** the reward
- Tap on **Show** the reward
- Waiting and closing the reward
- Tap on **Show** the reward -> not displaying## Video
As you can see in the video, the first reward is displayed but after that no one is displayed. Only if I close the app and open it again, the reward is displayed again.
https://github.com/erossini/MMTAdmobSample/assets/9497415/449671fa-da4b-4654-9208-ddeac949c97d