Xamarin Forms App crashing at startup on iOS - xamarin.ios

I am new to Xamarin and not sure what I am doing wrong. I have packaged an enterprise app and currently trying to deploy it as ipa package. The app crashes at startup with the following trace. Really not sure how to proceed and what is the core reason of the crash
Edit. Updated stack trace after disabling assembly linking:
Thread 0 name: tid_403 Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x000000018f2f7014 __pthread_kill + 8
1 libsystem_pthread.dylib 0x000000018f3bf450 pthread_kill + 112
2 libsystem_c.dylib 0x000000018f26b400 abort + 140
3 CrewConnectPlus.iOS 0x0000000100065604 mono_handle_native_sigsegv (mini-exceptions.c:2462)
4 libsystem_platform.dylib 0x000000018f3b9348 _sigtramp + 52
5 libsystem_pthread.dylib 0x000000018f3bf450 pthread_kill + 112
6 libsystem_c.dylib 0x000000018f26b400 abort + 140
7 CrewConnectPlus.iOS 0x00000001001682b0 print_all_exceptions(MonoObject*) (runtime.m:991)
8 CrewConnectPlus.iOS 0x00000001000a2398 mono_invoke_unhandled_exception_hook (exception.c:1108)
9 CrewConnectPlus.iOS 0x0000000100065298 mono_handle_exception_internal (mini-exceptions.c:1810)
10 CrewConnectPlus.iOS 0x0000000100064374 mono_handle_exception (mini-exceptions.c:2039)
11 CrewConnectPlus.iOS 0x000000010005cbbc mono_arm_throw_exception (exceptions-arm64.c:410)
12 CrewConnectPlus.iOS 0x000000010067c248 throw_exception + 168
13 CrewConnectPlus.iOS 0x0000000100405e08 System_AppDomain_Load_System_Reflection_AssemblyName_System_Security_Policy_Evidence + 1000
14 CrewConnectPlus.iOS 0x0000000100405960 System_AppDomain_Load_System_Reflection_AssemblyName + 32
15 CrewConnectPlus.iOS 0x0000000100457884 System_Reflection_Assembly_Load_System_Reflection_AssemblyName + 36
16 CrewConnectPlus.iOS 0x00000001024712f8 Xamarin_Forms_Xaml_XamlParser_GetElementType_Xamarin_Forms_Xaml_XmlType_System_Xml_IXmlLineInfo_System_Reflection_Assembly_Xamarin_Forms_Xaml_XamlParseException_ (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\XamlParser.cs:287)
17 CrewConnectPlus.iOS 0x00000001024687a0 Xamarin_Forms_Xaml_CreateValuesVisitor_Visit_Xamarin_Forms_Xaml_ElementNode_Xamarin_Forms_Xaml_INode (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\CreateValuesVisitor.cs:69)
18 CrewConnectPlus.iOS 0x0000000102463bac Xamarin_Forms_Xaml_ElementNode_Accept_Xamarin_Forms_Xaml_IXamlNodeVisitor_Xamarin_Forms_Xaml_INode (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\XamlNode.cs:178)
19 CrewConnectPlus.iOS 0x0000000102463b10 Xamarin_Forms_Xaml_ElementNode_Accept_Xamarin_Forms_Xaml_IXamlNodeVisitor_Xamarin_Forms_Xaml_INode (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\XamlNode.cs:173)
20 CrewConnectPlus.iOS 0x00000001024642a8 Xamarin_Forms_Xaml_RootNode_Accept_Xamarin_Forms_Xaml_IXamlNodeVisitor_Xamarin_Forms_Xaml_INode (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\XamlNode.cs:224)
21 CrewConnectPlus.iOS 0x0000000102462820 Xamarin_Forms_Xaml_XamlLoader_Visit_Xamarin_Forms_Xaml_RootNode_Xamarin_Forms_Xaml_HydratationContext (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\XamlLoader.cs:122)
22 CrewConnectPlus.iOS 0x0000000102462298 Xamarin_Forms_Xaml_XamlLoader_Load_object_string (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\XamlLoader.cs:80)
23 CrewConnectPlus.iOS 0x0000000102461fec Xamarin_Forms_Xaml_XamlLoader_Load_object_System_Type (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\XamlLoader.cs:57)
24 CrewConnectPlus.iOS 0x0000000102461f60 Xamarin_Forms_Xaml_Extensions_LoadFromXaml_TXaml_REF_TXaml_REF_System_Type (/C:\BuildAgent2\work\aad494dc9bc9783\Xamarin.Forms.Xaml\ViewExtensions.cs:37)
25 CrewConnectPlus.iOS 0x000000010016f4e0 CrewConnectPlus_Messages_InitializeComponent (/<unknown>:1)
26 CrewConnectPlus.iOS 0x000000010016f1e0 CrewConnectPlus_Messages__ctor (/<unknown>:1)
27 CrewConnectPlus.iOS 0x000000010016ee14 CrewConnectPlus_App_GoToMainPage (/<unknown>:1)
28 CrewConnectPlus.iOS 0x000000010016ed9c CrewConnectPlus_App_SetMainPage (/<unknown>:1)
29 CrewConnectPlus.iOS 0x000000010016ed58 CrewConnectPlus_App__ctor (/<unknown>:1)
30 CrewConnectPlus.iOS 0x000000010016cc10 CrewConnectPlus_iOS_AppDelegate_FinishedLaunching_UIKit_UIApplication_Foundation_NSDictionary (/<unknown>:1)
OK finally managed to get a hand on a physical device and went through the Apple hassle of creating a dev provisioning profile in order to debug the issue:
It seems that my main xaml document (Messages.xaml) cannot load a dependent one (APMHeader.xaml).
Messages.xaml is given by:
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:apm="clr-namespace:CrewConnectPlus;assembly=CrewConnectPlus"
x:Class="CrewConnectPlus.Messages" Title="{Binding Title}" x:Name="BrowseItemsPage">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Sign All" Clicked="AddItem_Clicked" />
</ContentPage.ToolbarItems>
<ContentPage.Content>
<StackLayout>
<apm:APMHeader/>
<ListView x:Name="ItemsListView" ItemsSource="{Binding Items}" VerticalOptions="FillAndExpand" HasUnevenRows="true" RefreshCommand="{Binding LoadItemsCommand}" IsPullToRefreshEnabled="true" IsRefreshing="{Binding IsBusy, Mode=OneWay}" CachingStrategy="RecycleElement" ItemSelected="OnItemSelected">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Padding="10">
<Label Text="{Binding Text}" LineBreakMode="NoWrap" Style="{DynamicResource ListItemTextStyle}" FontSize="16" />
<Label Text="{Binding Description}" LineBreakMode="NoWrap" Style="{DynamicResource ListItemDetailTextStyle}" FontSize="13" />
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage.Content>
</ContentPage>
And APMHeader is given by:
<?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="CrewConnectPlus.APMHeader">
<ContentView.Content>
<StackLayout BackgroundColor="#25447A" HorizontalOptions="Fill" HeightRequest="100">
<Label Margin="10">
<Label.TextColor>Yellow</Label.TextColor>
<Label.Text>Anwar Ludin</Label.Text>
</Label>
<Label Margin="10">
<Label.TextColor>White</Label.TextColor>
<Label.Text>ALU</Label.Text>
</Label>
</StackLayout>
</ContentView.Content>
</ContentView>
And the error is:
Xamarin.Forms.Xaml.XamlParseException: Position 11:5. Type apm:APMHeader not found in xmlns clr-namespace:CrewConnectPlus;assembly=CrewConnectPlus
at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, Xamarin.Forms.Xaml.INode parentNode)
This works perfectly well on an Android device and the iPhone simulator. Not sure what is different on a physical device. I also checked that the output assembly name is CrewConnectPlus

I'm (very) late to this party, but the way you set properties looks weird.
Try changing:
<Label Margin="10">
<Label.TextColor>Yellow</Label.TextColor>
<Label.Text>Anwar Ludin</Label.Text>
</Label>
to
<Label Margin="10" TextColor="Yellow" Text="Anwar Ludin">
</Label>
Plus its more concise, so there's that.

Related

CarouselView.FormsPlugin Not Properly Working on Xamarin IOS

I Installed CarouselView.FormsPlugin 6.0.0 on PCL Project
It's Working Fine on Android But When I Use On Ios facing Frame height not cover fully on CarouselView ItemTemplate
Code:-
<StackLayout>
<RefreshView>
<CollectionView x:Name="CollView">
<CollectionView.ItemTemplate>
<DataTemplate>
<cv:CarouselViewControl HeightRequest="110" AnimateTransition="False" ShowIndicators="True" Position="0" InfiniteScrolling="True" InterPageSpacing="20" VerticalOptions="Fill" HorizontalOptions="FillAndExpand" IsSwipeEnabled="True" AutoplayInterval="5" IndicatorsTintColor="#E5E5E5" ItemsSource="{Binding HomeDisplayOffers}" HorizontalIndicatorsPosition="Bottom">
<cv:CarouselViewControl.ItemTemplate >
<DataTemplate >
<StackLayout HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Frame Padding="0" HeightRequest="110" "HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<!--- Binding Source Code --->
</Frame>
</StackLayout
</DataTemplate >
</cv:CarouselViewControl.ItemTemplate>
</cv:CarouselViewControl>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</RefreshView>
</StackLayout>
pls Check the Attached Screenshot.. Some Frame Coverup and Some Frame Getting Space on Bottom
That has nothing to do with the control and everything to do with your XAML code, Giving it a static height is going to obviously do this, options that you have are quite simple to be honest get a container that covers the whole frame like Absolute or Grid
<AbsoluteLayout>
<cv:CarouselViewControl AnimateTransition="False" ShowIndicators="True" Position="0" InfiniteScrolling="True" InterPageSpacing="20" AbsoluteLayout.LayoutBounds="0,0,1,1"
AbsoluteLayout.LayoutFlags="All" VerticalOptions="Fill" HorizontalOptions="FillAndExpand" IsSwipeEnabled="True" AutoplayInterval="5" IndicatorsTintColor="#E5E5E5" ItemsSource="{Binding HomeDisplayOffers}" HorizontalIndicatorsPosition="Bottom">
<cv:CarouselViewControl.ItemTemplate >
<DataTemplate >
<Frame Padding="0">
<!--- Binding Source Code --->
</Frame>
</StackLayout
</DataTemplate >
</cv:CarouselViewControl.ItemTemplate>
</cv:CarouselViewControl>
</AbsoluteLayout>

Selenium Web Driver Selecting option from Drop down

I've got this HTML
<div>
<div tabindex="0" class="dropdown xs-dropdown show" id="selBudgetYearRange-wrap" style="border: 1px solid rgb(206, 212, 218); border-image: none;">
<button tabindex="-1" class="btn btn-default dropdown-toggle" id="selBudgetYearRange-btn" aria-expanded="true" aria-haspopup="true" type="button" data-toggle="dropdown">2020 vs 2019 (Oct 2019 - Mar 2020 vs Oct 2018 - Mar 2019)
</button>
<div class="dropdown-menu show" id="selBudgetYearRange-dmenu" aria-labelledby="selBudgetYearRange-btn" style="left: 0px; top: 0px; width: calc(100% + 2 * 1px); margin-top: calc(0px + 1px); margin-left: calc(-0px - 1px); position: absolute; transform: translate3d(0px, 21px, 0px);" x-placement="bottom-start">
<a class="dropdown-item active" onclick="dropdownChanged(this, 'selBudgetYearRange','201910-202003,2');;return false;" href="javascript:void(0)">2020 vs 2019 (Oct 2019 - Mar 2020 vs Oct 2018 - Mar 2019)</a>
<a class="dropdown-item" onclick="dropdownChanged(this, 'selBudgetYearRange','201810-201909,2');;return false;" href="javascript:void(0)">2019 vs 2018 (Whole Year Oct - Sep)</a>
<a class="dropdown-item" onclick="dropdownChanged(this, 'selBudgetYearRange','201710-201809,2');;return false;" href="javascript:void(0)">2018 vs 2017 (Whole Year Oct - Sep)</a>
</div><input name="selBudgetYearRange" id="selBudgetYearRange" type="hidden" value="201910-202003,2"></div>
</div>
which has 3 options
2020 vs 2019 (Oct 2019 - Mar 2020 vs Oct 2018 - Mar 2019)
2019 vs 2018 (Whole Year Oct - Sep)
2018 vs 2017 (Whole Year Oct - Sep)
I've managed to work out that by using
.FindElementByXPath("//*[text()='2019 vs 2018 (Whole Year Oct - Sep)']").Click
I can select the middle option, however it only works if I click on the drop down first so that the options are visible.
I can't seem to get selenium to click on the drop down for me and make the options visible so that I can use the above xpath to select my desired option.
Please can someone advise on how to do this? Or if there's a way of selecting my options without needing to get the drop down to appear first?
So managed to get it to work.
by using clickdouble (after figuring out the xpath)
I have no idea why I need to use clickdouble instead of click.
But it works, so I'm not going to complain too much

How to make SVGs safe to use?

I'm creating a custom set of icons for a design system. I would like to know whether there are security vulnerabilities by using:
1-Inline SVG
<svg class="svg-inline--fa fa-search fa-w-16 form-control-feedback" aria-hidden="true" data-prefix="fa" data-icon="search" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg>
2-Calling the file hosted in the server
<img class="img-fluid" src="images/search.svg">
3-Not using them at all and create custom icon fonts instead. However, the maintenance is much higher for both designer and developer, not considering that in some situations they might not load properly.

How do I select radio buttons in IE using vba?

I am trying to select radio buttons and select value in selectCls but facing problem with my code please help me on the same
Thanks in advance..
My VBA Code is:
Browser.document.getElementById("ddlCycleID").SelectCls = "Cycle 274 (21 Jun 2017 - 31 Jul 2017)"
Browser.document.getElementById("chkproc").Checked = True
Browser.document.getElementById("btnSubmit").Click
And HTML Source code is:
<td>
<input value="chkproc" name="Module" type="radio" id="chkproc" checked="checked" tabindex="1" onclick="toggle(this)"> Processing Module
<td>
<td>
<input value="chkquery" name="Module" type="radio" id="chkquery" tabindex="2" onclick="toggle(this)"> Other Modules
<td>
<td>
<select name="ddlCycleID" id="ddlCycleID" tabindex="4" class="SelectCls" style="width:180px;">
<option value="Select Cycle">Select Cycle</option>
<option value="274">Cycle 274 (21 Jun 2017 - 31 Jul 2017)</option>
<option value="273">Cycle 273 (29 Jun 2017 - 29 Jun 2017)</option>
</select>
<td>
getting below error msg
Run-time error '424'
object required
in this code:
Browser.document.getElementById("ddlCycleID").SelectCls = "Cycle 274 (21 Jun 2017 - 31 Jul 2017)"
showing this "="" when i place cursor on this code

Cruise Control.Net 1.5 + Visual Source Safe + MSBuild.exe

I am trying Cruise Control.net 1.5 integrate to Visual Source Safe.
Could any one share with me step by step (configuration for Build+Email+Triggers+Publish)to do cruise control.net with Visual Source safe.
Thanks in advance...
Have you looked at "How to Hook Up a VS.NET 2005 Solution with CruiseControl.NET in a few minutes." ?
The configuration file (for vss) looks like this:
<cruisecontrol>
<project name="Johans Test System">
<sourcecontrol type="vss" autoGetSource="true" applyLabel="true">
<executable>C:\Program Files\Microsoft Visual SourceSafe\ss.exe</executable>
<project>$/JohansTestSystem.root</project>
<username>Johan</username>
<password></password>
<ssdir>c:\vss\</ssdir>
<workingDirectory>C:\CI\</workingDirectory>
<cleanCopy>true</cleanCopy>
</sourcecontrol>
<triggers>
<intervalTrigger seconds="60" />
</triggers>
<tasks>
<msbuild>
<executable>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe</executable>
<workingDirectory>c:\CI\JohansTestSystem</workingDirectory>
<projectFile>JohansTestSystem.sln</projectFile>
<buildArgs>/noconsolelogger /p:Configuration=Debug /v:diag</buildArgs>
<targets>Build</targets>
<timeout>15</timeout>
<logger>ThoughtWorks.CruiseControl.MsBuild.XmlLogger,ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>
<nunit path="C:\nunit\bin\nunit-console.exe">
<assemblies>
<assembly>C:\CI\JohansTestSystem\Johan.Test\bin\Debug\Johan.Test.dll</assembly>
</assemblies>
</nunit>
</tasks>
<publishers>
<xmllogger />
</publishers>
</project>
</cruisecontrol>
Email blocks documentation is pretty straightforward.
Here is CruiseControl.NET's example:
1<email mailport="25" includeDetails="TRUE" mailhostUsername="smtpuser" mailhostPassword="smtppassword" useSSL="FALSE">
2 <from>buildmaster#mycompany.com</from>
3 <mailhost>smtp.mycompany.com</mailhost>
4 <users>
5 <user name="BuildGuru" group="buildmaster" address="buildguru#mycompany.com" />
6 <user name="JoeDeveloper" group="developers" address="joedeveloper#thoughtworks.com" />
7 </users>
8 <groups>
9 <group name="developers">
10 <notifications>
11 <notificationType>Failed</notificationType>
12 <notificationType>Fixed</notificationType>
13 </notifications>
14 </group>
15 <group name="buildmaster">
16 <notifications>
17 <notificationType>Always</notificationType>
18 </notifications>
19 </group>
20 </groups>
21 <converters>
22 <regexConverter find="$" replace="#TheCompany.com" />
23 </converters>
24 <modifierNotificationTypes>
25 <NotificationType>Failed</NotificationType>
26 <NotificationType>Fixed</NotificationType>
27 </modifierNotificationTypes>
28 <subjectSettings>
29 <subject buildResult="StillBroken" value="Build is still broken for {CCNetProject}" />
30 </subjectSettings>
31 <xslFiles>
32 <file>xsl\header.xsl</file>
33 <file>xsl\compile.xsl</file>
34 <file>xsl\unittests.xsl</file>
35 <file>xsl\modifications.xsl</file>
36 </xslFiles>
37 <attachments>
38 <file>C:\Data\AFile.txt</file>
39 <file>Relative.txt</file>
40 </attachments>
41</email>
and of course if you want to send via gmail, that's cool too:
GMail For sending mail via gmail :
* mailhost="smtp.gmail.com"
* mailport="587"
* mailhostUsername="xxx.yyy#gmail.com"
* mailhostPassword="yourpassword"
* useSSL="TRUE"
You should probably also check out this SO thread about CC.NET email publishing:

Resources