From the course: Xamarin.Forms Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

iOS service implementation

iOS service implementation - Xamarin Tutorial

From the course: Xamarin.Forms Essential Training

Start my 1-month free trial

iOS service implementation

- [Instructor] If we ran our application on our iOS device or simulator right now, nothing would happen because we do check for a null in the manager, and when we went to the dependency service, we wouldn't get back an instance of an INetworkManager, so we would fail this test, and we would just display the alert. Let's go ahead and go into our iOS, and add that same network manager. We'll do the same class, we're going to implement that same interface, we can use the tool to implement that, and again, we'll come up and add the assembly level attribute, do the Xamarin Forms Dependency, and the type of and in this case, it's our HPlusSports, now it's the iOS Network Manager. Again, we're just telling the dependency service here's a class that you should know about and inspect its interfaces to find out when to return it. The namespaces, we'll add a System.Net, and we'll add system configuration. The whole point of these…

Contents