13 comments

[ 2.9 ms ] story [ 42.5 ms ] thread
Does anyone know how they analyze the apps to gather these statistics? I guess it's not trivial as it even works for obfuscated (proguard-ed) APKs and their database of libraries is quite comprehensive. Does this use some byte code fingerprinting or is their an easier way?
The libraries reside in /data/data/<package-name>/lib after the app has been installed. So you just have to have a rooted phone and trawl through there,

I guess the names of the libs could be obfuscated by some sad soul, but why would anyone bother? They're just binaries and it would be a pointless exercise as you can't remove the symbol names, and they would give away the identity of the lib.

As an aside, just browsing through this huge collection of Java libraries actively used in Android somewhat vindicates Google's decision to go with Java.

The Objective-C open source world is maturing but it still only has a tiny fraction of the depth of what's on offer here.

Scrolling through the list of most active libraries, many either have iOS versions/alternatives or duplicate things that iOS has built-in by default.

Also, let's not forget that you can also use any C or C++ library on iOS as long as it has a permissive license.

Gson, guava, roboguice, rhino, kawa, mime, jaxen etc have iOS equivalents? Please post links. I'd love to use them in my next iOS app. Java the language is meh but there's a shitload of very useful and robust code to draw on.

Bridging to native is fairly easy in iOS but it's not nearly as clean or idiomatic as just dropping in a jar file.

Gson: JSON parsing is native since iOS 5.0, but there's also a number of open-source alternatives (json-framework comes to mind)

Guava: As the description says, this is basically a collection of core components:

"The Guava project contains several of Google's core libraries that we rely on in our Java-based projects: collections, caching, primitives support, concurrency libraries, common annotations, string processing, I/O, and so forth."

I don't think there's anything there that is not already in iOS, or available through some framework. You have CoreFoundation for collections, CoreData for serialization, CocoaAsync for I/O, STL if you need very specific data types, GCD for concurrency, string processing including regexes are native in iOS, etc.

Roboguice: Looking at the project description I can't even make out what this library is for, besides working around common pitfalls and boilerplate you encounter when programming for Android, none of which applies to iOS programming.

Rhino: I believe you can use JavaScriptCore directly from iOS. Probably you can even use Google v8 from iOS apps if you build it into your application (if the license allows it).

Kawa: If I understand correctly this is a whole different development language based on Scheme. I think this is so specific it doesn't really count as a 'library that iOS is missing'. If you want to develop in different languages than (Obj)-C(++), iOS is the wrong platform.

Mime: I can't find anything about this library, is it something that's supposed to handle MIME-related operations? For iOS I found something called MimeKit from Atlassian, which seems to provide API's to read and write MIME encoded messages and such.

Jaxen: For any XML/Xpath related stuff, there's at least 8 different libraries for that, just have a look here: http://www.raywenderlich.com/553/how-to-chose-the-best-xml-p...

I found all of this using just a few quick Google searches. Maybe you have reasons to prefer the Java-based libraries you listed, for example because deploying them on Android is a little easier than compiling stuff into an Objective-C application, but that's wasn't the point of this exercise.

Probably you can come up with some Java library available on Android, that doesn't have any iOS equivalent, but I could do the same for iOS.

GSON is much more than a JSON parser. Guava has no real equivalent in breadth or depth on iOS. Most of the rest of these are far more mature and battle tested than the comparable Obj-C efforts. Obj-C has been a mostly irrelevant sideshow in the programming world before 3-4 years ago and it shows in the ecosystem. I've been doing nothing but iOS for over a year now so I'm quite aware of what's out there.

And, more importantly, these use the same resource allocation strategies, naming conventions, documentation tools etc as your own code, unlike C/C++ library foo.

I'm with you on this one, there wasn't anything I saw in those Android libraries where I thought: I desperately need that for iOS.
If you want to develop in different languages than (Obj)-C(++), iOS is the wrong platform.

Well, the OP was trying to demonstrate the flexibility available when programming with Java- your response is "iOS isn't meant to the flexible, therefore it's just as good"?

I believe you can use JavaScriptCore directly from iOS. Probably you can even use Google v8 from iOS apps if you build it into your application

I doubt it. Wouldn't this fall under Apple's restrictions on code interpreters?

It's a shame that ActionBarSherlock is not further up the list. That library is downright incredible. But, knowing that devs are using the support library to backport many of the newer APIs is great.

Edit: I'd also like to point out AQuery. If you are an Android developer and have not seen AQuery, definitely check it out.

well not really surprising, from what I have seen almost everybody uses it in their new apps these days.
Android Query far down the list as well :/

From what I've done with it, I'll reckon it'll get more used in the near future.