Top

xamarin.ios Tag

Using Effects on Xamarin.Forms

Custom Renderers are useful when we want to customize native controls of a given type all around our app.But when we want to customize only some specific properties of a given native view, we could make use of Effects. An Effect is a simple and reusable piece of code that will allow us to access a native control to customize it.   Let's see a sample that will prevent the underline decoration when an Entry is focused. Core project In the core project add a class inheriting RouttingEffect like this: public class NoUnderlineEffect : RoutingEffect { public NoUnderlineEffect() : base("Blogpost.NoUnderlineEffect") { } } We could add properties to be able to pass parameters and...

Custom Renderers are useful wh...

Read More

Mask animation with Xamarin.iOS and AutoLayout

In modern app development, we can't think only of writing good code and full of features applications. We also have to create beautiful user experiences, and there is where animations take part in the game. Most common animations will change elements size, position or visibility to bring them to life.   In one of our recent projects, a design team member had the idea of user interface elements that should be partially cropped depending on a score. Take a look to the image on the left that illustrates the concept.   There's probably more than one way to do it. Our solution was to make use of maskView property, available since iOS 8. As documentation says:   [eltd_blockquote text="The view’s alpha channel determines how much of...

In modern app development, we ...

Read More

Setting up Xamarin.iOS builds in Visual Studio Team Services (formerly Visual Studio Online) through MacinCloud, and a bonus (HockeyApp)

A few weeks ago we needed to setup CI/CD builds in HealthClinic.biz private repo (here is the public one), hosted in Visual Studio Team Services (VSTS from now on), for the Patients app made with Xamarin.iOS. Since the suite includes a Cordoba app for iOS as well, such was being built through MacinCloud, so the agent pool was already configured (if not, here can be found how to). Nowadays, VSTS offers a Xamarin.iOS build step where, if the agent pools support such capability, wraps everything needed to generate the final APP/IPA (1st for Simulator, OK for CI; 2nd for device, needed for CD) just selecting a Visual Studio Solution to build. The issue is, what happens with all the other steps...

A few weeks ago we needed to s...

Read More

Input Validation Approach for Windows 10 UAP, Android and iOS

You have probably faced the problem of validating input fields in your app forms. As you may know, each platform provides different tools to validate text, time and other type of entries. What happens if we need a common solution for our favorite target platforms: Windows 10 UAP, Android and iOS? As DRY principle lovers, we always think about reusing as many code artifacts as possible. The ideal solution would be one compatible for all these platforms. When working with Xamarin and thinking of code reusing, the pattern that comes to mind is MVVM: a pattern that has been always related with many .NET technologies. Our experience with .NET Framework technologies linked with MVVM like WPF or Silverlight, which provided some built-in...

You have probably faced the pr...

Read More

Initial Steps with Xamarin.UITest for Hybrid Apps

Recently we have used Xamarin.UITest to validate the UI of an app developed with Cordova, and Test Cloud to run such on a lot of physical devices. Assuming you have already experience creating a Xamarin.UITest project, the very first thing you will need to play with is running an emulator or a physical device to deploy the app and run the tests. Such is done with this very simple piece of code: [code language="csharp"] public class AppInitializer { public static IApp StartApp(Platform platform, Xamarin.UITest.Configuration.AppDataMode mode = Xamarin.UITest.Configuration.AppDataMode.Auto) { if (platform == Platform.Android) { return ConfigureApp .Android .EnableLocalScreenshots() .ApkFile("../../../Apps/myapp.apk") .StartApp(mode); } return ConfigureApp .iOS .EnableLocalScreenshots() .AppBundle("../../../Apps/myapp.app") .StartApp(mode); } } [/code] Please take note we are going to test the UI of a multiplatform app developed with Cordova for iOS and Android, so we decided to have a single...

Recently we have used Xamarin....

Read More

Continuous delivery for Xamarin.iOS projects with TeamCity, FAKE and HockeyApp

With this new post we are going to learn how to add continuous delivery to a Xamarin.iOS project. Main components are FAKE as build automation system, TeamCity as continuous integration and deployment server and HockeyApp as storage, distribution and notification service of our client deliveries.         The advantages of continuous delivery are huge, provides visibility to projects that make use of it and speed up their development process, apart from saving time turning the delivery management into an easy task. I suppose the reader of this article has some experience configuring projects and build configurations in TeamCity. These are the ingredients and cooking procedure: -A Mac/Mac Mini with OSX and Xamarin.iOS installed. (Check you have mono and curl in your PATH environment variable) -Install TeamCity Agent in OSX. (I suggest you to install it as a login item, to ensure it gets executed...

With this new post we are goi...

Read More

Linker experiences with Xamarin.iOS

We experienced some problems in one of our latest projects with Xamarin.iOS, the kind of problems that are normally accompanied by a big headache. While everything worked like a charm over iOS simulator, something started to crash when running the app over a physical device. It was a simple app consuming data from a web service and being displayed via Master Detail pages with standard views so, what could be wrong? Thanks to output log while debugging over device, we found that there were some errors - with their stack trace information - from System.Data.Services.Client assembly. That component calls some reflection methods and this is why it was failing, just take a look to the next image. If you have a...

We experienced some problems i...

Read More

Case Study: Sage

A few weeks ago Xamarin published one of our Case Studies: Sage. It was a huge effort to bring three mobile apps on multiple form-factors to life, at the same time. Thanks to Xamarin.Android and Xamarin.iOS products, we could share a common codebase between all of them. The entire apps set relies on MvvmCross framework, with customized pieces to support landscape views composed of multiple portrait ones, fly-out menus, etc. We are at Plain Concepts, the Xamarin Team, particularly proud of the job done. The whole document can be found here or here....

A few weeks ago Xamarin publis...

Read More

Translating Designs into Layouts: Units Conversion

One aspect that Apple pushed to the limits is the union between Designers and Developers. Instead of understanding the product development process as a chain, it is done as a very close relationship walking in the same direction. Both of them speak different languages: they use different tools during their day-to-day job, they see different aspects of the product, their definition of done is different, etc. But there is something in common, which turns out to be a quite important thing: both want the product to succeed. Both want to deliver the best shape of what they are working on, and want to exceed the customer's expectations. Thus, it is worth looking for ways to improve this beautiful marriage. Within the following...

One aspect that Apple pushed...

Read More