mvvmcross / mvvmcross-iossupport Goto Github PK
View Code? Open in Web Editor NEWiOS support packages for MvvmCross: The .NET MVVM framework for cross-platform solutions
Home Page: http://mvvmcross.com
iOS support packages for MvvmCross: The .NET MVVM framework for cross-platform solutions
Home Page: http://mvvmcross.com
I am using the latest Xamarin version and MvvmCross 4.3.0
The problems occurs when I navigate from screen to screen randomly. Let's say I have an home screen and from there I go to UIViewController A then I go back to Home, then I go to UIViewController B and then back to home again, then I go to UIViewController A again and then back to home again, after I go to B again it sometimes breaks...
As an actual behavior it somehow mixed the view models and because the outlets are not there it just breaks and crashes.
Version: 4.3
Platform: iOS
Stacktrace:
Unable to cast object of type 'GoWorky.Mobile.iOS.Employer.ChooseManagerViewController' (Objective-C type: 'ChooseLocationViewController') to type 'GoWorky.Mobile.iOS.Employer.ChooseLocationViewController'.
Additional information:
Selector: setTableView:
Method: GoWorky.Mobile.iOS.Employer.ChooseLocationViewController:set_TableView (UIKit.UITableView)
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/3859/b638977c/source/xamarin-macios/src/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/3859/b638977c/source/xamarin-macios/src/UIKit/UIApplication.cs:63
at GoWorky.Mobile.iOS.Employer.Application.Main (System.String[] args) [0x00009] in /Users/flaviusdemian/projects/UpWorky/UpWorky.Mobile/GoWorky.Mobile.iOS.Employer/Main.cs:14
The idea is that it has a confusion with the previous view controller I was besides Home - at some point it swaps UIViewController A with UIViewController B.
I can provide more data if needed.
Here you have the mvx trace:
mvx: Diagnostic: 114.11 Showing ViewModel ChooseLocationViewModel
iOSNavigation: Diagnostic: 114.11 Navigate requested
mvx: Warning: 114.13 Hint ignored MvxActivePanelPresentationHint
mvx: Diagnostic: 115.76 Requesting presentation change
mvx: Warning: 115.76 Hint ignored MvxClosePresentationHint
mvx: Diagnostic: 117.18 Showing ViewModel ChooseLocationViewModel
iOSNavigation: Diagnostic: 117.18 Navigate requested
mvx: Warning: 117.19 Hint ignored MvxActivePanelPresentationHint
mvx: Diagnostic: 118.18 Showing ViewModel AddLocationDialogViewModel
iOSNavigation: Diagnostic: 118.18 Navigate requested
mvx: Warning: 118.20 Hint ignored MvxActivePanelPresentationHint
mvx: Diagnostic: 122.92 Showing ViewModel ChooseManagerViewModel
iOSNavigation: Diagnostic: 122.92 Navigate requested
mvx: Warning: 122.93 Hint ignored MvxActivePanelPresentationHint
mvx: Diagnostic: 124.63 Requesting presentation change
mvx: Warning: 124.63 Hint ignored MvxClosePresentationHint
mvx: Diagnostic: 126.03 Showing ViewModel ChooseManagerViewModel
iOSNavigation: Diagnostic: 126.03 Navigate requested
mvx: Warning: 126.04 Hint ignored MvxActivePanelPresentationHint
mvx: Diagnostic: 127.08 Showing ViewModel AddManagerDialogViewModel
iOSNavigation: Diagnostic: 127.08 Navigate requested
mvx: Warning: 127.10 Hint ignored MvxActivePanelPresentationHint
Thread finished: #11
Thread started: #20
mvx: Diagnostic: 130.85 Showing ViewModel ChooseLocationViewModel
iOSNavigation: Diagnostic: 130.85 Navigate requested
mvx: Warning: 130.86 Hint ignored MvxActivePanelPresentationHint
Archive.zip
I downloaded the MvvmCross-iOSSupport repro to have a look at the new stuff. There are a couple of small issues with the CSPROJ
The MvvmCross.iOS.Support project has a SidePanels folder.
The current (version 4.4.0) implementation of the Xamarin Sidebar component always shows a "Menu" link button on the left and right side of the navigation bar, even when no left or right menu implementations are provided.
I am currently working on a fix.
ExpandableTableView should support "Accordion Expand" - that means:
at same time only one item can be expanded/collapsed.
Like in title.
This is needed so some fancy animations like expand arrow rotation can be implemented.
https://github.com/MvvmCross/MvvmCross-iOSSupport/issues/53> Please only file bugs verified on latest version of MvvmCross and stable Xamarin tools
I have the latest stable:
Apple Developer Tools
Xcode 8.1 (11544)
Build 8B62
Xamarin.iOS
Version: 10.2.0.4 (Xamarin Studio Community)
Hash: b638977
Branch: xcode8.1
Build date: 2016-10-25 14:38:48-0400
It should not thrown any navigation exception because when it is broken the NavigationViewController stack is not working properly!
Version: 4.4
Platform: iOS
Stack Trace:
Exception is: Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: <Common_MvxMultiPanelController: 0x1381cbda0>: An -observeValueForKeyPath:ofObject:change:context: message was received but not handled.
Key path: view
Observed object: <UINavigationController: 0x1379be400>
Change: {
kind = 1;
}
Context: 0x105e9a4d0
Native stack trace:
0 CoreFoundation 0x0000000180bd2dc8 + 148
1 libobjc.A.dylib 0x0000000180237f80 objc_exception_throw + 56
2 CoreFoundation 0x0000000180bd2cf8 + 0
3 Foundation 0x0000000181578ac0 + 164
4 0x0000000100100950 -[JASidePanelController observeValueForKeyPath:ofObject:change:context:] + 132
5 Foundation 0x00000001814cff64 + 304
6 Foundation 0x00000001814e99fc + 220
7 Foundation 0x00000001814e97bc + 124
8 libJASidePanels.dll.dylib 0x0000000105e83804 -[JASidePanelController setCenterPanel:] + 248
9 libJASidePanels.dll.dylib 0x0000000105e93308 wrapper_managed_to_native_ApiDefinition_Messaging_void_objc_msgSendSuper_IntPtr_intptr_intptr_intptr + 216
10 libJASidePanels.dll.dylib 0x0000000105e8d564 JASidePanels_JASidePanelController_set_CenterPanel_UIKit_UIViewController + 612
11 dylib 0x00000001058a8ec0 Common_CustomMvxSidePanelsPresenter_ShowFirstView_UIKit_UIViewController + 544
12 dylib 0x00000001058a69d8 Common_CustomMvxSidePanelsPresenter_Show_MvvmCross_iOS_Views_IMvxIosView + 1336
13 libMvvmCross.iOS.dll.dylib 0x000000010550d9fc MvvmCross_iOS_Views_Presenters_MvxIosViewPresenter_Show_MvvmCross_Core_ViewModels_MvxViewModelRequest + 204
14 libMvvmCross.iOS.dll.dylib 0x00000001055122a4 MvvmCross_iOS_Views_MvxIosViewDispatcher__c__DisplayClass2_0__ShowViewModelb__0 + 276
15 libMvvmCross.iOS.dll.dylib 0x00000001055069f0 MvvmCross_iOS_Views_MvxIosUIThreadDispatcher_RequestMainThreadAction_System_Action + 288
16 libMvvmCross.iOS.dll.dylib 0x000000010550658c MvvmCross_iOS_Views_MvxIosViewDispatcher_ShowViewModel_MvvmCross_Core_ViewModels_MvxViewModelRequest + 380
17 libGoWorky.Mobile.iOS.Common.dll.dylib 0x000000010589c388 GoWorky_Mobile_iOS_Common_Services_NavigationService_ShowViewModelFromOutsideOfMvvmCross_T_REF_System_Collections_Generic_IDictionary_2_string_string + 408
18 libGoWorky.Mobile.iOS.Employer.exe.dylib 0x000000010073baf0 GoWorky_Mobile_iOS_Employer_AppDelegate_FinishedLaunching_UIKit_UIApplication_Foundation_NSDictionary + 1712
19 libmscorlib.dll.dylib 0x0000000100e7d534 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
20 libmonosgen-2.0.dylib 0x00000001004021dc mono_jit_runtime_invoke + 1772
21 libmonosgen-2.0.dylib 0x0000000100472d0c do_runtime_invoke + 112
22 libmonosgen-2.0.dylib 0x0000000100472c68 mono_runtime_invoke + 208
23 GoWorky.Mobile.iOS.Employer 0x000000010018fd54 ZL31native_to_managed_trampoline_48P11objc_objectP13objc_selectorPP11_MonoMethodP13UIApplicationP12NSDictionaryPKcSB_SB_SB + 692
24 GoWorky.Mobile.iOS.Employer 0x000000010018fa90 -[AppDelegate application:didFinishLaunchingWithOptions:] + 96
25 UIKit 0x0000000185daa9c0 + 400
26 UIKit 0x0000000185fda184 + 2904
27 UIKit 0x0000000185fde5f0 + 1684
28 UIKit 0x0000000185fdb764 + 168
29 FrontBoardServices 0x00000001825737ac + 36
30 FrontBoardServices 0x0000000182573618 + 168
31 FrontBoardServices 0x00000001825739c8 + 56
32 CoreFoundation 0x0000000180b8909c + 24
33 CoreFoundation 0x0000000180b88b30 + 540
34 CoreFoundation 0x0000000180b86830 + 724
35 CoreFoundation 0x0000000180ab0c50 CFRunLoopRunSpecific + 384
36 UIKit 0x0000000185da394c + 460
37 UIKit 0x0000000185d9e088 UIApplicationMain + 204
38 libXamarin.iOS.dll.dylib 0x00000001009d24f4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 324
39 libXamarin.iOS.dll.dylib 0x000000010096057c UIKit_UIApplication_Main_string___intptr_intptr + 44
40 libXamarin.iOS.dll.dylib 0x000000010096053c UIKit_UIApplication_Main_string___string_string + 172
41 libGoWorky.Mobile.iOS.Employer.exe.dylib 0x000000010073b094 GoWorky_Mobile_iOS_Employer_Application_Main_string_ + 196
42 libmscorlib.dll.dylib 0x0000000100e7d534 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
43 libmonosgen-2.0.dylib 0x00000001004021dc mono_jit_runtime_invoke + 1772
44 libmonosgen-2.0.dylib 0x0000000100472d0c do_runtime_invoke + 112
45 libmonosgen-2.0.dylib 0x00000001004752f0 mono_runtime_exec_main + 832
46 libmonosgen-2.0.dylib 0x0000000100474f0c mono_runtime_run_main + 764
47 libmonosgen-2.0.dylib 0x00000001003e67f8 mono_jit_exec + 236
48 libxamarin-debug.dylib 0x00000001006ddcd8 xamarin_main + 2168
49 GoWorky.Mobile.iOS.Employer 0x00000001001a986c main + 96
50 libdyld.dylib 0x000000018064e8b8 + 4
at (wrapper managed-to-native) ApiDefinition.Messaging:void_objc_msgSendSuper_IntPtr (intptr,intptr,intptr)
at JASidePanels.JASidePanelController.set_CenterPanel (UIKit.UIViewController value) [0x00061] in <1ac433a8189e442a9703ae131fdc616e>:0
at GoWorky.Mobile.iOS.Common.CustomMvxSidePanelsPresenter.ShowFirstView (UIKit.UIViewController viewController) [0x00033] in /Users/flaviusdemian/projects/UpWorky/UpWorky.Mobile/GoWorky.Mobile.iOS.Common/UI/Presenter/CustomMvxSidePanelsPresenter.cs:562 0 CoreFoundation 0x0000000180bd2dc8 + 148
1 libobjc.A.dylib 0x0000000180237f80 objc_exception_throw + 56
2 CoreFoundation 0x0000000180bd2cf8 + 0
3 Foundation 0x0000000181578ac0 + 164
4 GoWorky.Mobile.iOS.Employer 0x0000000100100950 -[JASidePanelController observeValueForKeyPath:ofObject:change:context:] + 132
5 Foundation 0x00000001814cff64 + 304
6 Foundation 0x00000001814e99fc + 220
7 Foundation 0x00000001814e97bc + 124
8 libJASidePanels.dll.dylib 0x0000000105e83804 -[JASidePanelController setCenterPanel:] + 248
9 libJASidePanels.dll.dylib 0x0000000105e93308 wrapper_managed_to_native_ApiDefinition_Messaging_void_objc_msgSendSuper_IntPtr_intptr_intptr_intptr + 216
10 libJASidePanels.dll.dylib 0x0000000105e8d564 JASidePanels_JASidePanelController_set_CenterPanel_UIKit_UIViewController + 612
11 libGoWorky.Mobile.iOS.Common.dll.dylib 0x00000001058a8ec0 GoWorky_Mobile_iOS_Common_CustomMvxSidePanelsPresenter_ShowFirstView_UIKit_UIViewController + 544
12 libGoWorky.Mobile.iOS.Common.dll.dylib 0x00000001058a69d8 GoWorky_Mobile_iOS_Common_CustomMvxSidePanelsPresenter_Show_MvvmCross_iOS_Views_IMvxIosView + 1336
13 libMvvmCross.iOS.dll.dylib 0x000000010550d9fc MvvmCross_iOS_Views_Presenters_MvxIosViewPresenter_Show_MvvmCross_Core_ViewModels_MvxViewModelRequest + 204
14 libMvvmCross.iOS.dll.dylib 0x00000001055122a4 MvvmCross_iOS_Views_MvxIosViewDispatcher__c__DisplayClass2_0__ShowViewModelb__0 + 276
15 libMvvmCross.iOS.dll.dylib 0x00000001055069f0 MvvmCross_iOS_Views_MvxIosUIThreadDispatcher_RequestMainThreadAction_System_Action + 288
16 libMvvmCross.iOS.dll.dylib 0x000000010550658c MvvmCross_iOS_Views_MvxIosViewDispatcher_ShowViewModel_MvvmCross_Core_ViewModels_MvxViewModelRequest + 380
17 libGoWorky.Mobile.iOS.Common.dll.dylib 0x000000010589c388 GoWorky_Mobile_iOS_Common_Services_NavigationService_ShowViewModelFromOutsideOfMvvmCross_T_REF_System_Collections_Generic_IDictionary_2_string_string + 408
18 libGoWorky.Mobile.iOS.Employer.exe.dylib 0x000000010073baf0 GoWorky_Mobile_iOS_Employer_AppDelegate_FinishedLaunching_UIKit_UIApplication_Foundation_NSDictionary + 1712
19 libmscorlib.dll.dylib 0x0000000100e7d534 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
20 libmonosgen-2.0.dylib 0x00000001004021dc mono_jit_runtime_invoke + 1772
21 libmonosgen-2.0.dylib 0x0000000100472d0c do_runtime_invoke + 112
22 libmonosgen-2.0.dylib 0x0000000100472c68 mono_runtime_invoke + 208
23 GoWorky.Mobile.iOS.Employer 0x000000010018fd54 ZL31native_to_managed_trampoline_48P11objc_objectP13objc_selectorPP11_MonoMethodP13UIApplicationP12NSDictionaryPKcSB_SB_SB + 692
24 GoWorky.Mobile.iOS.Employer 0x000000010018fa90 -[AppDelegate application:didFinishLaunchingWithOptions:] + 96
25 UIKit 0x0000000185daa9c0 + 400
26 UIKit 0x0000000185fda184 + 2904
27 UIKit 0x0000000185fde5f0 + 1684
28 UIKit 0x0000000185fdb764 + 168
29 FrontBoardServices 0x00000001825737ac + 36
30 FrontBoardServices 0x0000000182573618 + 168
31 FrontBoardServices 0x00000001825739c8 + 56
32 CoreFoundation 0x0000000180b8909c + 24
33 CoreFoundation 0x0000000180b88b30 + 540
34 CoreFoundation 0x0000000180b86830 + 724
35 CoreFoundation 0x0000000180ab0c50 CFRunLoopRunSpecific + 384
36 UIKit 0x0000000185da394c + 460
37 UIKit 0x0000000185d9e088 UIApplicationMain + 204
38 libXamarin.iOS.dll.dylib 0x00000001009d24f4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 324
39 libXamarin.iOS.dll.dylib 0x000000010096057c UIKit_UIApplication_Main_string___intptr_intptr + 44
40 libXamarin.iOS.dll.dylib 0x000000010096053c UIKit_UIApplication_Main_string___string_string + 172
41 libGoWorky.Mobile.iOS.Employer.exe.dylib 0x000000010073b094 GoWorky_Mobile_iOS_Employer_Application_Main_string__ + 196
42 libmscorlib.dll.dylib 0x0000000100e7d534 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
43 libmonosgen-2.0.dylib 0x00000001004021dc mono_jit_runtime_invoke + 1772
44 libmonosgen-2.0.dylib 0x0000000100472d0c do_runtime_invoke + 112
45 libmonosgen-2.0.dylib 0x00000001004752f0 mono_runtime_exec_main + 832
46 libmonosgen-2.0.dylib 0x0000000100474f0c mono_runtime_run_main + 764
47 libmonosgen-2.0.dylib 0x00000001003e67f8 mono_jit_exec + 236
48 libxamarin-debug.dylib 0x00000001006ddcd8 xamarin_main + 2168
49 GoWorky.Mobile.iOS.Employer 0x00000001001a986c main + 96
50 libdyld.dylib 0x000000018064e8b8 + 4
2016-11-06 20:36:41.878 GoWorky.Mobile.iOS.Employer[506:128384] mvx: Diagnostic: 8.72 Showing ViewModel MenuViewModel
2016-11-06 20:36:41.878 GoWorky.Mobile.iOS.Employer[506:128384] iOSNavigation: Diagnostic: 8.72 Navigate requested
I'm wondering which are the differences between these two components...
Becase I'm not sure about which one I should choose for a project of mine.
This is my basic understanding:
Are these statement correct?
Moreover, do exists any relevant differences in the features provided by these components?
The current implementation of MvxTabsPresenter forces the user to use hard-coded strings to set each tab's title and icon through presentationValues
parameter of ShowViewModel
method.
Both attributes should be set when defining that a view will be presented as a tab.
I'll PR this in a few seconds.
Only swiped cell must be moved.
Version: 4.4.0
Platform: iOS
In the MvxExpandableTableViewSource
:
link
In the GetViewForHeader
method, there is a new button added to the header every time the method is called.
As the header is obtained through the GetOrCreateHeaderCellFor
method, the cell may have already been created and is being reused. Therefore you will have multiple buttons added to the same header
, all calling the EventHandler
method with different section
's.
Able to Tap on right side bar menu items
Not able to tap on right side bar menu items
Platform: iOS
Info on issue:
Seems be in class MvxSidebarPanelController and if interchange right and left side bar, i can able to tap.
LeftSidebarController = new SidebarController(_subRootViewController, NavigationController, initialEmptySideMenu);
RightSidebarController = new SidebarController(this, _subRootViewController, initialEmptySideMenu);
Currently the sample applications do not make use of the MvxExpandableTableViewSource in order to demonstrate its use and functionality. This should be added in a future version of the library.
As mentioned in #36 (comment) something is wrong with the build settings for the sample, so it won't run on Sim without having provisioning profiles.
Needs fixing.
Can be reproduced in current MvvmCross-iOSSupport.Samples (commit c56c97f).
Hamburger icon should always be visible
Hamburger icon disappears after tapping on first menu element
Version: 4.2.3
Platform: iOS
NOTE: calling ShowMenu for every newly-opened screen does make the Hamburger icon reappear, but it isn't a viable solution because it creates a new instance of the menu
As the title says, when no menu is displayed (no ShowViewModel<>() call for any of the menus) the right menu can still be opened with a pan gesture and a black view is displayed.
Maybe the presenter is intented to always display a side panel, but there are some cases (like a login screen) where no menu is required.
Open iOS-Support solution and set MvvmCross.iOS.Support.XamarinSidebarSample.iOS as startup project.
Run sample
The right panel shouldn't be opened when performing a pan gesture.
The right panel is opened when performing a pan gesture.
Latest and greatest Mvx!
Version: > 4.4, source version (no nuget)
Platform: iOS
Looks like MvvmCross.iOS.Support.nuspec is embedding some temporary *.cs files in the final package currently distributed on NuGet. The package contains the lib\Xamarin.iOS10\obj
with 3 TemporaryGeneratedFile_*.cs
file in each Debug and Release.
The problem seems to come from this line of code but I am not filling confident to PR on this as I currently do not understand why it is there in the first place (no nuget background, sorry).
After this commit, title and icon can only be set with the MvxTabPresentation annotation:
[MvxTabPresentation(MvxTabPresentationMode.Tab, "Tab 2", "ic_tabbar_menu", true)]
However, for annotations you can only use constant values. Hence, the possibility for a dynamic tab title (for example for localization) is impossible.
This used to be possible using the presentationBundle:
ShowViewModel<Tab2ViewModel>(presentationBundle: new MvxBundle(new Dictionary<string, string> { { "icon_name", "ic_tabbar_menu" }, { "title", "Tab 2" } }));
Version: 4.4
Platform: iOS
To help us fix your issue, please provide the information in the below template.
Note: There is often little we can do without a minimal reproducible sample of the issue, so please provide that in a standalone git repository and link it here.
https://github.com/slown1/IosNavigationBug
Please only file bugs verified on latest version of MvvmCross and stable Xamarin tools
I am on the stable channel and I am up to date.
After you login go from the menu to the Notifications, then Shift Templates, then History and repeat these steps until it breaks.
The exception is caught in
You can run the application in the simulator with the Developer Automatic settings.
I have noticed that in the simulator it reproduces harder and it also has another crash which seems like a leek. Can you also help here?
It should not crash
It crashes with exceptions which are like this:
Unable to cast object of type 'GoWorky.Mobile.iOS.Employer.TalentPoolViewController' (Objective-C type: 'NotificationsViewController') to type 'GoWorky.Mobile.iOS.Employer.NotificationsViewController'.
Additional information:
Selector: setTableView:
Method: GoWorky.Mobile.iOS.Employer.NotificationsViewController:set_TableView (UIKit.UITableView)
Unable to cast object of type 'GoWorky.Mobile.iOS.Employer.TemplatesViewController' (Objective-C type: 'TalentPoolViewController') to type 'GoWorky.Mobile.iOS.Employer.TalentPoolViewController'.
Additional information:
Selector: setTableView:
Method: GoWorky.Mobile.iOS.Employer.TalentPoolViewController:set_TableView (UIKit.UITableView)
Version: 4.4.0
Platform: iOS
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.