Building an Editor by Sharing Code Between Android, iOS, and Web with React Native

One of the most complex projects I worked on, but the result have been great!

Mobile.blog

When WordPress began rolling out the powerful new Gutenberg editor for building web pages (and, soon, entire websites), we were excited to bring that power to our users on mobile.

Why React Native

We know firsthand how hard it is to make a great editor. We have built native editors for Android and iOS before (andbefore). In addition, it was going to be extremely difficult to keep up with the work on the web version of the editor: the web editor had a substantial head start, and there is a larger community of developers contributing to Gutenberg on the web.

Gutenberg on the web is built with React, so we saw React Native as a way for mobile to leverage all of the work being done to create a great editor on the web.

Not only would reusing code from the web allow us to move…

View original post 774 more words

Saving a video of the iOS simulator

If you want a quick way to save a video from the simulator, you can now write this on the command line:

xcrun simctl io booted recordVideo --codec "h264" --mask black --force ~/Downloads/Simulator-$(date +%Y-%m-%d_at_%H.%M.%S).mov

Then use the simulator as normal, and when you to finish the recording just press Crtl+C on the terminal.

You will find your video in the Downloads folder.

Note: This only works with Xcode version 11.4 and above.

Converting a project to SwiftUI

I think the best way to get more knowledge about an API is to do a real project with it. So to improve in SwiftUI, I decided to convert one of my hobby projects, FontMetrics, to use it.

FontMetrics is a straightforward application that lists all the fonts available on iOS and visualizes the typography metrics of each one.

More

Video in SwiftUI: macOS

One of the great features of SwiftUI is that the same code can run on iOS and macOS. After all, you are just declaring what kind of views you want; the system will translate those to the adequate component according to the system.

So how can we make our Video view compatible with macOS?

More

Video in SwiftUI: Coordinator

So you may think we finish the work on the isMuted property on part 2 of this series? Not quite.

Start the demo app, notice the mute icon on the top right of the video controls, what happens if you tap on that control?

Sure thing it will mute our video, but notice that our toggle command does not update accordingly, it gets out of sync with the state of the underlying video player property.

So how can we sync between the player class and our SwiftUI Video view?

More

Video in SwiftUI: Properties

On the previous article, we created our Video component for SwiftUI. It was working correctly, but there was not a lot of configuration you could do to it.

For example, if you wanted to mute the sound of the video, there was no way to achieve that with our current component. Let’s see how we can change that.

More

Improving Offline Posting

Great article from my colleague Diego, about the new offline experience on the WordPress apps.

Mobile.blog

The best technology is invisible and reliable. You almost forget it’s there, because things just work. Bad technology never disappears into the background — it’s always visible, and worse, it gets in your way. We rarely stop to think “My, what good Wifi!” But we sure notice when the Wifi is iffy.

Good technology in an app requires solid offline support. A WordPress app should give you a seamless, reliable posting experience, and you shouldn’t have to worry whether you’re online or offline while using WordPress Mobile. And if we’ve done our jobs right, you won’t any more.

Getting Started

Our first step was a review of the current offline posting experience, done by a cross functional team composed of designers, QA engineers, and developers.

The process was pretty straightforward: we went offline, started testing, and taking notes. We also took into account support requests and existing bug reports.

We…

View original post 527 more words

Video in SwiftUI

Recently I have been tinkering with SwiftUI, the new UI framework from Apple

I’m enjoying the declarative approach, the ability to have real-time previews, and that all settings are save in code (bye, bye Interface Builder).

While this new framework has a lot going for it, it still doesn’t have the same depth of functionality of UIKit, that has years of development, and you may found out that some components you rely upon in UIKit are entirely non-existent in SwiftUI. But don’t despair Apple make it very easy to reuse any UIKit components by using two protocols to wrap around UIKit components:

They have very similar interfaces the main difference being what type of class they wrap around.

More

UIKonf 2019

Last week I attended UIKonf 2019 at Berlin.

This year conference had an all-female speaker line up, and I think this was an excellent idea to help increase gender diversity on our profession. A lot of female attendees commented they felt inspired to have the opportunity to see so many great presentations delivered by female speakers, and that it will help to attract more people to the mobile development space.

The videos will all be available online soon; bellow is just a quick review of the presentations I saw.

More