xcodeを使って開発アプリをビルドしようとしたところ下記のエラーが発生。
Unable to install “○○”
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620394
—
The executable was signed with invalid entitlements.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402620394
悪さをしているのはprofileらしいので下記の方法で設定をリセットする。
①TARGETSを開く
②signing&Capabiritiesを開く
③Signingを開き、Automatically manage signingをチェックを外し再度チェックをつける
④クリーン後ビルド
これでもうまくいかない場合はwindowsタブを開いてWork Settingを開く。Per-User内のBuild-Systemを「Legacy Build System」に変更
Legacy Build Systemを設定することによってprofileの設定を無視できるので、xcodeのバージョンをしばらく変えない
ならばこちらで早々に解決するのもアリ。