Disclaimer: this is an automatic aggregator which pulls feeds and comments from many blogs of contributors that have contributed to the Mono project. The contents of these blog entries do not necessarily reflect Xamarin's position.
For the past year, Xamarin has been on a focused journey to improve your productivity by reducing your complexity when building cross-platform mobile applications. Notice the reference to “your” complexity, and not some abstract notion of complexity. That is because the Xamarin team spends countless hours obsessing over feedback, using that information to conduct studies and have honest one-on-one conversations to learn how we can best serve you.
From Xamarin.Forms 3.0.0 through 3.6.0 we have shipped 55 key features you told us “should just work”. Many of those features were contributed by the community. We also learned from you that getting started with Xamarin.Forms should be easier and quicker, and that navigation is a constant area of frustration.
Today, we are publishing Xamarin.Forms 4.0.0 with Shell, a simplified, navigation-aware container for making building mobile applications more efficient. We first shipped a preview of Shell at Microsoft Connect() in December 2018 with the Tailwind Traders reference project, and we have listened closely to you about what you liked, what you didn’t, and what adjustments we could make to deliver on this promise of simplicity.
For additional background, check out the MSDN article “Introducing the Xamarin.Forms Shell”.
Let’s highlight the top features of this release including Shell, Android fast renderers, image source unification, and accessibility.
As this is a major release, you would be right to expect some pretty big changes. Still, it should be a pretty smooth upgrade for you as we’ve tried hard to only introduce things that will make your development life better: Shell (of course), Android fast renderers which are now enabled by default, unified image source types, and tab ordering for increased accessibility.
On the surface, Shell provides an extremely simple syntax to establish your app’s flyout and tab menus. It also introduces a powerful route based URI navigation service in addition to the existing navigation service. The real power of Shell, however, is underneath. All renderers implement the “fast renderer” pattern, and everything is easily extensible by data templates and renderers. This new architecture introduces the foundation for future Xamarin.Forms development that will enable more expressive animations, transitions, and interactions.
To quickly get started using Shell, use the new Shell template in Visual Studio 2019 shipping today. It’s equally easy to migrate an existing application to use Shell. For more details on using Shell, check out our updated documentation:
You may recall version 2.4.0 when we introduced fast renderers for Button, Image, and Label to drastically reduce the number of view groups needed to render those controls. This pattern has proven to work as well as expected, and is now the new performance standard for the renderers that Shell implements. As a result, now is the time to remove the “preview” label, unseal them for you to extend, and use them by default. Be sure to review any custom controls or third party controls that depend upon these renderers to make sure everything works as expected, if not better. Should you find that you need to continue using the old-style renderers, we have introduced a flag for that purpose. In your MainActivity.cs add this flag to opt-in to legacy renderers.
You may have noticed that icons and image sources throughout different controls didn’t all implement the same types. In 3.5.0 we introduced the amazing FontImageSource which makes it extremely easy and fun to use font glyphs to decorate your app, however you couldn’t use it everywhere that icons and images were needed because of this….until now! From this point forward everything implements ImageSource. You can now use FontImageSource, embedded resources, files, and URIs everywhere without impedance.
Button.Image // from FileImageSource MenuItem.Icon // from FileImageSource NavigationPage.TitleIcon // from FileImageSource Page.BackgroundImage // from string Page.Icon // from FileImageSource Slider.ThumbImage // from FileImageSource
Xamarin.Forms is a native cross-platform framework, and this means you have the inherent advantage of always having native accessibility features at your fingertips. We continue working towards improving the ease with which you can make your apps more accessible by now controlling the focus order directly in Xamarin.Forms. When you have a modal that goes away, or when you navigate from page to page, it’s important to tell the device’s screen reader which element has focus. Something should have focus. In order to now do this, you can set the TabIndex on any VisualElement and the native OS will take care of the rest.
<Label AutomationProperties.IsInAccessibleTree="false" Text="Turn on your screen reader and swipe between elements. The elements should be read in ascending order. It should *not* read Skip. It should *not* read this text." /> <Label TabIndex="0" Text="This will be read first and have focus"/> <Button TabIndex="1" Text="Next Focus"/>
As always, we want to acknowledge all the amazing contributors and our community who go above and beyond to collaborate with us in making Xamarin.Forms better and better with each release. Xamarin.Forms 4.0.0 is a wonderful release of which we hope you’re all as proud as we are. Thank you!
To update your existing projects, open your Visual Studio NuGet package manager, check the pre-release box, and install Xamarin.Forms 4.0.0 along with any related packages such as Material Components with Visual or Maps.
Migrating pre-release Shell code to 4.0.0? There are a few things you’ll want to quickly update:
Feedback is always welcome! If you encounter any problems or have suggestions, please open up an issue on GitHub.
Reference apps on GitHub:
Join the Xamarin.Forms team, myself and special guests this Wednesday (May 22, 2019) for a live stream on YouTube where we talk about the features, tell some stories, show demos, and upgrade an open source app to Xamarin.Forms 4.0 with Shell.
The post Welcome to the Shell Era: Xamarin.Forms 4.0 Released appeared first on Xamarin Blog.
Did you know that starting with Android 9 (API level 28) cleartext(non-HTTPS) support is disabled by default? It is always recommended to make connections over HTTPS to ensure that any web communication is secure. This policy may have an impact on your development cycle if your app needs to download an image or file on a server hasn’t been configured for HTTPS. Also, you may just be trying to debug your application locally and don’t want to install development certs. You may have strong business requirements that all web traffic on all versions of Android is always HTTPS. This is where the new Network Security Configuration feature of Android comes in, to help us finely tune network traffic security in our app.
Cleartext is disabled by default on Android 9 (Pie, API 28) devices when your application is set to target and compile against Android 9. On the project’s properties you will find the SDK you are compiling against under Application:
Inside of your Android Manifest options you will find the Target Framework that can be set to Android 9:
To configure security options, you will create a new xml file under Resources/xml named network_security_config.xml.
The following configuration will enable cleartext web traffic to be allowed in our app for specific domains and IP addresses:
You can strengthen the security of your app by also restricting cleartext traffic on all versions of Android regardless of the compile and target framework. This is accomplished by setting cleartextTrafficPermitted to false. Enabling this will restrict any traffic that is non-HTTPS at all times.
The last thing that needs to be done is to configure the networkSecurityConfig property on the application node in the Android Manifest:
That’s it! Now the application is completely configured to allow or restrict cleartext during web requests.
Network security configuration can do a lot more than just allow or restrict cleartext traffic in Android applications. It can configure trust anchors, debug-only overrides, certificate pinning, and more. Be sure to read through the Android developers documentation for a full guide. To enable cleartext traffic in iOS applications, you will want to take a look at our App Transport Security(ATS) documentation for a full walkthrough.
The post Managing HTTP & Cleartext Traffic on Android with Network Security Configuration appeared first on Xamarin Blog.
Check out the discussion about how you can catch up on all the Xamarin related sessions with this YouTube playlist!
You already know and Visual Studio App Center – but get ready to it some more! We discuss the new Auth and Data features the App Center team has added. Cognitive Services has added a ton of new services.
And you don’t want to miss the conversation on the new pricing structure of the Xamarin courses on Microsoft Learn. (Spoiler alert: they’re free!)
Plus… the Pick of the Pod!!
Keeping up with the latest in .NET, C#, Xamarin, and Azure is easier than ever. Cohosts Matt Soucoup and James Montemagno cover a range of topics relevant to Xamarin developers from designing mobile apps to identity management. This edition also Including a Microsoft Build 2019 recap! Be sure to subscribe to the Xamarin Podcast on iTunes, Google Play Music, Stitcher, or your favorite podcast app.
Today, we are happy to announce the release of all Xamarin API Documentation as Open Source! API documentation drives the IntelliSense experience while being one of the best ways to help developers achieve their goals.
Additionally, we have also moved the hosting of the following from their old Xamarin home to docs.microsoft.com:
The docs.microsoft.com site delivers the same presentation, search, browsing, localization, and versioning experience used across Microsoft’s .NET platform. Now, you can filter by platform and version, all while getting rapid and accurate search results for namespaces, class names, and member signatures.
There are separate Github repos for:
The API documentation is released under Creative Commons Attribution 4.0 License and any related source code under the MIT License. The Github repos are subject to Microsoft’s Open Source Code of Conduct. Xamarin.Android API documentation pages are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Xamarin API documentation is built with the mono project’s open-source mdoc toolchain. This toolchain converts inline code comments into a dedicated directory of XML documentation files. When you update your source assembly, added/removed classes and members are synced to the documentation repo. With this tool, you can neatly separate engineering and documentation concerns.
Monologue is a window into the world, work, and lives of the community members and developers that make up the Mono Project, which is a free cross-platform development environment used primarily on Linux.
If you would rather follow Monologue using a newsreader, we provide the following feed:
Monologue is powered by Mono and the Monologue software.