7
3

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.

RxSwiftをCarthageで入れたら実機で起動できなかったので、RxRelayも追加して解決した

Last updated at Posted at 2019-09-15

RxSwiftとRxCocoaを追加後、ビルドはサクセスするのですが、実機で動作確認ししようとすると以下のエラーで落ちてしまいました。

dyld: Library not loaded: @rpath/RxRelay.framework/RxRelay
  Referenced from: /var/containers/Bundle/Application/xxxxxxx-xxxx-xxxx-xxxx-477EBE5CC202/xxx.app/xxx
  Reason: image not found

今回の解決方法は、RxRelayも追加することでした。

RxSwiftライブラリをビルドすると、以下の5つのフレームワークが生成されます。

  • RxSwift
  • RxCocoa
  • RxRelay
  • RxBlocking
  • RxTest

RxSwift, RxCocoaのみXcodeで追加すれば良いと思っていたのですが、どうやらRxRelayも必要みたいですね🤔

TARGETS -> General -> LinkedFrameworks and Libraries にRxRelayも追加し、
Build Phases の Input Files Lists, Output Files Lists にも追記しました。

input.xcfilelist
$(SRCROOT)/Carthage/Build/iOS/RxSwift.framework
$(SRCROOT)/Carthage/Build/iOS/RxCocoa.framework
$(SRCROOT)/Carthage/Build/iOS/RxRelay.framework
output.xcfilelist
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxSwift.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxCocoa.framework
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/RxRelay.framework

以上で、無事に実機での動作確認を行えるようになりました。

7
3
0

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
7
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?