9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Xcode]dyld: Library not loadedでiPhone実機ビルドが出来ないときにしたこと

Posted at

実行環境

  • MacOS High Sierra 10.13.4
  • Xcode 9.3.1

エラー状況

実機でビルドをしようとしたときに、以下のエラーが出てビルドができなくなりました。

dyld: Library not loaded: @rpath/RxSwift.framework/RxSwift
  Referenced from: /var/containers/Bundle/Application/xxx/xxx.app/xxx
  Reason: no suitable image found.  Did find:
	/private/var/containers/Bundle/Application/xxx/xxx.app/Frameworks/RxSwift.framework/RxSwift: code signing blocked mmap() of '/private/var/containers/Bundle/Application/xxx/xxx.app/Frameworks/RxSwift.framework/RxSwift'

解決方法

Xcodeを入れ直したりしてもビルドできませんでしたが、色々調べた結果、こちらが参考になりました。
Apple Developer Forums : Unable to Run Application on Device “dyld: Library not loaded”

  • キーチェーンからビルドに必要な証明書を削除する
  • DerivedDataとProvisioning Profilesの削除
rm -rf ~/Library/Developer/Xcode/DerivedData/
rm -rf ~/Library/MobileDevice/Provisioning\ Profiles/
  • Mac の再起動
  • 証明書やProvisioning Profilesの設定
  • Xcodeのクリーン(Shift+⌘+K)
  • 実機ビルド:ok_hand:

何か参考になれば幸いです。

9
8
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?