MAUIでiOSアプリの開発!

MAUIを使ったiOSアプリの開発についての技術的なメモです。

VisualStudio for Macで実機にインストール時にエラーになる

VisualStudio for Macにて、実機を接続してインストール実行したところ、
ビルドはエラー0件で正常に終わりますが、
「アプリケーションをデバイスにアップロードできませんでした。」
となり、失敗しました。

エラーとしては、
error HE0004: Could not load the framework 'IDEKit' (path: /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/IDEKit):
dlopen(/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/IDEKit, 1):
Library not loaded: @rpath/DVTAnalyticsKit.framework/Versions/A/DVTAnalyticsKit Referenced from:
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/IDEKit
Reason: image not found
です。

調べてみると、Xcodeのバージョンに対してXamarin.iOSのバージョンが古い場合に起こることがあるようです。

https://stackoverflow.com/questions/63265076/application-could-not-be-uploaded-to-the-device
https://github.com/xamarin/Xamarin.Forms/issues/12670

VisualStudio for Macの本体とコンポーネントを全部バージョンアップしたら、
インストールは行えるようになりました。