###前提・実現したいこと
Xamarin.Forms を使ってアプリを作成していて、MobileServiceClient の初期化が
Androidだと成功するのにiOSだとエラーになります。
MobileServiceClient の初期化は共通部分で行なっています。
###発生している問題・エラーメッセージ
StackOverflowに載っているものは古いものしかなく、
またbugfixしているようなので原因がサッパリ分かりません。
System.InvalidOperationException: A Microsoft Azure Mobile Services assembly for the current platform was not found. Ensure that the current project references both Microsoft.WindowsAzure.Mobile and the following platform-specific assembly: Microsoft.WindowsAzure.Mobile.Ext. at Microsoft.WindowsAzure.MobileServices.Platform.ThrowForMissingPlatformAssembly () [0x00045] in <42e24ce875d34485ad11c4f8aebb904a>:0 at Microsoft.WindowsAzure.MobileServices.Platform.get_Instance () [0x00062] in <42e24ce875d34485ad11c4f8aebb904a>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceClient.GetApplicationInstallationId () [0x00004] in <42e24ce875d34485ad11c4f8aebb904a>:0 at Microsoft.WindowsAzure.MobileServices.MobileServiceClient..ctor (System.Uri mobileAppUri, System.Net.Http.HttpMessageHandler[] handlers) [0x0005f] in <42e24ce875d34485ad11c4f8aebb904a>:0 at garbage_calendar.Logic.MobileServiceClientFactory.create () [0x00012] in /Users/iju/Projects/garbage_calendar/garbage_calendar/Models/MobileServiceClientFactory.cs:13
###該当のソースコード
GitHubにあげています。
元々Prism使ってDIしていましたが、
原因解析のために個別にnewしています。
###試したこと
- AndroidとiOSで追加しているライブラリの差分確認
- StackOverflowでの検索
###補足情報(言語/FW/ツール等のバージョンなど)
| 名前 | バージョン |
|---|---|
| OS | macOS 10.12.4 |
| Xamarin Studio | Xamarin Studio Community 6.3 |
| Xamarin.Forms | 2.3.4.231 |
| Prism.Core | 6.3.0 |
| Microsoft.Azure.Mobile.Client | 3.1.0 |
回答1件
あなたの回答
tips
プレビュー
2017/05/09 08:40
2017/05/09 09:14
2017/05/17 13:01