<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Alex Sorokoletov Notes</title>
 <link href="https://sorokoletov.com/atom.xml" rel="self"/>
 <link href="https://sorokoletov.com/"/>
 <updated>2025-06-28T01:59:57+00:00</updated>
 <id>https://sorokoletov.com</id>
 <author>
   <name>Alex Sorokoletov</name>
   <email>alex@sorokoletov.com</email>
 </author>

 
 <entry>
   <title>Git pull, git push, git checkout branch, git delete local branch and so on.
</title>
   <link href="https://sorokoletov.com/2020/12/13/git-using-terminal-get-educated/"/>
   <updated>2020-12-13T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2020/12/13/git-using-terminal-get-educated</id>
   <content type="html">&lt;p&gt;Who knows all these git commands? What is git pull? What does your git push? How do you delete a local git branch but not the server one?&lt;/p&gt;

&lt;p&gt;There a lots of git-based tools that are visual and clear. I used those tools too. Until I did not. Because they hide the meaning and behavior of git by presenting it differently.&lt;/p&gt;

&lt;p&gt;This is why I would like to share my tips, tricks and ways of using git efficiently, without any dependency and no mess.&lt;/p&gt;

&lt;p&gt;I’m launching a &lt;a href=&quot;https://gum.co/git-terminal&quot; target=&quot;_blank&quot;&gt;course about git&lt;/a&gt; and how to use git efficiently. You will learn how to use git, how to solve git challenges and help others.&lt;/p&gt;

&lt;p&gt;You can pre-order the course here: &lt;a href=&quot;https://gum.co/git-terminal&quot; target=&quot;_blank&quot;&gt;https://gum.co/git-terminal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Get git educated and earn kudos by helping your team with git 💪!&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;The course will go live on February 1, 2021 and you can preorder it using the link above.&lt;/p&gt;

&lt;p&gt;Let me know what questions do you have around git, what tools have you used and what bothers you with git.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2020/12/13/git-using-terminal-get-educated/&amp;amp;text=Git+pull%2C+git+push%2C+git+checkout+branch%2C+git+delete+local+branch+and+so+on.%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Blink HTML - how to make blink HTML these days 😉
</title>
   <link href="https://sorokoletov.com/2020/11/11/blink-html-how-to-make-your-html-blink/"/>
   <updated>2020-11-11T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2020/11/11/blink-html-how-to-make-your-html-blink</id>
   <content type="html">&lt;p&gt;The Blink HTML was first visual effect that was available in HTML. Your HTML page could show text, use different colors and blink.
How that happened and how to make blink HTML nowadays (or blink HTML5)&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Alright, most of the people I know thing that blink HTML is annoying. It is a part of history now, modern HTML pages use nice CSS3 and JavaScript-based effects to make your HTML page blink and do all other kind of stuff (WebGL, WebXR, 3d, anything).&lt;/p&gt;

&lt;p&gt;Lou Montulli is often credited as a creator of blink HTML tag, and he has an interesting story &lt;a href=&quot;http://www.montulli.org/theoriginofthe%3Cblink%3Etag&quot; target=&quot;_blank&quot;&gt;about the origins on blink HTML tag&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;My favorite quote there is:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;and suddenly everything was blinking.    “Look here”, “buy this”, “check this out”, all blinking.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Reminds me &lt;a href=&quot;https://www.youtube.com/watch?v=YlGklt4BSQ8&quot; target=&quot;_blank&quot;&gt;Futurama’s laugh at VR ads&lt;/a&gt; &lt;span class=&quot;blink&quot;&gt;😉&lt;/span&gt;&lt;/p&gt;

&lt;h3 id=&quot;how-to-make-blink-html-work-nowadays&quot;&gt;How to make blink HTML work nowadays?&lt;/h3&gt;

&lt;p&gt;Enough history!
Good thing about any of the ways below is they support any content, not just text&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blink&quot; target=&quot;_blank&quot;&gt;MDN recommends a blink HTML polyfill using CSS&lt;/a&gt; which uses keyframes and will make blink HTML tag blink again.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;blink {
  animation: 2s linear infinite condemned_blink_effect;
}

@keyframes condemned_blink_effect {
  0% { visibility: hidden; }
  50% { visibility: hidden; }
  100% { visibility: visible; }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Wikipedia’s way to make blink HTML work again:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;blink, .blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  67% { opacity: 0 }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;JavaScript way to make a blinking HTML element (not only text)&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;const blink = document.getElementById(&apos;blink&apos;);
setInterval(() =&amp;gt; {
    blink.style.opacity = (blink.style.opacity === 0 ? 1 : 0);
}, 1000);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;obsolete-blink-html-ways&quot;&gt;Obsolete blink HTML ways&lt;/h3&gt;

&lt;p&gt;What blink HTML ways do not work:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&amp;lt;blink&amp;gt; HTML tag itself&lt;/li&gt;
  &lt;li&gt;CSS style &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;text-decoration: blink;&lt;/code&gt; - does not make your HTML blink&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;P.S.: Anybody remembers marquee? :D&lt;/p&gt;

&lt;style&gt;

.blink {
  animation: 2s linear infinite condemned_blink_effect;
}


@keyframes condemned_blink_effect {
  0% { visibility: hidden; }
  50% { visibility: hidden; }
  100% { visibility: visible; }
}
&lt;/style&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2020/11/11/blink-html-how-to-make-your-html-blink/&amp;amp;text=Blink+HTML+-+how+to+make+blink+HTML+these+days+%F0%9F%98%89%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>C# Analyzers and Xamarin (Visual Studio for Mac)
</title>
   <link href="https://sorokoletov.com/2019/01/31/roslyn-analyzers-visual-studio-mac-xamarin/"/>
   <updated>2019-01-31T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2019/01/31/roslyn-analyzers-visual-studio-mac-xamarin</id>
   <content type="html">&lt;p&gt;The news of having C# compiler written in C# were crazy at first. Then everyone realized the power that comes with it.
One of the great features that came with Roslyn compiler was support for analyzers.&lt;/p&gt;

&lt;p&gt;Analyzers are like a plugins for C# compilers. Easy to write and thus really flexible to adjust to your specific situation.&lt;/p&gt;

&lt;p&gt;It’s a powerful addition and there are hundreds of &lt;em&gt;GREAT&lt;/em&gt; analyzers on GitHub already.&lt;/p&gt;

&lt;p&gt;How do we use that greatness with Xamarin apps?&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Visual Studio for Mac is still a main tool for anyone working with Xamarin and iOS and Android apps.
While we have Roslyn-based compiler there and .NET Core and .NET Standard support, analyzers are not yet first-class citizen&lt;/p&gt;

&lt;h3 id=&quot;so-what-do-we-do&quot;&gt;So what do we do?&lt;/h3&gt;
&lt;p&gt;We need to do some manual actions to add analyzers to your Xamarin project.
I’ll guide you through&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Download analyzers that you want to use and place it in the folder at the solution level. Say, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Analyzers&lt;/code&gt;.
 Look for any dependencies that these analyzers require.&lt;/p&gt;

    &lt;p&gt;VS4Mac does not download analyzers automatically if you add Nuget package with an analyzer and there is also an issue to get together all dependencies.&lt;/p&gt;

    &lt;p&gt;So we do it ourselves.
 Here I downloaded &lt;a href=&quot;https://github.com/Microsoft/vs-threading&quot;&gt;VS Threading analyzers&lt;/a&gt; since they provide warnings for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async void&lt;/code&gt; methods and lambdas.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;/assets/analyzers-download-manually.png&quot; alt=&quot;Do it yourself - get analyzers and dependencies together&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Open your project file &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;App.Core.csproj&lt;/code&gt; and include your analyzer. Here is an example:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;ItemGroup&amp;gt;
    &amp;lt;Analyzer Include=&quot;..\Analyzers\Microsoft.VisualStudio.Threading.Analyzers.dll&quot; /&amp;gt;
&amp;lt;/ItemGroup&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Reload the project and enjoy&lt;/p&gt;

    &lt;p&gt;These simple steps work for .NET Standard libraries and for Xamarin.Android projects. Xamarin.iOS projects seems to ignore &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;Analyzer&amp;gt;&lt;/code&gt; tag altogether.&lt;/p&gt;

    &lt;p&gt;If you miss something from the dependencies, build log will have few warnings (not compilation warnings) saying the analyzer can’t be loaded.
Watch for these during setup!&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;em&gt;Optional&lt;/em&gt; - setup some of the warnings analyzers produce as errors.&lt;/p&gt;

    &lt;p&gt;This is a nice addition you can have. While analyzers usually produce warnings, you can force them to be errors.
 For example, I really try to stick to the golden rule &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;avoid async void&lt;/code&gt;.
 So, the threading analyzer would produce a warning with the code &lt;a href=&quot;https://github.com/Microsoft/vs-threading/blob/master/doc/analyzers/VSTHRD100.md&quot;&gt;VSTHRD100&lt;/a&gt;.
 I’d like to make that a compilation error instead.&lt;/p&gt;

    &lt;p&gt;It’s as simple as step 2 - open the project file and add a line:&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;     &amp;lt;WarningsAsErrors&amp;gt;VSTHRD100;VSTHRD101;&amp;lt;/WarningsAsErrors&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;The example also includes &lt;a href=&quot;https://github.com/Microsoft/vs-threading/blob/master/doc/analyzers/VSTHRD101.md&quot;&gt;VSTHRD101&lt;/a&gt; which is even more tricky - async void lambdas are hard to spot and easy to come by these days.&lt;/p&gt;

    &lt;p&gt;If you want to ignore some warnigns (an analyzer can be noise, can’t it?), here is another line to add to the project:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;     &amp;lt;NoWarn&amp;gt;VSTHRD200&amp;lt;/NoWarn&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;This one says do not warn me about making all async methods end with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Async&lt;/code&gt; &lt;a href=&quot;https://github.com/Microsoft/vs-threading/blob/master/doc/analyzers/VSTHRD200.md&quot;&gt;VSTHRD200&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;any-good-analyzers-you-know&quot;&gt;Any good analyzers you know?&lt;/h3&gt;

&lt;p&gt;My goal was to make sure there is an automatic safeguard against &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async void&lt;/code&gt; methods, anonymous or no. 
Thanks to Roslyn analyzers one can have it on 2 of 3 projects in a typical iOS/Android crossplat app.&lt;/p&gt;

&lt;p&gt;Here are some good ones I’ve came through:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/DotNetAnalyzers&quot;&gt;DotNetAnalyzers&lt;/a&gt; - the most known collection of analyzers&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/Microsoft/vs-threading/&quot;&gt;Microsoft/vs-threading/&lt;/a&gt; - great help with async void and overall async/await usage&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ironcev/awesome-roslyn&quot;&gt;ironcev/awesome-roslyn&lt;/a&gt; - more like an overview of analyzers you can get&lt;/p&gt;

&lt;p&gt;Let me know which rules you specifically use in your projects, I’d be glad to try them as well and share with my readers.&lt;/p&gt;

&lt;h3 id=&quot;visual-studio-not-for-mac&quot;&gt;Visual Studio (not for Mac)&lt;/h3&gt;
&lt;p&gt;VS 2017 supports analyzers just fine, allowing you to install them from Nuget packages.
To be honest, I’m not sure why the Mac version does not support them yet.&lt;/p&gt;

&lt;p&gt;It’s a great technology basically wasted on Xamarin side.&lt;/p&gt;

&lt;h3 id=&quot;hidden-candy&quot;&gt;Hidden candy&lt;/h3&gt;

&lt;p&gt;Nice thing about these analyzers - AppCenter.ms respects them. So if you follow steps 1 to 4, your builds in pull requests or branches will fail once someone uses &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;async void&lt;/code&gt;. I like that.&lt;/p&gt;

&lt;p&gt;That’s it for today, thank you for reading!&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2019/01/31/roslyn-analyzers-visual-studio-mac-xamarin/&amp;amp;text=C%23+Analyzers+and+Xamarin+%28Visual+Studio+for+Mac%29%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Why Reply All is an essential skill
</title>
   <link href="https://sorokoletov.com/2018/09/20/reply-all/"/>
   <updated>2018-09-20T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2018/09/20/reply-all</id>
   <content type="html">&lt;p&gt;One of the practices that I find essential for any member of any team is to use Reply All feature in the email communication. Why is that?&lt;/p&gt;

&lt;!--more--&gt;
&lt;p&gt;First of all, there are hundreds of different views about Reply All feature. To summarize 99% of them, let’s just agree Reply All should be used in some cases but not others.
Here is my take on how that applies to a team.&lt;/p&gt;

&lt;h3 id=&quot;some-background&quot;&gt;Some background&lt;/h3&gt;
&lt;p&gt;As some of you know, I like remote work.
Mainly because of 192 million benefits :)
&lt;img src=&quot;/assets/remoteworkbenefits.png&quot; alt=&quot;Remote work has a lot of benefits&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Working remotely teaches how to work in a team. Working in an office not always means working in a team, sometimes it is just working around other people.
Once you are remote for any of the reasons, it is so hard to be in the loop unless there are some practices in the team to prevent this disconnect.
Today I would like to share my points about Reply All.&lt;/p&gt;

&lt;h3 id=&quot;simple-rules&quot;&gt;Simple rules&lt;/h3&gt;
&lt;p&gt;Reply All is there for a reason. You have to think whether reply or reply all. Yes. Think :) 
And I am going to make it easy for you. 
Here is my gift.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/replyall.png&quot; alt=&quot;Reply All decision maker&quot; /&gt;&lt;/p&gt;

&lt;p&gt;3 of 4 branches lead to Reply All. Only 1 of 4 needs Reply.
Now, let me give you a few examples.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Your PM sends an email with an issue from your client to you and the rest of the team asking to create a task and investigate. Email has you, team members and a PM as a sender.
All of these are interested in your response. Reply All. No brainer&lt;/li&gt;
  &lt;li&gt;Someone from the team leaves the company and sends farewell email to your team and whole company. You would like to wish him/her well. 
Private response. Reply. No brainer&lt;/li&gt;
  &lt;li&gt;You report a bug to another team1 and include their PM, team1 alias. Turns out, the team responsible for this issue is another one. PM of team1 fixes that by adding PM2 and team2 aliases and asking them to help you. Someone from team2 asks for an additional info.
Your response is only interesting now for PM2 and team2. Hit Reply All and edit recipients to remove PM1 and team1. No brainer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With a bit of practice it will be a natural skill.&lt;/p&gt;

&lt;p&gt;Where is that button?
Good question. All mail apps, even on your phone, have it. Google and find it. Here is what you can do specifically for Gmail.&lt;/p&gt;

&lt;h5 id=&quot;how-to-make-reply-all-your-default-response-in-gmail&quot;&gt;How To Make Reply All Your Default Response in Gmail&lt;/h5&gt;
&lt;p&gt;Go to Gmail settings -&amp;gt; General tab -&amp;gt; Default reply behavior. Set it to Reply all. Enjoy. It is &lt;em&gt;that&lt;/em&gt; easy.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/gmail-reply-all.png&quot; alt=&quot;Enable Reply All in Google Mail GMail&quot; /&gt;&lt;/p&gt;

&lt;p&gt;That’s it for today, thank you!&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2018/09/20/reply-all/&amp;amp;text=Why+Reply+All+is+an+essential+skill%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>My favorite extensions for Visual Studio for Mac
</title>
   <link href="https://sorokoletov.com/2018/09/20/favorite-extensions-visual-studio-mac-xamarin/"/>
   <updated>2018-09-20T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2018/09/20/favorite-extensions-visual-studio-mac-xamarin</id>
   <content type="html">&lt;p&gt;5 extensions to transform Visual Studio for Mac to even more powerful IDE. 
Each of them, when discovered (or developed), allowed me to save my time and simplify my workflow.
&lt;!--more--&gt;&lt;/p&gt;

&lt;h3 id=&quot;1-nuget-package-management&quot;&gt;1. NuGet Package Management&lt;/h3&gt;
&lt;p&gt;This one I found out quite recently. If you ever used VS 2017, you know that it has much nicer and comfortable UI to manage NuGet packagets.
You can install and update multiple selected packages at once.&lt;/p&gt;

&lt;p&gt;I found it very useful, especially when installing next MvvmCross update and keeping all other packages unchanged.&lt;/p&gt;

&lt;p&gt;VS4Mac team, you should have that built in!
Thanks to @brent.l for the tip.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mrward/monodevelop-nuget-extensions&quot;&gt;Download NuGet Package Management extensions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github repo: &lt;a href=&quot;https://github.com/mrward/monodevelop-addins&quot;&gt;https://github.com/mrward/monodevelop-addins&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;2-defaultdesigner&quot;&gt;2. DefaultDesigner&lt;/h3&gt;
&lt;p&gt;This is a Xamarin Studio &amp;amp; Visual Studio for Mac add-in to open .xib and .storyboard files with Xcode Interface Builder by default.
By double clicking it.&lt;/p&gt;

&lt;p&gt;Awesome timesaver. Since I edit all storyboards in XCode only, this is a must for me.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/colbylwilliams/DefaultDesigner&quot;&gt;Download DefaultDesigner for Visual Studio for Mac&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github repo: &lt;a href=&quot;https://github.com/colbylwilliams/DefaultDesigner&quot;&gt;https://github.com/colbylwilliams/DefaultDesigner&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;3-mfractor&quot;&gt;3. MFractor&lt;/h3&gt;
&lt;p&gt;Kudos to Matthew for this amazing mega-extension (comes in two flavors, lite and pro).
I can’t even start to describe what you can do with it, instead go and check the website https://www.mfractor.com/&lt;/p&gt;

&lt;p&gt;Some of the features I like:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;XAML helpers essential for any Xamarin.Forms developer&lt;/li&gt;
  &lt;li&gt;Android Resource intellinsense and help with navigation and replace with resource lookup&lt;/li&gt;
  &lt;li&gt;Point out missing constructors for Xamarin.Android views/classes&lt;/li&gt;
  &lt;li&gt;many other things I have not learned yet&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MFactor Pro: &lt;a href=&quot;https://www.mfractor.com/pages/download&quot;&gt;https://www.mfractor.com/products/mfractor-for-visual-studio-mac&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MFractor Lite: &lt;a href=&quot;https://www.mfractor.com/pages/download&quot;&gt;https://www.mfractor.com/pages/download&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;4-sortandremoveusings&quot;&gt;4. SortAndRemoveUsings&lt;/h3&gt;
&lt;p&gt;Disclaimer: this is my own extension. It helps me by automatically sort and remove usings when you save a C# file.
Extending VS4Mac was moderately easy, and I do that action anyway before commit since I like to keep my code clean.&lt;/p&gt;

&lt;p&gt;No magic involved regarding usings here, instead of going through context menu this add-in does that on file save.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/alexsorokoletov/VisualStudioMac.SortRemoveUsings/raw/master/Meta/xamarin-save-sort.gif?raw=true&quot; alt=&quot;Screenshot of VS4Mac extension to sort/remove C# usings automatically&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/alexsorokoletov/VisualStudioMac.SortRemoveUsings/releases/tag/1.1&quot;&gt;Download SortAndRemoveUsings for Visual Studio for Mac&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github repo: &lt;a href=&quot;https://github.com/alexsorokoletov/VisualStudioMac.SortRemoveUsings&quot;&gt;https://github.com/alexsorokoletov/VisualStudioMac.SortRemoveUsings&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;5-solutionname&quot;&gt;5. SolutionName&lt;/h3&gt;
&lt;p&gt;Disclaimer: this is my own extension. This extension helps me easily determine which solution is open right now if I have several Visual Studio instances open. In a way, this is a cheap replacement for Windows 10 task switcher which shows icon and solution name when switching between VS 2017 instances.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://github.com/DreamTeamMobile/VS4Mac.SolutionName/raw/master/Meta/screenshot.png?raw=true&quot; alt=&quot;Screenshot of VS4Mac extension to show solution name&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/DreamTeamMobile/VS4Mac.SolutionName/releases&quot;&gt;Download VS4Mac.SolutionName for Visual Studio for Mac&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Github repo: &lt;a href=&quot;https://github.com/DreamTeamMobile/VS4Mac.SolutionName&quot;&gt;https://github.com/DreamTeamMobile/VS4Mac.SolutionName&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;your-recommendations&quot;&gt;Your recommendations?&lt;/h3&gt;

&lt;p&gt;Which extensions do you use? Let me know in the comments!&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2018/09/20/favorite-extensions-visual-studio-mac-xamarin/&amp;amp;text=My+favorite+extensions+for+Visual+Studio+for+Mac%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Easy way to create Xamarin.iOS binding from CocoaPods
</title>
   <link href="https://sorokoletov.com/2017/02/05/objc-automatic-easy-way-to-create-xamarin-bindings-ios/"/>
   <updated>2017-02-05T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2017/02/05/objc-automatic-easy-way-to-create-xamarin-bindings-ios</id>
   <content type="html">&lt;p&gt;Hey, Xamarin developers!
Developing iOS apps quite often includes using native libraries and Xamarin for iOS supports this by creating bindings.
This was 100% manual process until &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ObjectiveSharpie&lt;/code&gt;. After, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ObjectiveSharpie&lt;/code&gt; began supporting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CocoaPods&lt;/code&gt; (it is NuGet for iOS developers, so everything is in there). 
However, it doesn’t work in many cases (it can’t build something or reflect ObjectiveC code correctly).&lt;/p&gt;

&lt;p&gt;Also, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sharpie&lt;/code&gt; doesn’t support dependencies within pods. This is where the new &lt;a href=&quot;https://github.com/alexsorokoletov/objc-automatic&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;objc-automatic&lt;/code&gt;&lt;/a&gt; started.&lt;/p&gt;

&lt;p&gt;But first, let me show you a demo how easy it is to create Xamarin.iOS binding for cocoapod.
&lt;!--more--&gt;&lt;/p&gt;
&lt;iframe width=&quot;630&quot; height=&quot;394&quot; src=&quot;https://www.useloom.com/embed/e17d23d0ec3711e689c9c95ad27ead9a&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h3 id=&quot;prelude&quot;&gt;Prelude&lt;/h3&gt;

&lt;p&gt;Imagine you have to use &lt;a href=&quot;https://cocoapods.org/pods/FirebaseAnalytics&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Firebase/Analytics&lt;/code&gt;&lt;/a&gt; in your Xamarin app (Now, there is a NuGet for that, but let’s rewind to the point where there wasn’t one).
You would go ahead and create binding for that library, right. Unfortunately, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Firebase/Analytics&lt;/code&gt; is what I call an umbrella pod. It has no code, just dependencies.&lt;/p&gt;

&lt;p&gt;So, instead, you need to go and create bindings for pods like: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FirebaseCore&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FirebaseInstanceID&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GoogleInterchangeUtilities&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GoogleSymbolUtilities&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GoogleToolboxForMac/NSData+zlib&lt;/code&gt;.
Literally, out of nowhere amount of work exploded. Now you need 5 bindings instead of just one. ObjectiveSharpie won’t help us with that.&lt;/p&gt;

&lt;p&gt;Interesting, &lt;a href=&quot;https://cocoapods.org/pods/FirebaseCore&quot;&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;FirebaseCore&lt;/code&gt;&lt;/a&gt; also has dependencies. 
So, you need to create 5 Xamarin.iOS binding projects, do the code, reference them correspondingly and then you will have a binding for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Firebase/Analytics&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Few questions arise:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;How do you distribute that?
  Single binary? 
  Many binaries?
  NuGet package or packages?&lt;/li&gt;
  &lt;li&gt;How do you version that?
  1.0.0 is not an option, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Firebase/Analytics&lt;/code&gt; is updated often.
  Oh, yes. Each of these pods has it’s own version.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you choose NuGet packages, then you also need to reference packages same way as pods and Xamarin.iOS projects.&lt;/p&gt;

&lt;p&gt;Frankly, I tried to do that manually. After &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Firebase/Core&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Firebase/Analytics&lt;/code&gt; I understood this is hard.
I couldn’t imagine I will do that again when version 3.7.x of Firebase is released. Not mentioning sometimes you have to redo bindings to fix incorrect signature or binary&lt;/p&gt;

&lt;h3 id=&quot;automate-all-the-things&quot;&gt;Automate all the things.&lt;/h3&gt;

&lt;p&gt;We’ve been using F# FAKE for Xamarin iOS/Android builds for a long time and I love it.
I decided to try F# FAKE with this problem as well.&lt;/p&gt;

&lt;p&gt;First, the tool generates correct tree of dependencies.
Downloads all metadata about pods. Versions, frameworks, linker flags, dependencies, etc.&lt;/p&gt;

&lt;p&gt;Then, for each of the pods it create a subfolder inside &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bindings&lt;/code&gt; and puts there Xamarin.iOS binding project with C# API surface generated by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sharpie&lt;/code&gt;.
It adds all linker flags, puts the iOS binary in there, adjusts the references to the dependencies (other Xamarin.iOS binding projects).&lt;/p&gt;

&lt;p&gt;Now, you can build these Xamarin.iOS bindings using Xamarin Studio.&lt;/p&gt;

&lt;p&gt;Turns out, it takes quite a time for XS, so the tool also creates &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;podname.build.sh&lt;/code&gt; script to go ahead and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MSBuild&lt;/code&gt; all the projects in correct order.&lt;/p&gt;

&lt;p&gt;So the flow would be: run the script, see the errors, fix the errors, run it again (you can probably put it on –watch do run continously).&lt;/p&gt;

&lt;p&gt;Now you have the .dll files with bindings. (pss, there is also a linker side of that story, take a look at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Linker.cs&lt;/code&gt; files)&lt;/p&gt;

&lt;h3 id=&quot;demo-time&quot;&gt;Demo time!&lt;/h3&gt;
&lt;p&gt;Here are few videos showing how to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;objc-automatic&lt;/code&gt; and how it works internally.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.useloom.com/share/7679bec0ec3911e6b8fde34d395e0c71&quot;&gt;Binding Firebase/Analytics using objc-automatic&lt;/a&gt;&lt;/p&gt;
&lt;iframe width=&quot;630&quot; height=&quot;394&quot; src=&quot;https://www.useloom.com/embed/7679bec0ec3911e6b8fde34d395e0c71&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;a href=&quot;https://www.useloom.com/share/f756df30ec3b11e6b8fde34d395e0c71&quot;&gt;How objc-automatic works&lt;/a&gt;&lt;/p&gt;
&lt;iframe width=&quot;630&quot; height=&quot;394&quot; src=&quot;https://www.useloom.com/embed/f756df30ec3b11e6b8fde34d395e0c71&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h3 id=&quot;nuget-side-of-things&quot;&gt;NuGet side of things&lt;/h3&gt;
&lt;p&gt;For the NuGet distribution, you want to have same tree of packages with same versioning.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;objc-automatic&lt;/code&gt; tool does that for you. Along with projects, it generates &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;packages.config&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.nuspec&lt;/code&gt; files for each of the CocoaPods.
It also enhances &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;podname.build.sh&lt;/code&gt; script to build packages and restore packages in correct order when building Xamarin.iOS binding projects.
For this goal tool creates local temporary NuGet feed and publishes built packages and restores dependencies from this source.&lt;/p&gt;

&lt;p&gt;You want to be sure people can later restore our packages and have everything working (at least - compiling).&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.nuspec&lt;/code&gt; files will contain versions, metadata, everything needed.&lt;/p&gt;

&lt;h3 id=&quot;does-it-work&quot;&gt;Does it work?&lt;/h3&gt;
&lt;p&gt;It worked for quite many cocoapods I used to test it with. More importantly, it worked with Firebase pods. 
For the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lottie-ios&lt;/code&gt; it took around 1 minute to generate the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bindings&lt;/code&gt; infrastructure (projects, NuGet package specs).
Around 1 more minute to run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lottie-ios.build.sh&lt;/code&gt; and have NuGet package ready for publishing.&lt;/p&gt;

&lt;p&gt;I’m not trying to brag here, just saying that basically compiling lottie manually and launching Xamarin Studio would take around that time.
In first place, the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;objc-automatic&lt;/code&gt; tool aims for complex pod bindings with dependencies.&lt;/p&gt;

&lt;p&gt;One binding sometimes is really hard to crack. Having 6 of them is even harder.&lt;/p&gt;

&lt;h4 id=&quot;dicsoveries&quot;&gt;Dicsoveries&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;Turns out, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ObjectiveSharpie&lt;/code&gt; can’t bind all the cocoapods.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ObjectiveSharpie&lt;/code&gt; doesn’t bind correctly some of the classes from iOS frameworks (misses casign of the managed class name)&lt;/li&gt;
  &lt;li&gt;Sometimes you need to direct &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ObjectiveSharpie&lt;/code&gt; into correct set of header files, otherwise it skips some classes. C# API surface shows less than it should&lt;/li&gt;
  &lt;li&gt;Xamarin.iOS linker doesn’t understand that Xamarin.iOS app might be using a binding that might be using another binding. The latter one gets lost durign compilation process.&lt;/li&gt;
  &lt;li&gt;Xamarin.iOS binding projects are actually very smart with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.framework&lt;/code&gt;s.&lt;/li&gt;
  &lt;li&gt;You can test complex NuGet package dependency scenario locally using local NuGet source&lt;/li&gt;
  &lt;li&gt;You can create Xamarin.iOS binding with just Terminal and VS Code. Nice.&lt;/li&gt;
  &lt;li&gt;It is so hard to debug F# FAKE scripts (ionide-fake VSCode extension doesn’t help)&lt;/li&gt;
  &lt;li&gt;CocoaPods spec can be a mess. Definitely moving forward I need to restructure this piece.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;links&quot;&gt;Links&lt;/h4&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/alexsorokoletov/objc-automatic&quot;&gt;Source code on GitHub: objc-automatic&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://developer.xamarin.com/guides/cross-platform/macios/binding/objective-sharpie/&quot;&gt;ObjectiveSharpie from Xamarin&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://developer.xamarin.com/guides/cross-platform/macios/binding/&quot;&gt;Xamarin Documentation - Binding Objective-C&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;disclaimer&quot;&gt;Disclaimer&lt;/h4&gt;
&lt;p&gt;This tool works as it is. There are still things to improve and fix (ZendeskSDK and AWSCognito pods are examples).
Not all metadata flows from pod to NuGet package.
Tool is opensourced and everyone is welcome to use it and improve it.&lt;/p&gt;

&lt;h4 id=&quot;thank-you&quot;&gt;Thank you&lt;/h4&gt;
&lt;p&gt;Big thanks to Xamarin Team (Miguel and Bill) who helped taming Xamarin.iOS linker.
Thanks for F# FAKE team, this is a great tool to start with.&lt;/p&gt;

&lt;p&gt;And thank you for your interest and feedback. 
I appreciate any positive or negative feedback about &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;objc-automatic&lt;/code&gt; and value any success or failure story using this tool.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2017/02/05/objc-automatic-easy-way-to-create-xamarin-bindings-ios/&amp;amp;text=Easy+way+to+create+Xamarin.iOS+binding+from+CocoaPods%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Android Maps Utils for Xamarin updated with new features and NuGet
</title>
   <link href="https://sorokoletov.com/2016/12/12/android-maps-utils-updated-published-nuget/"/>
   <updated>2016-12-12T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2016/12/12/android-maps-utils-updated-published-nuget</id>
   <content type="html">&lt;p&gt;I’ve updated Xamarin Android Maps Utils recently and now one can get this as a &lt;a href=&quot;https://www.nuget.org/packages/Xamarin.Android.Maps.Utils&quot;&gt;NuGet package&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Install-Package Xamarin.Android.Maps.Utils -Pre&lt;/code&gt;&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Currently project has dependency on the latest and greatest Google Play Services package from Xamarin (32.961.0) and requires “TargetFramework” 7.0 (which should be by default for all new projects anyway).
Besides NuGet, project has now latest (0.4.4) java code inside bringing more new features for users.&lt;/p&gt;

&lt;p&gt;Now you get (shameless plug from original repo):&lt;/p&gt;

&lt;blockquote&gt;

  &lt;p&gt;Marker clustering — handles the display of a large number of points&lt;/p&gt;

  &lt;p&gt;Heat maps — display a large number of points as a heat map&lt;/p&gt;

  &lt;p&gt;IconGenerator — display text on your Markers&lt;/p&gt;

  &lt;p&gt;Poly decoding and encoding — compact encoding for paths, interoperability with Maps API web services&lt;/p&gt;

  &lt;p&gt;Spherical geometry — for example: computeDistance, computeHeading, computeArea&lt;/p&gt;

  &lt;p&gt;KML — displays KML data&lt;/p&gt;

  &lt;p&gt;GeoJSON — displays and styles GeoJSON data&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/googlemaps/android-maps-utils&quot;&gt;Google’s Github has a nice GIF demo of what Android Maps Utils can do now&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Interestingly, I was not getting any notifications about activities on this project on Github, now it’s fixed. Thank you for the feedback and pull requests!&lt;/p&gt;

&lt;p&gt;Keep it coming!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Related links:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/xamarin/GooglePlayServicesComponents#versioning&quot;&gt;Versioning of Xamarin.GooglePlayServices&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/alexsorokoletov/Xamarin.Android.Maps.Utils&quot;&gt;Xamarin.Android.Maps.Utils on Github&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2016/12/12/android-maps-utils-updated-published-nuget/&amp;amp;text=Android+Maps+Utils+for+Xamarin+updated+with+new+features+and+NuGet%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Easiest way to migrate from Xamarin.Insights to HockeyApp
</title>
   <link href="https://sorokoletov.com/2016/12/11/migrating-from-xamarin-insights-to-hockeyapp-sdk/"/>
   <updated>2016-12-11T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2016/12/11/migrating-from-xamarin-insights-to-hockeyapp-sdk</id>
   <content type="html">&lt;p&gt;Xamarin.Insights was and still is a great exception tracking system for Xamarin applications. However&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;… Do also note that Xamarin Insights is now considered to be end of life: since the acquisition by Microsoft, Insights has been deprecated in favour of HockeyApp.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Many of us have apps integrated with Xamarin.Insights. Now it’s time to ditch Xamarin.Insights and put HockeyApp SDK instead.
HockeyApp has different integration points and API and some of the features from Insights are missing.&lt;/p&gt;

&lt;p&gt;What would be the easiest way to migrate from Xamarin Insights to HockeyApp?&lt;/p&gt;

&lt;!--more--&gt;

&lt;h3 id=&quot;meet-dtinsightstohockey&quot;&gt;Meet DT.InsightsToHockey&lt;/h3&gt;
&lt;p&gt;With this new project and NuGet package, all you have to do is:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;to remove Xamarin.Insights package and reference&lt;/li&gt;
  &lt;li&gt;and  install DT.InsightsToHockey package.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then, update the API key (change Insights’ one to HockeyApp app id) and you good to go.&lt;/p&gt;

&lt;p&gt;Quite simple, right?&lt;/p&gt;

&lt;p&gt;Here is how it looks in the project:&lt;/p&gt;

&lt;p&gt;Before:
&lt;img src=&quot;/assets/insights_to_hockeyapp_before.png&quot; alt=&quot;Xamarin Insights package in references before&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After:
&lt;img src=&quot;/assets/insights_to_hockeyapp_after.png&quot; alt=&quot;DT.InsightsToHockey package in references after&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Events already coming to HockeyApp after the changes:
&lt;img src=&quot;/assets/insights_to_hockeyapp_events.png&quot; alt=&quot;Events coming to HockeyApp after change&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;how-it-works&quot;&gt;How it works?&lt;/h3&gt;
&lt;p&gt;Under the hood, package exposes exactly same API under same namespace, reporting and integrating with HockeyApp instead.&lt;/p&gt;

&lt;p&gt;Literally, you have to change no code, just references.
Project supports PCL and iOS as of now, Android is in progress. I’ve tried to match all features available in Insights to HockeyApp SDK features. HockeyApp team was very helpful providing some feedback on features parity.&lt;/p&gt;

&lt;p&gt;I will be glad to receive any feedback and help with this project (Android and UWP are waiting!)&lt;/p&gt;

&lt;h4 id=&quot;additional-information&quot;&gt;Additional information&lt;/h4&gt;
&lt;p&gt;I recommended to take a look at features and limitations of HockeyApp SDK for each specific platform.&lt;/p&gt;

&lt;p&gt;HockeyApp is powerful and well-know metrics and crash tracking system. 
You can do in-app updates for iOS/Android, password-protected screens in the app (very well suited for diagnostics/admin screens). You can integrate a feedback page as well.&lt;/p&gt;

&lt;p&gt;This fall Azure integrated HockeyApp with Azure. Data coming to HockeyApp can be available in App Insights for analysis and intelligence.
It is very powerful way to see and analyze events coming from your app. &lt;a href=&quot;https://azure.microsoft.com/en-us/blog/access-hockeyapp-data-in-ai-with-hockeyapp-bridge-app/&quot;&gt;Step by step guidance from AppInsights team.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading. Please let me know your thoughts on the subject.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Related links:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/alexsorokoletov/DT.XamarinInsightsToHockeyApp&quot;&gt;DT.InsightsToHockey on Github&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/bitstadium/HockeySDK-Xamarin&quot;&gt;HockeyApp SDK for Xamarin&lt;/a&gt; and for &lt;a href=&quot;https://github.com/bitstadium/HockeySDK-iOS&quot;&gt;iOS&lt;/a&gt; and &lt;a href=&quot;https://github.com/bitstadium/HockeySDK-Android&quot;&gt;Android&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://developer.xamarin.com/guides/insights/&quot;&gt;Xamarin.Insights Guide&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.xamarin.com/faq#qha1&quot;&gt;What is happening with Xamarin.Insights&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://azure.microsoft.com/en-us/blog/access-hockeyapp-data-in-ai-with-hockeyapp-bridge-app/&quot;&gt;Exploring HockeyApp data in Application Insights: introducing the Bridge App&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.hockeyapp.net/blog/2016/08/30/custom-events-public-preview.html&quot;&gt;Custom events for everybody&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2016/12/11/migrating-from-xamarin-insights-to-hockeyapp-sdk/&amp;amp;text=Easiest+way+to+migrate+from+Xamarin.Insights+to+HockeyApp%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Named parameters in Func&lt;T&gt;/Action&lt;T&gt; type in C#?
</title>
   <link href="https://sorokoletov.com/2016/11/29/naming-func-action-of-t-arguments/"/>
   <updated>2016-11-29T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2016/11/29/naming-func-action-of-t-arguments</id>
   <content type="html">&lt;p&gt;If you ever wondered, why Visual Studio (and Visual Studio for Mac) suggest you to name your lambda arguments with names like arg1, arg2 … argN and so on…&lt;/p&gt;

&lt;p&gt;Here is a common situation where somewhere in your library or helper class you have a method taking in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Func&amp;lt;T&amp;gt;&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Action&amp;lt;T&amp;gt;&lt;/code&gt;.
&lt;img src=&quot;/assets/naming_func_of_t_declaration.png&quot; alt=&quot;Definition of your method using Func/Action classes&quot; /&gt;
and then when you want to use this method VS suggests you following names: arg1 and arg2.
Like there is nothing better than that :)
&lt;img src=&quot;/assets/naming_func_of_t_default_behavior.png&quot; alt=&quot;Definition of your method using Func/Action classes&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There is a cheap and easy &lt;strong&gt;solution for that&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Define your own delegate with same signature as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Func&amp;lt;T&amp;gt;&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Func&amp;lt;T1,T2,T3&amp;gt;&lt;/code&gt; you are using already.&lt;/li&gt;
  &lt;li&gt;Specify intended names for these arguments (in my case arg1 could be better described as service, where arg2 is actually a token).&lt;/li&gt;
  &lt;li&gt;In original method, replace Func&lt;T&gt; with this new delegate.&lt;/T&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/assets/naming_func_of_t_custom_named_delegate.png&quot; alt=&quot;Defining custom delegate with correct names and using it in the original method&quot; /&gt;
After these changes when you are going to use the method, you will see intellisense suggesting correct names and not generic ones.
&lt;img src=&quot;/assets/naming_func_of_t_improved_names.png&quot; alt=&quot;Now you get better names from VS as a suggestion&quot; /&gt;&lt;/p&gt;

&lt;!--more--&gt;

&lt;h4 id=&quot;pros-and-cons&quot;&gt;Pros and Cons&lt;/h4&gt;
&lt;p&gt;&lt;em&gt;Pros&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;You, your team and other people using the API that you expose (whether internally in the app or in the library or NuGet) will see better names and probably will use these names.&lt;/li&gt;
  &lt;li&gt;So code will be easier to read and maintain.&lt;/li&gt;
  &lt;li&gt;If you decide to extend the delegate, you will have to do it in one place only.&lt;/li&gt;
  &lt;li&gt;It’s fun to have smart code suggestions!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Cons&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Bit of extra work and extra code&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;bonus&quot;&gt;Bonus&lt;/h4&gt;
&lt;p&gt;You can have optional &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Func&amp;lt;T&amp;gt;&lt;/code&gt; arguments!
In the example below you can omit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;token&lt;/code&gt; argument completely.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/naming_func_t_bonus.png&quot; alt=&quot;Optional arguments in Func of T csharp&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2016/11/29/naming-func-action-of-t-arguments/&amp;amp;text=Named+parameters+in+Func%26lt%3BT%26gt%3B%2FAction%26lt%3BT%26gt%3B+type+in+C%23%3F%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>.editorconfig support in Visual Studio 2017
</title>
   <link href="https://sorokoletov.com/2016/11/28/editorconfig-in-visualstudio/"/>
   <updated>2016-11-28T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2016/11/28/editorconfig-in-visualstudio</id>
   <content type="html">&lt;p&gt;Just recently, Visual Studio team published a post on &lt;a href=&quot;https://blogs.msdn.microsoft.com/visualstudio/2016/11/28/productivity-in-visual-studio-2017-rc/&quot;&gt;great features coming to the VS 2017 that will increase your productivity&lt;/a&gt;. Among those, one small but powerful feature coming to the Visual Studio.&lt;/p&gt;

&lt;p&gt;It’s .editorconfig support.
What’s so great about this?
&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;EditorConfig support is a good first step to support all platforms and editors of choice uniformely. Working with Xamarin apps from Windows and OS X in distributed teams, I learned hard way how tabs (gosh, again?) could be disruptive to smooth team work.&lt;/p&gt;

&lt;h4 id=&quot;what-is-editorconfig&quot;&gt;What is EditorConfig?&lt;/h4&gt;
&lt;p&gt;Quote from &lt;a href=&quot;http://editorconfig.org/&quot;&gt;EditorConfig website&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In other words, having .editorconfig in the root of your project will guarantee that any editor supporting it will comply with defined settings and will keep your codebase in the same format as team agreed.&lt;/p&gt;

&lt;h4 id=&quot;what-can-we-config-in-the-editor-then&quot;&gt;What can we config in the editor then?&lt;/h4&gt;
&lt;p&gt;EditorConfig in VS 2017 supports following settings:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;indent_style&lt;/li&gt;
  &lt;li&gt;indent_size&lt;/li&gt;
  &lt;li&gt;tab_width&lt;/li&gt;
  &lt;li&gt;end_of_line&lt;/li&gt;
  &lt;li&gt;charset&lt;/li&gt;
  &lt;li&gt;trim_trailing_whitespace&lt;/li&gt;
  &lt;li&gt;insert_final_newline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options&quot;&gt;Overview how to setup .editorconfig&lt;/a&gt; is available in the Microsoft Docs.&lt;/p&gt;

&lt;p&gt;I will quote one paragraph from the docs since it’s very well written:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;… EditorConfig files enable you to maintain consistent coding styles and settings for a language … in a codebase regardless of the editor or IDE you use.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;EditorConfig doesn’t support full set of C# formatting rules, so it’s not a replacement for formatting settings in VS or code formatting policy in Xamarin Studio (XS stores settings in a .sln file).&lt;/p&gt;

&lt;p&gt;I am sure we will see more tools/features coming to support different editors and environments to keep consistent coding styles.&lt;/p&gt;

&lt;p&gt;If you are interested in the topic, please read my recent article on having &lt;a href=&quot;.2016/11/13/csharp-standard-style/&quot;&gt;standard C# formatting style&lt;/a&gt; and feel free to share your opinion.&lt;/p&gt;

&lt;h5 id=&quot;additional-reading&quot;&gt;Additional reading&lt;/h5&gt;
&lt;p&gt;&lt;a href=&quot;http://editorconfig.org/#download&quot;&gt;EditorConfig.org plugins for IDE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://blogs.msdn.microsoft.com/visualstudio/2016/11/16/visual-studio-2017-rc/&quot;&gt;Overview of VS 2017 Release Candidate&lt;/a&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2016/11/28/editorconfig-in-visualstudio/&amp;amp;text=.editorconfig+support+in+Visual+Studio+2017%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>C# Standard Style - single source of formatting truth
</title>
   <link href="https://sorokoletov.com/2016/11/13/csharp-standard-style/"/>
   <updated>2016-11-13T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2016/11/13/csharp-standard-style</id>
   <content type="html">&lt;p&gt;Months ago &lt;a href=&quot;https://www.paralect.com/team&quot;&gt;Andrew Orsich&lt;/a&gt; told me about this great tool called &lt;a href=&quot;http://standardjs.com/&quot;&gt;javascript standard style&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Absolutely amazing.&lt;/p&gt;

&lt;p&gt;What it does is just formats code with one pre-configured, non-changeable, non-customizeable, non-arguable style. &lt;strong&gt;You either use it or not&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;After that, all discussions about curly braces, tabs and spaces go to void. Done.&lt;/p&gt;

&lt;p&gt;I’d like to have this for C#.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;We all had enough of discussions whether use tabs or spaces (it’s still happens), where to put braces, how do we name methods and variables. I feel this is especially important now, when .NET is opensource, when C# is being used for iOS and Android development, when many of C# developers are working on Mac and Linux.&lt;/p&gt;

&lt;p&gt;Frankly, we are all already using &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/ff926074.aspx&quot;&gt;Microsoft C# Coding Conventions&lt;/a&gt; in some way. It’s just these slight modifications that make us spend time on formatting and arguing about these changes or undoing them.&lt;/p&gt;

&lt;p&gt;I want my team and everyone developing in C# focus on functionality and forget about formatting forever.&lt;/p&gt;

&lt;p&gt;Let’s make it happen.&lt;/p&gt;

&lt;h2 id=&quot;there-should-be-something-for-this-right&quot;&gt;There should be something for this, right?&lt;/h2&gt;

&lt;p&gt;Tools already exist, however…&lt;/p&gt;

&lt;p&gt;One can use Visual Studio settings and configure C# formatting. Then do the same with Xamarin Studio.(strictly speaking, having XS format C# code exactly same way as VS is not possible). 
And what about VS Code?&lt;/p&gt;

&lt;p&gt;There is an &lt;a href=&quot;https://github.com/editorconfig/editorconfig-vscode&quot;&gt;.editorconfig support for Visual Studio&lt;/a&gt; but it’s covering just part of formatting questions.&lt;/p&gt;

&lt;p&gt;ReSharper is another candidate, however, it doesn’t work with Xamarin Studio and you can customize rules.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/onovotny&quot;&gt;Oren&lt;/a&gt; kindly pointed there is a &lt;a href=&quot;https://github.com/dotnet/codeformatter&quot;&gt;dotnet/CodeFormatter project&lt;/a&gt; and &lt;a href=&quot;https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/contributing.md&quot;&gt;Roslyn and .NET Core teams use styles&lt;/a&gt; enforced by the tool.&lt;/p&gt;

&lt;p&gt;Good old StyleCop/FxCop might be suitable as well, but again, you can and have to customize it.&lt;/p&gt;

&lt;p&gt;Unfortunately, all available tools are customizable. As long as you use them, there will be always someone who will do something his way.  Again, I want to have this binary and simple choice. Use it or don’t use it.&lt;/p&gt;

&lt;h2 id=&quot;should-we-build-another-tool&quot;&gt;Should we build another tool?&lt;/h2&gt;

&lt;p&gt;Actually, CodeFormatter is a good candidate for becoming a single source of truth. It has default rules baked in, it runs on Windows and Mono and it’s built with Roslyn and people are already using it. Here is a &lt;a href=&quot;https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md&quot;&gt;list of rules CodeFormatter enforces&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I feel like we just need to extend it and build VS extension, Xamarin Add-in and VS Code extension to make experience seamless.&lt;/p&gt;

&lt;h2 id=&quot;its-just-your-crazy-idea&quot;&gt;It’s just your crazy idea&lt;/h2&gt;

&lt;p&gt;According to the post from Roslyn team, I’m not alone&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://blogs.msdn.microsoft.com/dotnet/2015/02/09/automatic-code-formatter-released-to-github/&quot;&gt;Automatic code formatter released to GitHub&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;We strongly believe that having a consistent style greatly increases the readability and maintainability of a code base. The individual style decisions themselves are subjective, the key is the consistency of the decisions. As such the .NET team has a set of style guidelines for all C# code written by the team.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;i-have-another-ideaopinion&quot;&gt;I have another idea/opinion&lt;/h2&gt;

&lt;p&gt;I would love to hear your feedback and thoughs on this idea. Feel free to contact me or comment this article and please share it with your team and friends.&lt;/p&gt;

&lt;h2 id=&quot;qa&quot;&gt;Q&amp;amp;A&lt;/h2&gt;

&lt;h4 id=&quot;i-do-not-want-to-re-format-my-solution&quot;&gt;I do not want to re-format my solution.&lt;/h4&gt;
&lt;p&gt;You don’t need to re-format existing codebase unless you want. When you start your next project, this is the best time to start using C# Standard Format.&lt;/p&gt;

&lt;h4 id=&quot;why-we-should-enforce-style-a-and-not-enforce-style-b&quot;&gt;Why we should enforce style A and not enforce style B.&lt;/h4&gt;

&lt;p&gt;Discussing specific style settings is not the goal of this post.&lt;/p&gt;

&lt;h4 id=&quot;i-will-not-use-this-c-standard-formatting&quot;&gt;I will not use this C# standard formatting.&lt;/h4&gt;

&lt;p&gt;Fine, it’s “use it or don’t”. Nothing will change for people that don’t want to use a non-customizeable set of rules. A lot of free time will come to those that want to use it.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2016/11/13/csharp-standard-style/&amp;amp;text=C%23+Standard+Style+-+single+source+of+formatting+truth%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>MaterialDateTimePicker bindings for Xamarin.Android apps
</title>
   <link href="https://sorokoletov.com/2016/02/29/material-date-time-picker-available-for-xamarin-android-apps-bindings/"/>
   <updated>2016-02-29T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2016/02/29/material-date-time-picker-available-for-xamarin-android-apps-bindings</id>
   <content type="html">&lt;h3 id=&quot;bindings-for-materialdatetimepicker-for-xamarinandroid-apps&quot;&gt;Bindings for MaterialDateTimePicker for Xamarin.Android apps&lt;/h3&gt;

&lt;p&gt;One of the good libraries for Android apps made in Material design is the &lt;a href=&quot;https://github.com/wdullaer/MaterialDateTimePicker&quot;&gt;“Material DateTime Picker”&lt;/a&gt; from &lt;a href=&quot;https://github.com/wdullaer&quot;&gt;@wdullaer&lt;/a&gt;.
Here is a short article how to create Xamarin.Android bindings library to consume that awesome picker in your Xamarin.Android applications.
&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;TLDR:  &lt;a href=&quot;https://github.com/alexsorokoletov/Xamarin.Wdullaer.MaterialDateTimePicker&quot;&gt;https://github.com/alexsorokoletov/Xamarin.Wdullaer.MaterialDateTimePicker&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;creating-java-library-bindings-for-xamarinandroid&quot;&gt;Creating java library bindings for Xamarin.Android&lt;/h3&gt;

&lt;p&gt;There is an official guide from Xamarin: 
&lt;a href=&quot;https://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/binding-a-java-library/&quot;&gt;Binding a Java Library - Consuming Java libraries from C#&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, we need to get the JAR/AAR file.
Looking at &lt;a href=&quot;https://github.com/wdullaer/MaterialDateTimePicker&quot;&gt;github page&lt;/a&gt;, we can see Maven banner. It means that we can grab a binary from Maven so let’s go there and do it:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://repo1.maven.org/maven2/com/wdullaer/materialdatetimepicker/2.2.0/&quot;&gt;https://repo1.maven.org/maven2/com/wdullaer/materialdatetimepicker/2.2.0/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, following the Xamarin guide, we will see 3 errors:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Vendor/MaterialDateTimePickerBinding/obj/Debug/generated/src/Com.Wdullaer.Materialdatetimepicker.Date.MonthView.cs(34,34): 
  Error CS0533: `Com.Wdullaer.Materialdatetimepicker.Date.MonthView.MonthViewTouchHelper.GetVisibleVirtualViews(System.Collections.Generic.IList&amp;lt;Java.Lang.Integer&amp;gt;)&apos; 
  hides inherited abstract member `Android.Support.V4.Widget.ExploreByTouchHelper.GetVisibleVirtualViews(System.Collections.Generic.IList&amp;lt;Java.Lang.Integer&amp;gt;)&apos;
  (CS0533) (MaterialDateTimePickerBinding)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; Vendor/MaterialDateTimePickerBinding/obj/Debug/generated/src/Com.Wdullaer.Materialdatetimepicker.Date.MonthView.cs(36,36): Error CS0534: `Com.Wdullaer.Materialdatetimepicker.Date.MonthView.MonthViewTouchHelper&apos; does not implement inherited abstract member `Android.Support.V4.Widget.ExploreByTouchHelper.GetVisibleVirtualViews(System.Collections.Generic.IList&amp;lt;Java.Lang.Integer&amp;gt;)&apos; (CS0534) (MaterialDateTimePickerBinding)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; Vendor/MaterialDateTimePickerBinding/obj/Debug/generated/src/Com.Wdullaer.Materialdatetimepicker.Time.Timepoint.cs(23,23): Error CS0535: `Com.Wdullaer.Materialdatetimepicker.Time.Timepoint&apos; does not implement interface member `Java.Lang.IComparable.CompareTo(Java.Lang.Object)&apos; (CS0535) (MaterialDateTimePickerBinding)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;1st and 2nd are pretty simple. As these methods most definitely will not be consumed from C# side, we can just remove these methods from bindings.&lt;/p&gt;

&lt;p&gt;For that we use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;remove-node /&amp;gt;&lt;/code&gt; instruction in Metadata.xml.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;remove-node&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;path=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/api/package[@name=&apos;com.wdullaer.materialdatetimepicker.date&apos;]/class[@name=&apos;MonthView.MonthViewTouchHelper&apos;]/method[@name=&apos;getVisibleVirtualViews&apos; and count(parameter)=1 and parameter[1][@type=&apos;java.util.List&amp;amp;lt;java.lang.Integer&amp;amp;gt;&apos;]]&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;remove-node&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;path=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/api/package[@name=&apos;com.wdullaer.materialdatetimepicker.date&apos;]/class[@name=&apos;MonthView.MonthViewTouchHelper&apos;]&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To solve 3rd problem we need to add a partial class to Additions folder:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;    
&lt;span class=&quot;k&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;Com.Wdullaer.Materialdatetimepicker.Time&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;cm&quot;&gt;/*
     * add partial class due to Java generics and IComparable interface in Xamarin.Android
     * Vendor/MaterialDateTimePickerBinding/obj/Debug/generated/src/Com.Wdullaer.Materialdatetimepicker.Time.Timepoint.cs(23,23): Error CS0535: &apos;Com.Wdullaer.Materialdatetimepicker.Time.Timepoint&apos; does not implement interface member &apos;Java.Lang.IComparable.CompareTo(Java.Lang.Object)&apos; (CS0535) (MaterialDateTimePickerBinding)
     * https://forums.xamarin.com/discussion/1950/binding-jar-file-with-class-that-implements-java-lang-icomparable
     */&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;partial&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Timepoint&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Lang&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IComparable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;CompareTo&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Lang&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;CompareTo&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Timepoint&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;obj&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Solution to this issue I found on &lt;a href=&quot;https://forums.xamarin.com/discussion/38247/binding-issue-with-android-support-v4-widget-explorebytouchhelper-getvisiblevirtualviews&quot;&gt;Xamarin Forums&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As usual, very helpful were comments and examples from &lt;a href=&quot;https://github.com/brendanzagaeski&quot;&gt;brendanzagaeski&lt;/a&gt; with different approaches to different java-to-csharp binding problems. Links to these examples are in the end of the page.&lt;/p&gt;

&lt;h3 id=&quot;jaraar-dependencies&quot;&gt;JAR/AAR dependencies&lt;/h3&gt;
&lt;p&gt;This library we are binding now has only one dependency:
&lt;a href=&quot;https://github.com/wdullaer/MaterialDateTimePicker/blob/master/library/build.gradle#L23&quot;&gt;https://github.com/wdullaer/MaterialDateTimePicker/blob/master/library/build.gradle#L23&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;com.android.support:support-v4:23.1.1&lt;/code&gt; which translates to Xamarin Nuget package called Xamarin.Android.Support.v4 of version 23.1.1.&lt;/p&gt;

&lt;p&gt;So we will just add this Nuget package to our bindings project and that’s it.
Clean and Build the project and you should see 0 errors.
Yaay!&lt;/p&gt;

&lt;h3 id=&quot;how-to-use-this-library-examples&quot;&gt;How to use this library (examples)&lt;/h3&gt;

&lt;p&gt;On C# side what you need to do is following:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;reference the bindings project in your app project&lt;/li&gt;
  &lt;li&gt;in your activity implement interface OnTimeSetListener/OnDateSetListener&lt;/li&gt;
  &lt;li&gt;create a datepicker and show it&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These steps are described in the &lt;a href=&quot;https://github.com/wdullaer/MaterialDateTimePicker/blob/master/README.md&quot;&gt;Readme.md file of the original library&lt;/a&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;&lt;span class=&quot;c1&quot;&gt;//implement OnDateSetListener&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;HomeView&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;BaseActionBarView&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;HomeViewModel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;&amp;gt;,&lt;/span&gt;  
&lt;span class=&quot;n&quot;&gt;Com&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Wdullaer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Materialdatetimepicker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DatePickerDialog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IOnDateSetListener&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;        
&lt;span class=&quot;k&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;OnChooseDateButtonClick&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sender&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;EventArgs&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Util&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Calendar&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;now&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Util&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Calendar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Instance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;Com&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Wdullaer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Materialdatetimepicker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DatePickerDialog&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dpd&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; 
        &lt;span class=&quot;n&quot;&gt;Com&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Wdullaer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Materialdatetimepicker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DatePickerDialog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;NewInstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Util&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CalendarField&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Year&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Util&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CalendarField&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Month&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;now&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Util&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CalendarField&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DayOfMonth&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;dpd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FragmentManager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;Datepickerdialog&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;OnDateSet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Com&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Wdullaer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Materialdatetimepicker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;DatePickerDialog&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;p3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;p0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Dismiss&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
		&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Make sure you are using the same version of Xamarin.Android.Support.v4 package in your application project.&lt;/p&gt;

&lt;h3 id=&quot;demo&quot;&gt;Demo&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/assets/material-date-time-picker-xamarin-android.png&quot; alt=&quot;Material Date Time Picker in Xamarin.Android app&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;source-code&quot;&gt;Source code&lt;/h3&gt;

&lt;p&gt;See &lt;a href=&quot;https://github.com/alexsorokoletov/Xamarin.Wdullaer.MaterialDateTimePicker&quot;&gt;Xamarin.Wdullaer.MaterialDateTimePicker&lt;/a&gt; github repository. 
Clone it and use it or just add as a submodule.&lt;/p&gt;

&lt;h3 id=&quot;improving-further&quot;&gt;Improving further&lt;/h3&gt;

&lt;p&gt;One thing definitely open for improvement is parameter names. Right now in many places it’s just p0, p1, p2, p3.&lt;/p&gt;

&lt;p&gt;Naming them hour, minute, second, isAmPm would make code cleaner and easier to understand.&lt;/p&gt;

&lt;p&gt;So if you feel like fixing something feel free to submit pull request. (Or if you know how to fix these names automaticall - let me know, please).&lt;/p&gt;

&lt;h3 id=&quot;helpful-links&quot;&gt;Helpful links&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;My other Xamarin.Android bindings:&lt;/p&gt;

    &lt;p&gt;&lt;a href=&quot;http://dreamteam-mobile.com/blog/2015/04/tutorial-android-float-label-binding-for-xamarin-android/&quot;&gt;Tutorial – Android float label binding for Xamarin.Android&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;&lt;a href=&quot;http://sorokoletov.com/2015/12/28/android-maps-utils-available-for-xamarin-android-apps-bindings/&quot;&gt;Tutorial – Android-maps-utils bindings for Xamarin.Android apps&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;brendanzagaeski Metadata.xml examples:&lt;/p&gt;

    &lt;p&gt;&lt;a href=&quot;https://gist.github.com/brendanzagaeski/c32d65c21e152799af69&quot;&gt;https://gist.github.com/brendanzagaeski/c32d65c21e152799af69&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/6d1052a8b76f9067548e&quot;&gt;https://gist.github.com/brendanzagaeski/6d1052a8b76f9067548e&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/69f490e31ca6a71136ff&quot;&gt;https://gist.github.com/brendanzagaeski/69f490e31ca6a71136ff&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/3868e30b85a1feb1181b&quot;&gt;https://gist.github.com/brendanzagaeski/3868e30b85a1feb1181b&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/9834034&quot;&gt;https://gist.github.com/brendanzagaeski/9834034&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/9607158&quot;&gt;https://gist.github.com/brendanzagaeski/9607158&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2016/02/29/material-date-time-picker-available-for-xamarin-android-apps-bindings/&amp;amp;text=MaterialDateTimePicker+bindings+for+Xamarin.Android+apps%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>gMaps for Windows Phone got 100k reviews!
</title>
   <link href="https://sorokoletov.com/2016/02/22/gmaps-got-100000-reviews-in-store/"/>
   <updated>2016-02-22T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2016/02/22/gmaps-got-100000-reviews-in-store</id>
   <content type="html">&lt;p&gt;Monitoring app reviews with Reviews Reader app &lt;a href=&quot;http://twitter.com/winreviews&quot;&gt;@winreviews&lt;/a&gt;, I finally noticed gMaps got 100k of reviews!&lt;/p&gt;

&lt;p&gt;Thank you, users! We are reading all of them, believe it or not!
&lt;!--more--&gt;
&lt;img src=&quot;/assets/gmaps-got-100k-reviews.png&quot; alt=&quot;gMaps is top free navigation app for Windows Phone&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you have any ideas how to make the app better, or any other feedback, feel free to contact us using &lt;a href=&quot;mailto:gmaps.feedback@gmail.com&quot;&gt;gmaps feedback email&lt;/a&gt;
 address or &lt;a href=&quot;https://gmaps.uservoice.com/&quot;&gt;gMaps uservoice&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2016/02/22/gmaps-got-100000-reviews-in-store/&amp;amp;text=gMaps+for+Windows+Phone+got+100k+reviews%21%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Coding for fun - AT&amp;T signal levels on route from DC to Snowshoe, WV
</title>
   <link href="https://sorokoletov.com/2016/01/05/coding-for-fun-att-signal-strength-dc-to-snowshoe-ios/"/>
   <updated>2016-01-05T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2016/01/05/coding-for-fun-att-signal-strength-dc-to-snowshoe-ios</id>
   <content type="html">&lt;p&gt;We go the &lt;a href=&quot;http://snowshoemtn.com&quot;&gt;Snowshoe ski resort&lt;/a&gt; almost every weekend when there is snow.
Driving there takes up to 5 hours.
As long as you drive off the interstate you loose your cell signal.&lt;/p&gt;

&lt;p&gt;Last year we had to learn how to drive and communicate in a disconnected world. We now know the route by heart, we know stops, we know which restaurants or gas stations have Wi-Fi. We also got some low-power FRS radios to have more flexibility during our trips.&lt;/p&gt;

&lt;p&gt;Honestly, I was always wondering why T-Mobile was so bad in this area. This spring I switched to AT&amp;amp;T to compare the coverage on Outer Banks (where T-Mobile is also failing to get you even basic coverage).
Now it`s winter and it’s time to check out AT&amp;amp;T coverage in our favorite skiing area.&lt;/p&gt;

&lt;p&gt;Let’s see how we do that and what we find
&lt;!--more--&gt;&lt;/p&gt;

&lt;h3 id=&quot;why&quot;&gt;Why&lt;/h3&gt;
&lt;p&gt;As the article says, point is get some code just for fun. And see, if switching from T-Mobile to AT&amp;amp;T makes any sense.
And see, maybe there is a reason why we have almost no coverage off the interstates.&lt;/p&gt;

&lt;h3 id=&quot;technical-details&quot;&gt;Technical details&lt;/h3&gt;
&lt;p&gt;So, I had macbook with OS X and Windows 10, iPhone 6 and Lumia 950 and Lumia 925. First idea was to have Lumia 950 with AT&amp;amp;T and Lumia 925 with T-Mobile run same app along the route and then compare results. Unfortunately, I forgot my USB C cable so 950 died on the way there. 
So plan changed and I got an iOS app and did a AT&amp;amp;T cellular network signal level log on the way back.&lt;/p&gt;

&lt;p&gt;Interesting that iOS has no public API to get cellular service signal level. There was some way in iOS 4.2 days &lt;a href=&quot;https://github.com/valexa/VAFieldTest&quot;&gt;VAFieldTest&lt;/a&gt;. Doesn’t work now.
However, there is a way to get a signal level on iOS 9 devices. Kind gentleman shared the idea on Stack Overflow: &lt;a href=&quot;http://stackoverflow.com/a/34389611/883738&quot;&gt;Measuring cellular signal strength&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That was enough for the first version.&lt;/p&gt;

&lt;p&gt;You can get the app from github - &lt;a href=&quot;https://github.com/alexsorokoletov/SignalLogger&quot;&gt;github.com/alexsorokoletov/SignalLogger&lt;/a&gt;. App tracks GPS and signal level every 10 seconds, while tracking screen stays active, all results are exported to CSV and emailed to you after you stop tracking. Keep it simple.&lt;/p&gt;

&lt;h3 id=&quot;results&quot;&gt;Results&lt;/h3&gt;
&lt;p&gt;Gist with raw CSV data: &lt;a href=&quot;https://gist.github.com/alexsorokoletov/0ce68926804dee671563&quot;&gt;DC to Snowshoe ATT signal strength data.csv&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using QGIS I was able to get the results on the map:&lt;/p&gt;

&lt;p&gt;This is a complete route from DC to Snowshoe, WV with AT&amp;amp;T signal level. Green - available, red - unavailable.
I have no idea yet how to make the route colorful with orange where the signal is low and green where it is good.
&lt;img src=&quot;/assets/dc-snowshoe-att-signal-level-complete.png&quot; alt=&quot;Complete route from DC to Snowshoe, WV with AT&amp;amp;T signal level&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Part of the route where the service is available.
&lt;img src=&quot;/assets/dc-snowshoe-att-signal-level-available.png&quot; alt=&quot;Route from DC to Snowshoe, WV where AT&amp;amp;T is available&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Part of the route where the service is &lt;strong&gt;not&lt;/strong&gt; available.
&lt;img src=&quot;/assets/dc-snowshoe-att-signal-level-unavailable.png&quot; alt=&quot;Route from DC to Snowshoe, WV without AT&amp;amp;T service&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And also a terrain based part of the map where the AT&amp;amp;T service is interrupted.
&lt;img src=&quot;/assets/dc-snowshoe-att-signal-level-terrain.png&quot; alt=&quot;AT&amp;amp;T service with terrain map as a base&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Looks like the rule for the AT&amp;amp;T service is simple. Inside park areas (forests, national and state parks - green on the terrain map) service is absent. Otherwise AT&amp;amp;T gives some coverage.&lt;/p&gt;

&lt;p&gt;I was surprised to find out that the coverage is not actually related to &lt;a href=&quot;https://en.wikipedia.org/wiki/United_States_National_Radio_Quiet_Zone&quot;&gt;the US NRQZ area&lt;/a&gt; or distance to &lt;a href=&quot;https://en.wikipedia.org/wiki/Green_Bank_Telescope&quot;&gt;the Green Bank Radio Observatory&lt;/a&gt;. 
One can get some details about that in the NPR article &lt;a href=&quot;http://www.npr.org/sections/alltechconsidered/2013/10/08/218976699/enter-the-quiet-zone-where-cell-service-wi-fi-are-banned&quot;&gt;Enter The Quiet Zone: Where Cell Service, Wi-Fi Are Banned&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;next-steps&quot;&gt;Next steps&lt;/h3&gt;
&lt;p&gt;Next time we go to the Snowshoe resort, I’m going to get T-Mobile coverage results and then compare and see if it makes sense to have one or another.&lt;/p&gt;

&lt;h3 id=&quot;thoughts&quot;&gt;Thoughts&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;What is wrong with Apple not providing API for cellular service signal strength?&lt;/p&gt;

    &lt;p&gt;I guess it would benefit if Apple would be more open in terms of APIs available.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;There are interesting ways of getting data through private Apple APIs and from private UIView classes &lt;a href=&quot;stackoverflow.com/questions/754824/get-an-object-properties-list-in-objective-c&quot;&gt;Get an object properties list in Objective-C&lt;/a&gt; and &lt;a href=&quot;https://github.com/valexa/VAFieldTest/blob/master/CoreTelephony.txt&quot;&gt;CoreTelephony.h file&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;These ways will stop your app from being published in the App Store, but for experiments like this are good alternative.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s see if Microsoft is more open with cellular&lt;/p&gt;

    &lt;p&gt;Probably, there are different ways to access this data just because MS had different API sets for WP7, WP8, WinRT (WPA81) and Windows 10 UWP. Let’s see who is the winner.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;I want to render same data in the Microsoft Power BI. Presumably, this is the kind of tasks to be handled by the Power BI.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2016/01/05/coding-for-fun-att-signal-strength-dc-to-snowshoe-ios/&amp;amp;text=Coding+for+fun+-+AT%26amp%3BT+signal+levels+on+route+from+DC+to+Snowshoe%2C+WV%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Android-maps-utils bindings for Xamarin.Android apps
</title>
   <link href="https://sorokoletov.com/2015/12/28/android-maps-utils-available-for-xamarin-android-apps-bindings/"/>
   <updated>2015-12-28T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2015/12/28/android-maps-utils-available-for-xamarin-android-apps-bindings</id>
   <content type="html">&lt;h3 id=&quot;bindings-for-android-maps-utils-for-xamarinandroid-apps&quot;&gt;Bindings for android-maps-utils for Xamarin.Android apps&lt;/h3&gt;

&lt;p&gt;Many developers use Google Maps for Android (Google Play Services) to display maps and related content in Xamarin-based Android apps.&lt;/p&gt;

&lt;p&gt;Javascript SDK for Google Maps has clustering and other neat stuff built in. Android Maps SDK has none of this included. 
However, there is a solution!&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;To address this problem, Google Maps team shared so called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;android-maps-utils&lt;/code&gt; extensions to the Android maps SDK which allows you do following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Marker clustering — handles the display of a large number of points&lt;/li&gt;
  &lt;li&gt;Heat maps — display a large number of points as a heat map&lt;/li&gt;
  &lt;li&gt;IconGenerator — display text on your Markers (see screenshot to the right)&lt;/li&gt;
  &lt;li&gt;Poly decoding and encoding — compact encoding for paths, interoperability with Maps API web services&lt;/li&gt;
  &lt;li&gt;Spherical geometry — for example: computeDistance, computeHeading, computeArea&lt;/li&gt;
  &lt;li&gt;KML — displays KML data (Caution: Beta!)&lt;/li&gt;
  &lt;li&gt;GeoJSON — displays and styles GeoJSON data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(Please read more on the official website: &lt;a href=&quot;http://googlemaps.github.io/android-maps-utils/&quot;&gt;http://googlemaps.github.io/android-maps-utils/&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Down the road you can find steps and details how the bindings for quite complex java library could be created and how these fresh bindings for Android Maps utils could be consumed in the Xamarin Android application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To get to the how to part, scroll down&lt;/strong&gt;&lt;/p&gt;

&lt;h3 id=&quot;existing-xamarinandroid-bindings&quot;&gt;Existing Xamarin.Android bindings&lt;/h3&gt;
&lt;p&gt;Particularly I was interesting about clustering, as the application has to display around 500 markers in a dense area.&lt;/p&gt;

&lt;p&gt;Looking for existing solution to the problem, one can find &lt;a href=&quot;https://github.com/oystehei/MapsUtilityDemo&quot;&gt;bindings made by Øystein Heimark&lt;/a&gt;. But these are quite old. To practice and to get the freshest code, I’ve created the updated bindings:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/alexsorokoletov/Xamarin.Android.Maps.Utils&quot;&gt;github.com/alexsorokoletov/Xamarin.Android.Maps.Utils&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;creating-java-library-bindings-for-xamarinandroid&quot;&gt;Creating java library bindings for Xamarin.Android&lt;/h3&gt;

&lt;p&gt;There is an official guide from Xamarin: 
&lt;a href=&quot;https://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/binding-a-java-library/&quot;&gt;Binding a Java Library - Consuming Java libraries from C#&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Following the guide, one can sometimes see warnings or erros on the bindings.
For example, 
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/GoogleMapsUtilityBinding/obj/Debug/generated/src/Com.Google.Maps.Android.Geojson.GeoJsonLineStringStyle.cs(118,118): Error CS0234: The type or namespace name &apos;IGeoJsonStyle&apos; does not exist in the namespace &apos;Com.Google.Maps.Android.Geojson&apos;. Are you missing an assembly reference? (CS0234) (GoogleMapsUtilityBinding)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To fix this error all you need is to manually &lt;a href=&quot;https://github.com/alexsorokoletov/Xamarin.Android.Maps.Utils/blob/master/Transforms/Metadata.xml#L15&quot;&gt;edit Metadata.xml file and introduce these changes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you proceed, there will be a few more errors and several warnings. Fixes for them are documented in the &lt;a href=&quot;https://github.com/alexsorokoletov/Xamarin.Android.Maps.Utils/blob/master/Transforms/Metadata.xml&quot;&gt;Metadata.xml file&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More than helpful were comments and examples from &lt;a href=&quot;https://github.com/brendanzagaeski&quot;&gt;brendanzagaeski&lt;/a&gt; with different approaches to different java-to-csharp binding problems. Links to these examples are in the end of the page.&lt;/p&gt;

&lt;h3 id=&quot;jaraar-dependencies&quot;&gt;JAR/AAR dependencies&lt;/h3&gt;
&lt;p&gt;Case with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;android-maps-utils&lt;/code&gt; is interesting because the jar/aar file depends on google-play-services.jar and android-support-v4.jar.
Xamarin suggests to add these jar files as ReferenceJar items by setting Build Action to ReferenceJar. What is missing here for a successful compilation is a C# side of these reference jars. After adding the jars you need to add a Nuget packages or Xamarin components with C# bindings for these jars.
With that change,C# bindings generator will generate correct code an generated C# code will be compilable, because you already have C# part of the referenced libraries.&lt;/p&gt;

&lt;p&gt;One of the questions one might have - which version of google-play-services.jar should we use?
&lt;a href=&quot;https://github.com/googlemaps/android-maps-utils/blob/master/library/build.gradle#L19&quot;&gt;The android-maps-utils library is compiled against google-play-services 7.8.0&lt;/a&gt;, so, basically, we can use anything &amp;gt;=7.8.0&lt;/p&gt;

&lt;h3 id=&quot;how-to-use-this-library-examples&quot;&gt;How to use this library (examples)&lt;/h3&gt;

&lt;p&gt;On C# side what you need to do is following:
0) reference the bindings
1) instantiate cluster manager&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;&lt;span class=&quot;c1&quot;&gt;//on MapReady&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;_clusterManager&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;ClusterManager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;_map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;SetOnCameraChangeListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_clusterManager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;_map&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;SetOnMarkerClickListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_clusterManager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If you already have custom handlers to map CameraChange/MarkerClick, you can do following (specifics of Xamarin.Android events subscriptions)&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;        
&lt;span class=&quot;k&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;map_MarkerClick&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sender&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GoogleMap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;MarkerClickEventArgs&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;kt&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;handled&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_clusterManager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;OnMarkerClick&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Marker&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;handled&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;//your custom code&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;map_CameraChange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kt&quot;&gt;object&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sender&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;GoogleMap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;CameraChangeEventArgs&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;_clusterManager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;OnCameraChange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;//your custom code&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
		&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;2) implement custom IClusterItem object&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;&lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ServiceClusterItem&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Java&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Lang&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Object&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;IClusterItem&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;ServiceClusterItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ServiceItem&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;serviceItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;Position&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;LatLng&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;serviceItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Lat&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;serviceItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Lon&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;ServiceClusterItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;IntPtr&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;handle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Android&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;Runtime&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;JniHandleOwnership&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;transfer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;base&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;handle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;transfer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;LatLng&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Position&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;3) add items to the clusterer and enjoy&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-csharp&quot; data-lang=&quot;csharp&quot;&gt;&lt;span class=&quot;kt&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;clusterItem&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;ServiceClusterItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(...);&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;_clusterManager&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;AddItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;clusterItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;What if you have another version of Google Play Services already linked to your main project?
In that case fork the repo and remove references that it has currently and then add references to the same packages and versions you have in your main project.&lt;/p&gt;

&lt;h3 id=&quot;helpful-links&quot;&gt;Helpful links&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;My other Xamarin bindings:
&lt;a href=&quot;http://dreamteam-mobile.com/blog/2015/04/tutorial-android-float-label-binding-for-xamarin-android/&quot;&gt;Tutorial – Android float label binding for Xamarin.Android&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;“Maps Shortcuts: Android Maps Utility Library” youtube video
  &lt;a href=&quot;https://www.youtube.com/watch?v=nb2X9IjjZpM&quot;&gt;Maps Shortcuts: Android Maps Utility Library&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;example of use for original android maps util library
&lt;a href=&quot;https://github.com/googlemaps/android-maps-utils/tree/master/demo&quot;&gt;github.com/googlemaps/android-maps-utils/tree/master/demo&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;brendanzagaeski Metadata.xml examples:&lt;/p&gt;

    &lt;p&gt;&lt;a href=&quot;https://gist.github.com/brendanzagaeski/c32d65c21e152799af69&quot;&gt;https://gist.github.com/brendanzagaeski/c32d65c21e152799af69&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/6d1052a8b76f9067548e&quot;&gt;https://gist.github.com/brendanzagaeski/6d1052a8b76f9067548e&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/69f490e31ca6a71136ff&quot;&gt;https://gist.github.com/brendanzagaeski/69f490e31ca6a71136ff&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/3868e30b85a1feb1181b&quot;&gt;https://gist.github.com/brendanzagaeski/3868e30b85a1feb1181b&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/9834034&quot;&gt;https://gist.github.com/brendanzagaeski/9834034&lt;/a&gt;
&lt;a href=&quot;https://gist.github.com/brendanzagaeski/9607158&quot;&gt;https://gist.github.com/brendanzagaeski/9607158&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2015/12/28/android-maps-utils-available-for-xamarin-android-apps-bindings/&amp;amp;text=Android-maps-utils+bindings+for+Xamarin.Android+apps%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>gMaps is again best navigation app for Windows Phone
</title>
   <link href="https://sorokoletov.com/2015/11/07/gmaps-is-again-best-travel-app-for-windowsphone/"/>
   <updated>2015-11-07T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2015/11/07/gmaps-is-again-best-travel-app-for-windowsphone</id>
   <content type="html">&lt;p&gt;I recently opened Store app on Lumia 925 and was surprised.&lt;br /&gt;
Turns out, after so many years, gMaps is still the best navigation app out there.&lt;/p&gt;

&lt;p&gt;gMaps is top 1 free navigation application for Windows Phone 8.1! Yay!&lt;/p&gt;

&lt;p&gt;:rocket:&lt;/p&gt;

&lt;p&gt;gMaps Pro (paid version already including all features of gMaps) is top 2 paid navigation application for Windows Phone 8.1&lt;/p&gt;

&lt;!--more--&gt;
&lt;p&gt;Here you are, facts :)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/gmaps-is-top-free-navigation-app-for-wp.png&quot; alt=&quot;gMaps is top free navigation app for Windows Phone&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/gmaps-is-top2-paid-navigation-app-for-wp.png&quot; alt=&quot;gMaps is top2 paid navigation app for Windows Phone&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We put a lot of energy into gMaps and are striving for the quality and features.&lt;/p&gt;

&lt;p&gt;If you have any ideas how to make the app better, or any other feedback, feel free to contact us using &lt;a href=&quot;mailto:gmaps.feedback@gmail.com&quot;&gt;gmaps feedback email&lt;/a&gt;
 address or &lt;a href=&quot;https://gmaps.uservoice.com/&quot;&gt;gMaps uservoice&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2015/11/07/gmaps-is-again-best-travel-app-for-windowsphone/&amp;amp;text=gMaps+is+again+best+navigation+app+for+Windows+Phone%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Contributing to .NET Core from OS X
</title>
   <link href="https://sorokoletov.com/2015/11/05/contributing-to-dotnet-on-mac-osx/"/>
   <updated>2015-11-05T00:00:00+00:00</updated>
   <id>https://sorokoletov.com/2015/11/05/contributing-to-dotnet-on-mac-osx</id>
   <content type="html">&lt;p&gt;Imagine you forgot your Windows laptop and have only old Macbook and you are on .NET hackathon. What do you do there?&lt;/p&gt;

&lt;p&gt;Well, you have number of options. What you probably dont  know &lt;em&gt;yet&lt;/em&gt; is that you can develop using .NET also on your Macbook (or your spouse).&lt;/p&gt;

&lt;p&gt;My choice was to contribute to &lt;a href=&quot;http://dotnet.github.io/core/&quot;&gt;.NET Core&lt;/a&gt; which works on everything (have you read recent announcement from RedHat?)&lt;/p&gt;

&lt;!--more--&gt;

&lt;h2 id=&quot;getting-ready-to-rock&quot;&gt;Getting ready to rock&lt;/h2&gt;

&lt;p&gt;Before you can do anything with .NET on your Mac, you will need to do several things:&lt;/p&gt;

&lt;p&gt;1) &lt;a href=&quot;https://code.visualstudio.com/Download?Wt.mc_id=DX_MVP5000197&quot;&gt;Download Visual Studio Code (vscode)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) Install the .NET Core itself. Here is a good guide to follow: &lt;a href=&quot;http://dotnet.github.io/core/getting-started/&quot;&gt;http://dotnet.github.io/core/getting-started/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) Next step is to fork &lt;a href=&quot;https://github.com/dotnet/corefx&quot;&gt;dotnet/corefx repository&lt;/a&gt;. In my case it’s &lt;a href=&quot;https://github.com/alexsorokoletov/corefx&quot;&gt;https://github.com/alexsorokoletov/corefx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to get and compile current master of &lt;a href=&quot;https://github.com/dotnet/corefx&quot;&gt;dotnet/corefx repository&lt;/a&gt; you need to have the very latest Mono version installed. Mono website provides CI packages (nightly builds) for Windows and *nix, and provides nothing for OS X. So you have to compile it manually (just once, no worries)&lt;/p&gt;

&lt;h3 id=&quot;compiling-mono-on-os-x&quot;&gt;Compiling Mono on OS X&lt;/h3&gt;
&lt;p&gt;Good article to follow is available on the Mono website &lt;a href=&quot;http://www.mono-project.com/docs/compiling-mono/mac/#building-mono-from-a-git-source-code-checkout&quot;&gt;http://www.mono-project.com/docs/compiling-mono/mac/#building-mono-from-a-git-source-code-checkout&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To make it easy to follow, here is what I did:&lt;/p&gt;

&lt;p&gt;1) clone mono repository&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;monoci

git clone &lt;span class=&quot;nt&quot;&gt;--recursive&lt;/span&gt; git@github.com:mono/mono.git

&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;monoci/mono&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;2) install required tools&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;brew &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;autoconf automake libtool pkg-config&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;3) the compilation itself. In my case folder with mono was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/work/monoci/mono&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;CC&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;cc -m32&apos;&lt;/span&gt; ./autogen.sh &lt;span class=&quot;nt&quot;&gt;--prefix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;~/work/monoci/mono &lt;span class=&quot;nt&quot;&gt;--disable-nls&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--build&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;i386-apple-darwin11.2.0
make
make &lt;span class=&quot;nb&quot;&gt;install&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;These lines of code took around hour to execute on my wife’s old macbook.
Take a nap or go to gym.&lt;/p&gt;

&lt;p&gt;4) now, when mono is compiled, make sure you tell your system to use the fresh mono. To do that, just add ahead of the PATH variable your folder with mono&lt;/p&gt;

&lt;p&gt;For example, modify ~/.bash_profile file and add line like that&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;export &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/Users/theuser/work/monoci/mono/bin:&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$PATH&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and then just quit and reopen terminal.&lt;/p&gt;

&lt;p&gt;5) try it out by running &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mono --version&lt;/code&gt; in the terminal&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;Marias-MacBook-Pro:tests theuser&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;mono &lt;span class=&quot;nt&quot;&gt;--version&lt;/span&gt;
Mono JIT compiler version 4.3.0 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;master/c278ead Thu Nov  5 11:03:13 PST 2015&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Copyright &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;C&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug 
	LLVM:          supported, not enabled.
	GC:            sgen&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;6) last thing is to copy PCL reference libraries.
&lt;a href=&quot;https://www.dropbox.com/s/6eg6diva5j33vus/mono-pcl-bits.tgz?dl=0&quot;&gt;Get it here 9.8mb&lt;/a&gt; and unzip to folder &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/work/monoci/mono/lib/mono/xbuild-frameworks&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After doing that you should see two subfolders there:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;Marias-MacBook-Pro:xbuild-frameworks theuser&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;ls&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-la&lt;/span&gt; ~/work/monoci/mono/lib/mono/xbuild-frameworks
total 0
drwxr-xr-x   4 theuser  staff  136 Nov  5 11:53 &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
drwxr-xr-x  12 theuser  staff  408 Nov  5 11:24 ..
drwxr-xr-x   9 theuser  staff  306 Nov  5 11:24 .NETFramework
drwxr-xr-x   6 theuser  staff  204 Aug 13 01:35 .NETPortable&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h3 id=&quot;compiling-net-core-on-os-x&quot;&gt;Compiling .NET Core on OS X&lt;/h3&gt;

&lt;p&gt;1) clone your fork of corefx&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git clone &lt;span class=&quot;nt&quot;&gt;--recursive&lt;/span&gt; https://github.com/alexsorokoletov/corefx.git
&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;corefx&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;2) run the build script (yay!)&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;./build.sh /p:SkipTests&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;true&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The parameter is telling build script to skip tests for now, let’s first make sure the code compiles. Also, this part will take around 30 minutes to compile.&lt;/p&gt;

&lt;p&gt;The build process first gets some Nuget packages, then spins number of parallel compiler processes.
On my machine it failed at some point to spin new processes. To overcome that, I had to run this command in the terminal &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ulimit -n 2048&lt;/code&gt; to make sure system can spin more procesess - my limit was 256.&lt;/p&gt;

&lt;p&gt;So if you have the same problem, just do the magic and restart the build. Probably, the build.sh should handle that process limit better&lt;/p&gt;

&lt;p&gt;Great stuff is that build is incremental so it will start where it failed and will save time for all of us :)&lt;/p&gt;

&lt;p&gt;3) Assuming you waited enough and things compile (if not, contact me and I will help), you’re all set.&lt;/p&gt;

&lt;h3 id=&quot;before-we-change-anything-in-the-net-core&quot;&gt;Before we change anything in the .NET Core&lt;/h3&gt;

&lt;p&gt;So in order to contribute there are several things you need to keep in mind.&lt;/p&gt;

&lt;p&gt;One, there is a legal side of any contribution. Read on that here, I’m not a lawyer.&lt;/p&gt;

&lt;p&gt;Two, there is a contribution guide you should be familiar with.&lt;/p&gt;

&lt;p&gt;Three, the flow is simple - find task -&amp;gt; create branch -&amp;gt; do change -&amp;gt; run tests -&amp;gt; commit &amp;amp; push changes -&amp;gt; create pull request.&lt;/p&gt;

&lt;p&gt;I will be covering the flow, you need to read legal stuff and contribution guide.&lt;/p&gt;

&lt;h3 id=&quot;changing-net-core&quot;&gt;Changing .NET Core&lt;/h3&gt;

&lt;p&gt;For my first contribution I decided to find something easy and Stephen Toub was very kind and suggested to look at this issue:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/dotnet/corefx/issues/2699&quot;&gt;Code cleanup for System.IO.Packaging #2699&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nothing fancy and a good way to learn.&lt;/p&gt;

&lt;p&gt;1) Let’s create a branch for changes&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git branch fix2699
git checkout fix2699&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;2) Open VS Code and change something.&lt;/p&gt;

&lt;p&gt;3) Let’s compile and run tests&lt;/p&gt;

&lt;p&gt;To make life easier, it’s good to create an alias to the msbuild run by mono, so let’s do that.
Edit ~/.bash_profile and add a line like that&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;alias &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;mbuild&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;mono ~/work/corefx/packages/Microsoft.Build.Mono.Debug.14.1.0.0-prerelease/lib/MSBuild.exe&apos;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;.NET Core picks up the msbuild.exe from the Nuget package, so the exact package version could be different. 
If it is, look it up in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;build.sh&lt;/code&gt; file around line 190&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;__msbuildpackageid&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Microsoft.Build.Mono.Debug&quot;&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;__msbuildpackageversion&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;14.1.0.0-prerelease&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Restart the terminal (or do &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source ~/.bash_profile&lt;/code&gt;) and let’s go into the folder of the exact package you’re touching.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;src/System.IO.Packaging/tests/&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;and then run&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;mbuild /t:rebuildandtest /p:OSGroup&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;OSX&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This code will compile whatever it sees (either whole .NET Core or just a package). If the changes are local to the package, there is no reason to recompile whole framework.&lt;/p&gt;

&lt;p&gt;You should see:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;  xUnit.net console &lt;span class=&quot;nb&quot;&gt;test &lt;/span&gt;runner &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;64-bit .NET Core&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
  Copyright &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;C&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; 2014 Outercurve Foundation.
  
  Discovering: System.IO.Packaging.Tests
  Discovered:  System.IO.Packaging.Tests
  Starting:    System.IO.Packaging.Tests
  Finished:    System.IO.Packaging.Tests
  
  &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt; TEST EXECUTION SUMMARY &lt;span class=&quot;o&quot;&gt;===&lt;/span&gt;
     System.IO.Packaging.Tests  Total: 122, Errors: 0, Failed: 0, Skipped: 0, Time: 2.080s
  Touching &lt;span class=&quot;s2&quot;&gt;&quot;/Users/theuser/work/corefx/bin/tests/OSX.AnyCPU.Debug/System.IO.Packaging.Tests/dnxcore50/tests.passed.without.OuterLoop.failing&quot;&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
Done Building Project &lt;span class=&quot;s2&quot;&gt;&quot;/Users/theuser/work/corefx/src/System.IO.Packaging/tests/System.IO.Packaging.Tests.csproj&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;rebuildandtest target&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;o&quot;&gt;))&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;

Build succeeded.
    0 Warning&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
    0 Error&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;s&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

Time Elapsed 00:00:22.61&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Nice, everything works!&lt;/p&gt;

&lt;p&gt;4) Commiting the change. 
As the contributing guide suggest, you commit message should look like&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;Code cleanup &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;System.IO.Packaging

This request has several changes &lt;span class=&quot;k&quot;&gt;in &lt;/span&gt;ContentType.cs to make sure I understand the contribution workflow

Related to &lt;span class=&quot;c&quot;&gt;#2699&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The empty lines are required because of the way github handles commits and pull requests.
As my commit doesn’t really fixes anything, I wrote in the last line “Related to #issue_number” and not “Fixed #issue_number”.&lt;/p&gt;

&lt;p&gt;After you commit, push the changes to the github and create a pull request.&lt;/p&gt;

&lt;p&gt;Github will pickup the pull request contents automatically.&lt;/p&gt;

&lt;p&gt;Time to wait till .NET Core automatic build compiles your changes and also till .NET team provides feedback on the changes.&lt;/p&gt;

&lt;p&gt;5) Common thing is that you get feedback on pull request and need to do some minor changes.
After you do the changes, you might want to create a new commit, but there is a better way.&lt;/p&gt;

&lt;p&gt;You can update your previous commit, by ammending the previous commit and force-pushing it to the server.&lt;/p&gt;

&lt;p&gt;Easy in the terminal:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;git commit &lt;span class=&quot;nt&quot;&gt;--amend&lt;/span&gt;
git push origin +fix2699&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Thanks for this tip, Stephen!&lt;/p&gt;

&lt;p&gt;6) Then your pull request is accepted and merged. 
Congratulations!&lt;/p&gt;

&lt;h3 id=&quot;summary&quot;&gt;Summary&lt;/h3&gt;

&lt;p&gt;Things I just did were impossible all 12 years .NET existed before.&lt;/p&gt;

&lt;p&gt;It is a still mind-blowing how .NET Core, build and tests work on anything running OS X, Linux and Windows.&lt;/p&gt;

&lt;p&gt;What is great is that you can already write apps using .NET and C# for OS X (console and web apps so far).&lt;/p&gt;

&lt;p&gt;What is incredibly great is that how easy is to contribute to the .NET now.&lt;/p&gt;

&lt;p&gt;First time it might be hard, submitting first pull request took me 4 hours. Submitting second took me 30 minutes.&lt;/p&gt;

&lt;p&gt;Huge thanks and kudos to the .NET Core team, Mat, Stephen and everyone else helping me!&lt;/p&gt;

&lt;p&gt;I hope this experience will be helpful to other people having spare time and experience to share and reuse.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;If you liked this post, you can
&lt;a href=&quot;https://twitter.com/intent/tweet?url=https://sorokoletov.com/2015/11/05/contributing-to-dotnet-on-mac-osx/&amp;amp;text=Contributing+to+.NET+Core+from+OS+X%0A&amp;amp;via=alexsorokoletov&quot; target=&quot;_blank&quot;&gt;
  share it with your followers&lt;/a&gt; 
or 
&lt;a href=&quot;https://twitter.com/alexsorokoletov&quot;&gt;
  follow me on Twitter&lt;/a&gt;!&lt;/p&gt;
</content>
 </entry>
 

</feed>
