marcojak / MTAdmob

Admob plugin for Xamarin Android and iOS
https://www.xamarinexpert.it/admob-made-easy/
160 stars 26 forks source link

Build fails on iOS physical device - works with simulators #95

Closed ShadowOfPhantom closed 1 year ago

ShadowOfPhantom commented 2 years ago

When I'm trying to deploy an app to my physical device it fails and says "Could not AOT the assembly":

2>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(254,3): error MT3001: Could not AOT the assembly '/Users/myname/Library/Caches/Xamarin/mtbs/builds/BigVoicy.iOS/457d748bf590932e857801503d02cf86f2a3ac976bb577a9ba10729fa117f5b3/obj/iPhone/Debug/mtouch-cache/3-Build/Plugin.MtAdmob.dll'

It successfully deploys on a simulator but then fails with error: System.TypeLoadException: 'Invalid type MarcTron.Plugin.Services.RewardService for instance field MarcTron.Plugin.MTAdmobImplementation:rewardService' (attached a screenshot)

image

Is there any ideas how to fix that issue? 🤔

iOS 15.3, iPhone 13 PRO