Day 3: Cross-Platform

Or, Writing Cross-Platform Code

Today we’ll see just how close we can get to writing cross-platform apps with RubyMotion. RubyMotion is a fairly thin layer on top of system APIs. There are a lot of MRI Ruby APIs missing, including the networking APIs. This makes it hard to write really comprehensive cross-platform code, because almost immediately you must use platform APIs to do meaningful work.

That doesn’t mean that cross-platform code is impossible. We can still think about areas where we tend to solve the same problems on both platforms, and then build interfaces to help us generalize the way to think about solving those problems. Then we can build adapters to handle the platform-specific things. That’s what we’ll ...

Get Seven Mobile Apps in Seven Weeks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.