Chapter 4. Platform Specific Services and Dependency Injection
This chapter will not attempt to teach everything there is to know about Inversion of Control (IoC) and dependency injection, as there are numerous resources available that strictly focus on these topics alone. Instead, this chapter will focus on how these patterns apply to mobile development and, more specifically, how to implement them in a Xamarin.Forms mobile app.
Here is a quick look at what we'll cover in this chapter:
- The need for dependency injection in multi-platform mobile app development
- Implementing IoC and dependency injection using a third-party library in place of the Xamarin.Forms DependencyService
- Creating, injecting, and using platform-specific services
- Updating our TripLog app to use platform-specific services through IoC and dependency injection