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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access