-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS only in developer mode CreatePlatformView exception with SampleMMTAdmob #66
Comments
Let me investigate the issue and I'll update you asap. |
I'm just tried to run it on my iPad and the sample app works fine. Let me know if it solves the issue |
Same error, I am a newb with mobile development so there is that.... I'm trying to run as "iOS Local Device" in Visual Studio and not doing a build and deploying. Below is full run log from that attempt and thank you Loaded assembly: /private/var/containers/Bundle/Application/AA94EDA5-D8ED-43D8-B889-C5C5C5EDF628/MMTAdmobSample.app/System.Private.CoreLib.dll [External] 2024-02-20 08:01:38.172 Xamarin.PreBuilt.iOS[1271:450102] App path /var/mobile/Containers/Data/Application/25C85019-F563-4610-BD78-82524C61B221/Documents/MMTAdmobSample.content/MMTAdmobSample.dll Loaded assembly: /private/var/mobile/Containers/Data/Application/25C85019-F563-4610-BD78-82524C61B221/Documents/MMTAdmobSample.content/Microsoft.Maui.Controls.dll [External] Thread started: #4 2024-02-20 08:01:38.615 Xamarin.PreBuilt.iOS[1271:450102] Consent module is not available. Try on a real device. Loaded assembly: /private/var/mobile/Containers/Data/Application/25C85019-F563-4610-BD78-82524C61B221/Documents/MMTAdmobSample.content/System.IO.FileSystem.dll [External] 2024-02-20 08:01:40.613 Xamarin.PreBuilt.iOS[1271:450102] Could not resolve assembly Xamarin.HotReload.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/25C85019-F563-4610-BD78-82524C61B221/Documents/MMTAdmobSample.content/Xamarin.HotReload.Contracts.dll' or one of its dependencies. Resolved pending breakpoint for 'Xamarin.HotReload.HotReloadAgent.BreakpointSendToIde(System.String)' to D:\a_work\1\s\HotReload\Source\Xamarin.HotReload.Agent\HotReloadAgent.cs:423 [0x00000]. 2024-02-20 08:01:40.814 Xamarin.PreBuilt.iOS[1271:450102] Could not resolve assembly Xamarin.HotReload.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. Details: Could not load file or assembly '/var/mobile/Containers/Data/Application/25C85019-F563-4610-BD78-82524C61B221/Documents/MMTAdmobSample.content/Xamarin.HotReload.Contracts.dll' or one of its dependencies. 2024-02-20 08:01:40.882 Xamarin.PreBuilt.iOS[1271:450102] MTAdmob correctly licensed 2024-02-20 08:01:40.900 Xamarin.PreBuilt.iOS[1271:450102] You've implemented -[ application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist. Thread started: #9 |
This afternoon I'll try to release a new version of the plugin, and before releasing it I'll check if there is something wrong with the current version and I'll also update the sample code (also adding the one for .net 7). Could you let me know about your environment? I would suggest you to build and debug your app from visual studio for Mac. Also, the consent on the simulator might not work correctly but it works on a real device (you can read it from the log). |
My development environment is Windows 11 23H2 OS Build 22631.3155 USB connected iPhone Remote MAC
|
I've never used a remote MAC, I always connect my iPad directly on the MAC. |
I'm investigating the issue. |
Yesterday I've released version 1.3.0. Also I've noticed that xcode 15.2 causes a lot of issues with Xamarin & MAUI. |
getting some compile issues with sample project
|
because the sample project wasn't updated yet... |
more build errors -
|
I also got a weird message about not having the correct tags -it had so I changed to ` |
I know, it's an error of that package. |
Any news? |
removed all code and did a git clone to local windows environment
|
I'm having the exact same issue as CalypsoSys. I cloned the repo fresh, opened in VS on Windows machine, connected a physical iPhone 14 to my Windows machine, selected my iPhone as the build target. I'll switch to my Macbook tomorrow and use the same steps there. Also note it builds fine for local physical Android device. UPDATE: I added my license key to my code base and now it builds to the physical iOS device, but now fails when initializing the interstal ads with this line: CrossMauiMTAdmob.Current.LoadInterstitial(INTERSTITIALID); See issue #72 for more details. |
Version 1.6.1 should solve the issue with the CreatePlatformView. |
Thread started: #9
Thread started: #10
Thread started: #11
[0:] An error occurred: '__Internal'. Callstack: ' at Plugin.MauiMTAdmob.Platforms.iOS.MTAdViewHandler.CreatePlatformView()
at Microsoft.Maui.Handlers.ViewHandler
2[[Plugin.MauiMTAdmob.Interfaces.IMTAdView, Plugin.MauiMtAdmob, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null],[Google.MobileAds.BannerView, Google.MobileAds, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].OnCreatePlatformView() at Microsoft.Maui.Handlers.ViewHandler.OnCreatePlatformElement() at Microsoft.Maui.Handlers.ElementHandler.CreatePlatformElement() at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view) at Microsoft.Maui.Handlers.ViewHandler
2[[Plugin.MauiMTAdmob.Interfaces.IMTAdView, Plugin.MauiMtAdmob, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null],[Google.MobileAds.BannerView, Google.MobileAds, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IView view)at Plugin.MauiMTAdmob.Platforms.iOS.MTAdViewHandler.SetVirtualView(IView view)
at Microsoft.Maui.Handlers.ViewHandler
2[[Plugin.MauiMTAdmob.Interfaces.IMTAdView, Plugin.MauiMtAdmob, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null],[Google.MobileAds.BannerView, Google.MobileAds, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view) at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view) at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.ILayout, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.LayoutView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view)at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value)
at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
at Microsoft.Maui.Controls.Handlers.Compatibility.VisualElementRenderer
1[[Microsoft.Maui.Controls.Frame, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].ProcessAutoPackage(IElement element) at Microsoft.Maui.Controls.Handlers.Compatibility.VisualElementRenderer
1[[Microsoft.Maui.Controls.Frame, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view, IPlatformViewHandler nativeViewHandler, Action1 onElementChanged, Frame& currentVirtualView, IPropertyMapper& _mapper, IPropertyMapper _defaultMapper, Boolean autoPackage) at Microsoft.Maui.Controls.Handlers.Compatibility.VisualElementRenderer
1[[Microsoft.Maui.Controls.Frame, Microsoft.Maui.Controls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].Microsoft.Maui.IElementHandler.SetVirtualView(IElement view)at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value)
at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view)
at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.ILayout, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.LayoutView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view) at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) at Microsoft.Maui.Handlers.ScrollViewHandler.UpdateContentView(IScrollView scrollView, IScrollViewHandler handler, ICrossPlatformLayout crossPlatformLayout) at Microsoft.Maui.Handlers.ScrollViewHandler.MapContent(IScrollViewHandler handler, IScrollView scrollView) at Microsoft.Maui.PropertyMapper
2.<>c__DisplayClass5_0[[Microsoft.Maui.IScrollView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Handlers.IScrollViewHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].b__0(IElementHandler h, IElement v)at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view)
at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.IScrollView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[UIKit.UIScrollView, Microsoft.iOS, Version=17.2.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].SetVirtualView(IView view) at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.IScrollView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[UIKit.UIScrollView, Microsoft.iOS, Version=17.2.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].SetVirtualView(IElement view)at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value)
at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
at Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view)
at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.ILayout, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.LayoutView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view) at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value) at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context) at Microsoft.Maui.Handlers.ContentViewHandler.UpdateContent(IContentViewHandler handler) at Microsoft.Maui.Handlers.ContentViewHandler.MapContent(IContentViewHandler handler, IContentView page) at Microsoft.Maui.PropertyMapper
2.<>c__DisplayClass5_0[[Microsoft.Maui.IContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Handlers.IContentViewHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].b__0(IElementHandler h, IElement v)at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView)
at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view)
at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.IContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.ContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IView view) at Microsoft.Maui.Handlers.ContentViewHandler.SetVirtualView(IView view) at Microsoft.Maui.Handlers.ViewHandler
2[[Microsoft.Maui.IContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Platform.ContentView, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].SetVirtualView(IElement view)at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Controls.VisualElement.Microsoft.Maui.IElement.set_Handler(IElementHandler value)
at Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.ToUIViewController(IElement view, IMauiContext context)
at Microsoft.Maui.Handlers.WindowHandler.MapContent(IWindowHandler handler, IWindow window)
at Microsoft.Maui.PropertyMapper
2.<>c__DisplayClass5_0[[Microsoft.Maui.IWindow, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Microsoft.Maui.Handlers.IWindowHandler, Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].<Add>b__0(IElementHandler h, IElement v) at Microsoft.Maui.PropertyMapper.UpdatePropertyCore(String key, IElementHandler viewHandler, IElement virtualView) at Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView) at Microsoft.Maui.Handlers.ElementHandler.SetVirtualView(IElement view) at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler) at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value) at Microsoft.Maui.Platform.ElementExtensions.SetHandler(INativeObject nativeElement, IElement element, IMauiContext context) at Microsoft.Maui.Platform.ElementExtensions.SetWindowHandler(UIWindow platformWindow, IWindow window, IMauiContext context) at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(IApplication application, UIWindowScene windowScene, NSDictionary[] states) at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(IUIApplicationDelegate platformApplication, IApplication application, UIApplication uiApplication, NSDictionary launchOptions) at Microsoft.Maui.MauiUIApplicationDelegate.FinishedLaunching(UIApplication application, NSDictionary launchOptions) at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 58 at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94 at MMTAdmobSample.Program.Main(String[] args) in C:\Code\MauiMTAdmob\SampleMMTAdmob\Platforms\iOS\Program.cs:line 13 at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args) at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span
1 copyOfArgs, BindingFlags invokeAttr)'The app has been terminated.
The text was updated successfully, but these errors were encountered: