0

I got the following error when I try to deploy an app on the test device.

dyld: Library not loaded: @rpath/Pods.framework/Pods
Referenced from: /var/mobile/Containers/Bundle/Application/20AF9839-59C2-4FBA-A178-582088FAC7B2/Ballman.app/Ballman
Reason: image not found

However it works fine with simulator. Does anyone know what the reason is?

firstprayer
  • 808
  • 2
  • 11
  • 18
  • What is rpath set to? – Droppy Sep 30 '15 at 14:40
  • Uh... no idea. This should be some variable set by the Xcode? – firstprayer Sep 30 '15 at 14:53
  • Yes, it's set by the linker. `Pods.framework` is a dynamic framework and you are targetting iOS 8+, correct? – Droppy Sep 30 '15 at 14:55
  • OK, is `Pods.framework` being added to the app bundle, and if so, is it in a subfolder? Have you found out what the rpath is being set to yet? – Droppy Sep 30 '15 at 15:01
  • I think the Pod create a workspace that includes the Pods.framework as another project besides the original project? I still don't know how to look for rpath. I might have found something similar: The Runtime search Path is set to "$(inherited) @executable_path/Frameworks" – firstprayer Sep 30 '15 at 15:04
  • I am asking you look at the constructed app bundle in *Finder* or via the command line to find out. You can check the rpath of the executable using `otool -l` (see [this](http://stackoverflow.com/questions/12521802/print-rpath-of-executable-on-osx) question). If it's set to `@executable_path/Frameworks` then `Pods.framework` must exist in the `Frameworks` sub-folder. – Droppy Sep 30 '15 at 15:06
  • I wasn't sure about how to find the bundle file, currently I only find a directory called /Users/taiyuanz/Library/Developer/Xcode/DerivedData/RollingBall-gbmnblxxirswheemtfgncxsqywkj/Build/Products/Debug-iphoneos, where there are a couple of files called Pods.framework, Ballman.app, Ballman.app.dSYM, etc. And I can't use otool -l on any of file there... if would be great if you can tell me how to locate the constructed bundle file. Thanks! – firstprayer Sep 30 '15 at 19:44
  • The app bundle is `Ballman.app`. It's a bundle so it's special directory in OSX and iOS. Simply `cd` into it or in *Finder*, right-click and *Show Package Contents*. – Droppy Sep 30 '15 at 20:02
  • Just found it. It's weird that I can't find Pods.framework under that directory, but I can find all packages installed by Pod, such MotionKit.framework, SwiftyJson.framework, etc – firstprayer Sep 30 '15 at 21:04

0 Answers0