2

I'm trying to use a fat dylib I've made that contains the latest version of tbb with code for all architectures I may be targetting (armv7, arm64, i386 and x86_x64)

Since iOS8 using dylib(s) is meant to be possible, in fact one of the error messages I found googling was the following one:

ld: embedded dylibs/frameworks are only supported on iOS 8.0 and later

Which seems to suggest that embedding dylibs is actually possible and we aren't only restricted to the new so called dynamic frameworks, yet, when I try to run my project I get the following:

dyld: Library not loaded: @rpath/libtbb.dylib
  Referenced from: /Users/user/Library/Developer/CoreSimulator/Devices/B4DCFF3E-10B2-4C01-953F-BD26D14300E7/data/Containers/Bundle/Application/8C84A844-97FC-4993-A37E-A456C4E2240F/TestTBB.app/TestTBB
  Reason: image not found

I thought it would be due to the dylib not being automagically copied into the app being built so I added it to the "Copy Bundle Resources" section in the projects "Build Phases" and I've since made sure that the libtbb.dylib is in fact being copied into the app and yet I keep getting the message saying that it can't be loaded.

I've tried using the "Embedded Binaries" section under "General" but it seems to be restricted to using only the new framework types.

Is there anything I might be missing?

As you may have noticed I'm trying to use TBB which comes with its own build makefiles that generates dylibs, I'm assuming that if it does it's because dylibs can be used, legally since the iOS8+ update.

I have seen ways of getting dylibs to load, but these aren't the ones that Apple would accept in their AppStore, I'm trying to do this for an app that is currently on the AppStore and I have no plans of getting it removed or not accepted after an update so I'd like to go with whatever the new "legal" way is to get dylibs loaded. My app is targetting iOS9.2+ since the latest update so this shouldn't be an issue.

All I can find are ways to get dynamic frameworks loaded but no info about actual dylibs even though the error message clearly states that they could be used.

Alternatively, is there a way to build a dynamic framework out of existing dylib files?

Thanks in advance.

  • IMHO, it looks like a rpath issue. Could you please check http://stackoverflow.com/questions/28244468/dyld-library-not-loaded-rpath-with-ios8 – ntfs.hard May 10 '16 at 09:10

0 Answers0