UIを共通化するフレームワーク「Xamarin.Forms」で、「DependencyService」機能を使用してiOS/Androidの各プラットフォーム固有の機能を実装する方法を解説する。 ← 前回 連載 INDEX 次回 → Xamarin.Formsは、UIを共通にするフレームワークなので、プラットフォーム固有の機能は、それぞれ(iOS/Android)実装する必要がある。しかし、「DependencyService」と呼ばれる機能を使用することで、Xamarin.Formsから共通な呼び出しを行うことができる。今回は、このDependencyServiceの使い方を解説する。 1. Xamarin.Formsプロジェクトを作成する プラットフォーム固有の機能を使用する例として、iOSとAndroidで、GPSの緯度経度を表示するアプリを作る。 Xamarin Studioのメニ