Hacker News new | past | comments | ask | show | jobs | submit login

Could you develop libraries that way, though? It would have to be absolutely pure Swift, not using any iOS libraries, like NSURL etc. etc. - surely incredibly limiting.



Not true. Both Foundation and Core Foundation libraries will be eventually ported and open sourced.


This feels a little like wishful thinking. Remember YellowBox back when Apple originally bought NeXT?

YellowBox was going to be a cross-platform updated version of the OpenStep APIs. While I remember some alphas of it, it basically got nixed.

http://www.roughlydrafted.com/RD/RDM.Tech.Q1.07/4B800F78-0F7...

As much as I enjoy using Apple products, their history says that they would not directly support something like this.



Omg, I had no idea. Awesome!


Absolutely I could. In fact, as I said, I already am, albeit with a more limited technology. For building multiplatform apps I build all the business logic in a Java library which I then convert to iOS using J2Objc. IME this is always between a third and half of the code that is now shared between platforms. For classes that will depend on platform specific stuff, like newtork requests that are handled differently by iOS and Android I use interfaces that I later implement (as protocols) on each side. iOS does end up feeling as a second class citizen though, because J2Obj is not exactly fast; if I need a change in the library, a recompile can take a few minutes


You could this for your own libraries, but I would strongly recommend against doing this for a public lib if you want traction (e.g. if you are making a bunch of SDKs for your APIs) - in this case you should publish your lib in the most popular language(s) for the platform(s) you are targeting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: