distriqt / ANE-Core

ANE providing a centralised library for native extension common utilities and a notification / delegation system
https://airnativeextensions.com
21 stars 12 forks source link

FacebookAPI requires patching ios sdk, linker error "library not found for -lclang_rt.ios" #11

Closed esg-roger closed 5 years ago

esg-roger commented 5 years ago

Don't have access to an issue tracker for FacebookAPI, this may apply to other ANE products as well. Building an app that uses this ANE for iOS using XCode 10.3 and iPhoneOS12.4.sdk produces a linker error: ld: library not found for -lclang_rt.ios

The solution was twofold:

  1. -platformsdk must be provided to adt/your IDE locating the iOS sdk. This step should be added to the documentation.
  2. The clang library must be copied manually(!) from the XCode toolchain into the AIR SDK. This is the case with up to the latest AIR SDK 32. cp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/*/lib/darwin/libclang_rt.ios.a $AIRSDK/lib/aot/lib (the version after clang/ varies; $AIRSDK is your air sdk root.) Not sure what the generic solution here is, but given that you distribute copies of the iOS SDK, you may consider providing a pre-patched AIR SDK as well?
marchbold commented 5 years ago

Hi, This information is in the Facebook API issue tracker relating to this issue. Cheers