This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
CarouselView on iOS in XamarinForms 3.6: System.InvalidCastException: Specified cast is not valid. #5488
Labels
a/carouselview
in-progress
This issue has an associated pull request that may resolve it!
p/iOS 🍎
t/bug 🐛
Milestone
Comments
@Ferenesht Can you please attach your sample project? Thanks! |
I have the same issue |
I have this issue with the 3.5 version. |
3 tasks
CarouselView is not implemented yet, you could check the the branch we are working on https://github.com/xamarin/Xamarin.Forms/tree/spec-carousel I can get you some nupkg to test if you want . |
14 tasks
Well, I can confirm that this worked on Android on the version posted, but not on the latest master. |
@Ferenesht the long and the short of it is that we don't really have a CV for you to preview at the moment. We got re-tasked to getting Shell working. So please stay tuned after Shell ships for new on CV. Gonna close this bug out for now but feel free to re-open once we get a public CV released to preview. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
a/carouselview
in-progress
This issue has an associated pull request that may resolve it!
p/iOS 🍎
t/bug 🐛
Description
When trying to use the CarouselView after updating to Xamarin Forms 3.6 the iOS app crashes in the Main function of the Application class with the following exception:
System.InvalidCastException: Specified cast is not valid.
The CarouselView works perfect on Android without any issues.
Stacktrace:
{System.InvalidCastException: Specified cast is not valid.
at (wrapper castclass) System.Object.__castclass_with_cache(object,intptr,intptr)
at Xamarin.Forms.Internals.Registrar
1[TRegistrable].GetHandler (System.Type type, System.Type visualType) [0x00030] in D:\a\1\s\Xamarin.Forms.Core\Registrar.cs:56 at Xamarin.Forms.Internals.Registrar
1[TRegistrable].GetHandlerForObject[TOut] (System.Object obj) [0x0002c] in D:\a\1\s\Xamarin.Forms.Core\Registrar.cs:91at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00005] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].SetElement (TElement element) [0x000de] in <0648e2dffe9e4201b8c6e274ced6579f>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer
1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <0648e2dffe9e4201b8c6e274ced6579f>:0at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnChildAdded (Xamarin.Forms.VisualElement view) [0x0003d] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.VisualElementPackager.Load () [0x0001e] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.PageRenderer.ViewDidLoad () [0x00086] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at (wrapper managed-to-native) ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper(intptr,intptr)
at UIKit.UIViewController.get_View () [0x0002a] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.15/src/Xamarin.iOS/UIKit/UIViewController.g.cs:2983
at Xamarin.Forms.Platform.iOS.PageRenderer.get_NativeView () [0x00008] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.PageRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0004f] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.Platform.CreateRenderer (Xamarin.Forms.VisualElement element) [0x00014] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.Platform.AddChild (Xamarin.Forms.VisualElement view) [0x00027] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.Platform.WillAppear () [0x00043] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.PlatformRenderer.ViewWillAppear (System.Boolean animated) [0x00016] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr(intptr,intptr,intptr)
at UIKit.UIWindow.set_RootViewController (UIKit.UIViewController value) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.15/src/Xamarin.iOS/UIKit/UIWindow.g.cs:335
at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.UpdateMainPage () [0x00043] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.ApplicationOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs args) [0x00012] in <0648e2dffe9e4201b8c6e274ced6579f>:0
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:173
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in D:\a\1\s
Any ideas how to make the CarouselView work on iOS?
The text was updated successfully, but these errors were encountered: