Siphiwe  Harmse

Siphiwe Harmse


Background Location Tracking for iOS with Xamarin.Forms

Keeping the user in your app to track their location isn't the greatest experience. In this video we will learn how to enable your iOS app to enable location tracking even while your runs in the background! Of course, all of this with Xamarin.Forms!

⏱ Timestamps
00:00 - Intro
00:10 - Inspect End Result
00:58 - Sample App Outline
01:40 - Install Plugin.Geolocator
03:33 - Setting iOS Permissions
05:20 - Enable iOS Location Tracking Background Mode
06:53 - Implement Requesting Permissions
08:12 - Implement Background Location Tracking
12:04 - Run Sample App
12:25 - Important Note on iOS Permissions!
15:07 - Advanced Location Tracking Settings
17:42 - Outro

#location  #background  #xamarinforms

What is GEEK

Buddha Community

Background Location Tracking for iOS with Xamarin.Forms

How to Design Login Page using Xamarin Forms C# | Login Form | Sign In UI Design


#xamarin forms #xamarin forms bangla tutorials for beginners #xamarin forms tutorials for beginners #xamarin #xamarin.forms #xamarin.forms ui

Gaurav Singh


Xamarin Forms Training Institute | Xamarin Forms Development Classes | Xamarin Training

In this Xamarin Online course, you will learn each and every topic with the help of hands-on labs. This program includes a hands-on live project with the implementation of recommended design patterns and practices. The learning path for this program is given below:
Xamarin Training objective
At the completion of this course, attendees will be able to;

  1. Understand Xamarin architecture
  2. Understand Xamarin .Android, Xamarin. iOS fundamentals
  3. Understand Xamarin. Forms fundamentals
  4. Build UI with XAML and code
  5. Work with images, display data beautifully and create interactive lists
  6. Implement multi-page apps with navigation, tabs, master/detail pages
  7. Store and retrieve data from a variety of sources like file system, SQLite database and RESTful services
  8. Implement MVVM pattern

#xamarin training #xamarin course #xamarin forms course #xamarin online course #xamarin forms training #xamarin training course

Seamus  Quitzon

Seamus Quitzon


iOS Extension Customized for Xamarin.Forms Pages

iOS extensions allow developers to customize existing system behaviors by adding extra functionality to iOS and macOS Extension Points. Such as custom context actions, password autofill, and incoming calls filters. Even actions like notification content modifiers. Xamarin.iOS supports extensions and this awesome guide will walk you through creating an iOS extension using Xamarin tools.

iOS Extensions

Extensions are distributed as part of a Container app and activated from a specific Extension Point in a Host app. The Container app is usually a simple iOS application. It provides a user with information about the Extension. As well as how to activate and how to use it. There are three main approaches to sharing code between an Extension and a Container app:

Common iOS Project

  1. Put all of the shared code between the Container and the Extension into a shared iOS library. Then, reference the library from both projects. Usually, the shared library contains native UIViewControllers from a Xamarin.iOS library.

File Links

  1. In some cases, the Container app provides most of the functionality. All while the Extension needs to render a single UIViewController. With few files to share, it is common to add a file link to the Extension app. This is done from the file located in the Container app.

Common Xamarin.Forms Project

  1. When using the Xamarin.Forms framework, app pages already shared with another platform (such as Android), reimplement required pages natively in the Extension project. This is because the iOS Extension works with native UIViewControllers and not Xamarin.Forms pages.

Additional steps are needed to use Xamarin.Forms in the iOS Extension. These steps are explained below.

Xamarin.Forms in an iOS Extension Project

The ability to use Xamarin.Forms in a native project is provided via Native Forms. It allows ContentPage-derived pages to be added directly to native Xamarin.iOS projects. The CreateViewController extension method converts an instance of a Xamarin.Forms page to a native UIViewController. This can then be used or modified as a regular controller. Use the same approach with an iOS Extension as a special kind of a native iOS project.

Important! There are many known limitations for iOS Extensions. Although you can use Xamarin.Forms, do so very carefully. Monitor memory usage and startup time. Otherwise, the Extension could be terminated by iOS without a graceful way to handle it.

How Does it Work

  1. Create an empty Xamarin.Forms project and customize your MainPage.xaml.
  2. Add a new Xamarin.iOS Extension project using one of the available Visual Studio templates.
  3. Add Xamarin.Forms and the shared library references to the Extension project.
  4. Modify an entry point to initialize Xamarin.Forms and create pages.
  • Per iOS requirements, an Extension must define the entry point in Info.plist as NSExtensionMainStoryboard or NSExtensionPrincipalClass.
  1. Once the entry point is activated (in our case the ActionViewController.ViewDidLoad method), create an instance of a Xamarin.Forms page and show it to a user.
  2. Open the entry point and replace the ViewDidLoad method with the following implementation:
public override void ViewDidLoad()

    // Initialize Xamarin.Forms framework
    // Create an instance of XF page with associated View Model
    var xfPage = new MainPage();
    var viewModel = (MainPageViewModel)xfPage.BindingContext;
    viewModel.Message = "Welcome to XF Page created from an iOS Extension";
    // Override the behavior to complete the execution of the Extension when a user press the button
    viewModel.DoCommand = new Command(() => DoneClicked(this));
    // Convert XF page to a native UIViewController which can be consumed by the iOS Extension
    var newController = xfPage.CreateViewController();
    // Make sure the presentation style is set to full screen to avoid rendering the original entry point
    newController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
    // Present new view controller as a regular view controller
    this.PresentModalViewController(newController, false);

#developers #ios #xamarin #xamarin.forms #xaml #ios extension #native forms

How to use Picker in Xamarin Forms | ComboBox | Dropdown | DropdownList


#xamarin forms #xamarin #xamarin.forms #xamarin tutorials #xamarin tutorials for beginners

Setting up Mobile Development Environment for Xamarin Forms in Visual Studio 2019


#xamarin forms #xamarin forms tutorial for beginners #xamarin forms with c# #xamarin