Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which libiconv should we use on iOS?

Tags:

ios

unicode

iconv

When I do "Add Existing Frameworks" in Xcode, I see three versions of libiconv.

  1. libiconv.dylib
  2. libiconv.2.dylib
  3. libiconv.2.4.0.dylib

This link says the latest and greatest is 1.13.1. I don't think it's the same as the numbers above.

Any clues?

like image 352
Plumenator Avatar asked Dec 02 '25 21:12

Plumenator


1 Answers

From checking the /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.0.1/Symbols/usr/lib/ folder, the only one of those that's an actual library is libiconv.2.dylib. Both libiconv.dylib and libiconv.2.4.0.dylib are aliases (ie, symbolic links if you prefer to think in UNIX terms) for libiconv.2.dylib.

So at the minute, it'll make absolutely no odds which you link to. Link to the one that gives you the most acceptable generality. So if you can handle any version of the API, link to libiconv.dylib, if you need the API that goes with version 2 of libiconv then link to libiconv.2.dylib and if you're relying on functionality in 2.4.0 specifically then link to libiconv.2.4.0.dylib. I assume that, as per the way things tend to work in UNIX, Apple may change what's an alias for what or actually supply multiple versions of the dylib in future as compatibility requires. At the moment it's all academic.

From what I can make out from Google, libiconv-1.12 builds to libiconv.2.4.0.dylib. I'm not able to determine the rationale behind that version numbering or where the idea comes from.

like image 160
Tommy Avatar answered Dec 04 '25 11:12

Tommy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!