Tag: mobile apps development

Mobile Apps Development, Technology

How to Run a Xamarin.Forms iOS App from Windows (Using Visual Studio 2019)

This is a brief overview of techniques used to run Xamarin.Forms apps on iOS from a Windows PC. This will allow you to test your apps on iOS devices without being part of the Apple Developer Program. This simulator testing is valuable and convenient, it is also essential to test your apps to verify that they function properly before deploying them to Apple Store.

Required Tools: Windows PC, Macintosh Computer, Xamarin.Forms (Installed on the PC and Mac), Visual Studio 2019 (PC only), XCode (Mac only).

Let’s begin. On the Mac, navigate to “System Preferences” and then to “Sharing.” Ensure that “Remote Login” is enabled and “All users” is selected. Leave this window open as we will need it later.

MAC IDE – Enable Remote Login

Back on the PC, open Visual Studio, and create a new project. Select the “Mobile App (Xamarin.Forms)” template. Then click next.

Create a New Project on Windows Using VS 2019

Continue through the setup wizard as normal until you reach this screen. Ensure that the “iOS” platform is enabled.

New Project Configuration on Windows

Once the project is created, click on the “Pair to Mac” button at the top right of the screen.

Pair to MAC

This window should appear. If your Mac is already listed, simply click on it and then “Connect.” If your Mac is not listed, click “Add Mac…” and enter the Mac’s IP address.

This step will likely cause the most headache and confusion. If you run into any problems, double-check that both computers are connected to the same network, both computers are powered on and awake, and that all your software is up to date.

But if everything goes according to plan, your Mac should now be successfully paired to Visual Studio.

Pair to MAC using IP Address

Once we have paired to a Mac, it’s time to run our app. At the top of Visual Studio, click the “Solution Platforms” dropdown and choose “iPhone Simulator.” Next, click the “Startup Projects” dropdown and choose “<yourProjectName>.iOS” Last, click the “Device” dropdown and select your preferred iPhone emulator.

Build Configuration in VS

The final step, click “Run” and your iPhone emulator should startup on the Mac. After a couple of moments, your app should open on the emulator.

iPhone Simulator

In summary, We hope this is helpful to you. Mobile app development is a tremendous market that businesses need to invest in. Aside from publicity, entrepreneurs can use this platform to connect to customers on a personal level and to be relevant in younger generations.

Contact Agile Tech if you want to develop mobile apps for your business so you can improve your communication with your clients and employees. We’ll design it, develop it, deploy it, and maintain it for you.

Xamarin Architect Feature
Mobile Apps Development

Building Fast, Data-Driven Mobile Apps Using Xamarin

Using Xamarin.Forms, .NET developers can create mobile apps user interfaces faster. This is done by extending the Xamarin framework with a shared abstraction of the common UI objects of each platform. In this article, I will share more about how Xamarin.Forms work and whether or not this can benefit you with your cross-platform efforts.

What is Xamarin.Forms?

Reports show that mobile apps are projected to hit $581.9 billion in revenue in 2020. (Statista) and this number is still growing. This shows the importance of mobile applications, especially to a business with an online presence. Having a mobile application is a necessity.

Business owners who do not have a mobile app yet may choose to develop mobile-friendly websites. You can include design features that are readable on a mobile device. You can achieve this by building a website that is responsive using Hypertext Markup Language (HTML), Cascading Stylesheet (CSS), and JavaScript. This may be a very valid approach for your particular needs, but you are limited on what native mobile device features can offer. Depending on your needs for access to device-specific features, you could develop applications in the software development environments provided by each platform provider, Objective-C or Swift for iOS development, and Java or Kotlin for Android.

If you know web development, you may consider going hybrid and develop just a single code that allows you to run on multiple platforms. You can accomplish this by having the native web view component on each platform with open-source SDK such as Ionic. Ionic is built as a set of Web Components, allowing the user to choose any user interface framework, such as Angular, React or Vue.js. The only drawback is — as an interpreted language, JavaScript has some performance bottlenecks so not really ideal for the hybrid approach.

If you have skills with C# or F#, Xamarin will work best for you. Xamarin allows you to create an abstraction layer using the native platform and helps you develop the app in a more common language. While not as robust, it isn’t that bad as you are able to develop a common language. So where does Xamarin.Forms come in?

Defining Xamarin

Using the .NET framework, you can create applications across several platforms with Xamarin. You can do the development using Windows or Apple (iOS) operating systems. Everything is accomplished through the Mono framework and allows you to share a common library.

When developing the Xamarin project using the iOS platform, you will first need to create a Visual Studio project. With iOS, you start with an application logic within the project, creating interaction and using the MVC design pattern. All this using the .NET Framework. You can also take this one step further through a shared library project. Using the Windows operating system, you will be creating a .NET project by selecting the Xamarin platform.

What is Xamarin.Forms?

With each project, Xamarin.Forms create an abstraction that provides a common API and allows your shared project to reference native UI objects. Because the shared library can interact and create with the presentation layer, you can then move the user interface into the shared library. Application flow and business logic have been moved to the shared library too, which means that communication with the device has been lost as the platform’s application logic no longer drives the application. Communication through a proxy is needed since the shared logic is not able to communicate with the device features. The image below shows how the library is being shared by both Android and iOS.

Xamarin Architecture, Shared Components

Xamarin.Essentials — a library, works well with Xamarin.Forms. It’s a NuGet package that also creates abstraction and allows you to communicate features with the common API. This is a good picture – however, you may need platform-specific logic developed still. Don’t worry though as Xamarin is extremely flexible. A Xamarin.Forms application declares the user interface in one or more XAML files. Here we see a very basic XAML file. Xamarin.Forms can be built up and referenced programmatically, but for now, let’s focus on the XAML declarations.

Summary

Although Xamarin.Forms and Xamarin.Essentials can be used independently, they also work well together. With Xamarin.Forms, you can get started with developing your own mobile applications. With Xamarin.Forms, you can jump right into the development of your application. If you are interested in a deeper dive into the full Xamarin ecosystem, please contact our team at Agile Tech. We have done many Xamarin applications for our clients. Below are a couple of sample screenshots of our work.

Android app for Zebra
Android and iOS mobile apps