MTAdmob icon indicating copy to clipboard operation
MTAdmob copied to clipboard

Build fails on iOS physical device - works with simulators

Open ShadowOfPhantom opened this issue 2 years ago • 0 comments

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

ShadowOfPhantom avatar Feb 13 '22 00:02 ShadowOfPhantom