Categories
Blog

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?

Categories
Blog

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?

Categories
Blog

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.

Categories
Blog

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

Categories
Blog

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.

Categories
Blog

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.

Categories
Blog Code

Aztec: A native HTML editor

One of the most important aspects of the WordPress app is the post editor, after all the content generated by our users is what make their site different from all the others.

Since we started developing the WordPress apps, we wanted to provide the best writing experience to our users, writing is already hard by itself so you don’t need that the tool you are using to write to be complex, slow, or error prone.

Last August my team at Automattic started a project called Aztec, the ambitious goal was to have HTML editor that could support the same feature set has our web editor but completely written in native code.

After some hard working months, we are now releasing the first beta version of the editor in our native apps. If you want to know more you can read the official release post here and for the more technical inclined an architecture overview is available here. You can also check our open source code on our Github repo.

Remember this is not limited to be used on the WordPress apps, you can use it in any app that needs an HTML editor.

Pull Requests are welcome!

Categories
Blog Code

Font Metrics update

I developed FontMetrics some years ago when I was working for several publishing clients. Clients in publishing normally want to use their own brand fonts and have precise requirements regarding layout and text alignments.

This was a bit tricky to do with the iOS text system at the time, so I developed this app to allow to preview fonts and check their different metrics. This allowed the design team to do quick checks on the fonts files provided by the client and to quickly find the metrics to use for layouts.

This week I finally got some free time so I decided to have a look what needed to be done to bring it up to iOS 10. The last time I updated this app was when iOS 7 was launched, so it really needed some TLC!

This was implemented way before Swift was a thing so all of the app was written in Objective-C, and when I started to look at the code I found a lot of small issues and some really bad code.

It’s very humbling to look at code that you developed some years ago, it really makes you understand that you are always learning and you can always improve.

The app was so simple that I decided to update all code to Swift and do some much needed updates to the UI/UX.

I’m pretty happy with the end result so I decided to make the app open source and publish the repo on GitHub, bug reports and PRs are welcome!

Categories
Blog Code

Quicker Unit Test in iOS

Today while reviewing a PR on the WordPress iOS app just found about this very interesting technique to make iOS unit tests run quicker and more contained.

Simple and very efficient.

 

Categories
Blog

A New WordPress App Update, Designed for the iPad

A great update on our WordPress app.

The WordPress.com Blog

Over the past few months we’ve been working to dramatically improve users’ experience on iPad — and we’re proud to share those with you now, in our WordPress app for iOS, available in the iTunes Store.

IMG_1394.jpg

The apps were originally designed with only iPhones in mind, so we wanted to make better use of the space available on the iPad and especially iPad Pro, to maximize your productivity in the app. These changes shipped incrementally, with the very final ones being included in the 7.1 release that went out last week.

We’ve improved the My Sites management to make it easier to handle multiple sites on iPad. Now you can see the posts from that blog alongside the list of blogs, and site management is now all on one screen – no more back and forth!

nullnullnull

Managing profiles follows the same pattern.

null

Notifications has been overhauled, too.

nullnull

We’re really…

View original post 34 more words