Alessandro Calzavara’s Stuff

Personal news and tech stuff.

Framer Is Now Opensourced

Today I finally complete the fastlane plugin called framer that allows us (Spreaker) to put all screenshots taken from the simulator into some nice and handmade frames images, ready to be uploaded to the AppStore!

I already talk about how our screenshots generation script works in the previus post.

The sourcecode of framer has been pushed on github and the gem is available from Rubygem.org.

All you have to do for using it in your projects is running the command

1
fastlane add_plugin framer

and then invoke framer in your fastlane lanes. This is our

Fastfile
1
2
3
4
5
6
7
8
9
10
11
12
desc "Take screenshots of the app"
lane :take_screenshots do

  # Capture screens
  snapshot(
    skip_open_summary: true
    )

  # Frame them
  framer

end

If you have issue or any feedback for improving it, open an issue on Github or drop me a line on Twitter. I will more than happy to listen your feedbacks and fix issues!

Alessandro

Automate Screenshots Generation for iOS Apps With Fastlane and Framer

Once your app is on the AppStore, you need to take great screenshots of it so that users are willing to try it out. If your app design changes a lot or you’re planning to localize it in many languages, it will take you a lot of times just to grab those screenshots. That’s why we, at Spreaker, decided to automate this heavy task. Here it is how we did it!

Our flagship Radio app is fully localized in 3 languages (english, spanish and italian). It support all iOS devices, both iPhones (from the smallest 4s with 3.5” display up to the 6s-Plus with 5.5”) and iPads (7”, 9” and 13”).

Because we want to showcase 4 screens of our app, it means we need to take 4 screens per device, per language. In total we’re talking about 72 screenshots!

And this task needs to be done from scratch every time we change the UI for adding new features or improving the looks of it. How crazy is that?

2016 Droidcon IT Recap

I attended the 2016 Droidcon conference in Turin (Italy) with my colleague Rocco.

I was exited because of the feedback my colleague Marco gave us from last year. His words put my expectation very high.

Where

The conference was hosted inside Lingotto Centro Congressi in Turin. If you came from outside the country, Turin is not super easy to reach but from Italy (and from Venice in my case) was fine, just a train. Then moving around is super easy and the city is beautiful. Never forget about food. Amazing!

What

2 days, 4 parallels tracks each day… a ton of options to listen to. From UX to code design, from security to side project management.

Great talks from great people from all around the world. Main topics was UX, optimization (from layout to dex method count) and code design.

The best for me were talks about UX, interaction between Designers and Developers and layout optimizations.

#PerfMatter for Android

slides: https://speakerdeck.com/alosdev/perfmatters-for-android-droidcon-tunis-2016

Many small details can let you stay below the 16ms limit for a fluid experience on Android. You need to consider any possible optimization.

Some interesting stats that Hasan told us - 61% of user leave an app if it takes more than 4 seconds to start and 49% if it takes just more than 2 seconds - 80% of user unistall an app after 3 faulty runs of it.

Engage and retain users in the Android world

slides: http://www.slideshare.net/MatteoBonifazi/engage-and-retain-users-in-the-android-world-droidcon-italy-2016?from_m_app=android

32% of users download an app because friends and family suggest it. It’s more than search engines (17%) or appstore search (24%). That’s why you should consider introducing App Invites (available with Google Play Services), a way to let users share an app that is cross platform (iOS and Android), allows to setup a personalized onboarding flow and it’s fully integrated with Google Analytics.

Plus, to make the user returns inside the app, consider implementi App Indexing so you app can be launched from a Google Search.

How to Talk to Your Users

slides: https://speakerdeck.com/anothem/how-to-talk-to-your-users

Asking to your users things about your product or idea is not an easy task. Why?

Everyone lies

So it’s important ask the right questions to discover real things and be objective about the results you got.

A/B testing is a different beast because it requires you to build something (and so are on some assumptions). If you’re in early stages, you can’t do that.

and what about wear ?

I attended a few talks about wear but I still cannot find any “good reasons” or examples for developing on this platform.

It seams nobody have found a real value “on your wrist”, yet.

All Conference slides

Conclusions

All in all this conference let us know we’re doing great on Android. We’re fluent with the main and best technologies available and we haven’t loose something important during the last year of development.

We can still improve for course, from code design, tools to use and internal workflow. And we will!

My colleague wrote his own wrap-up post on Medium. Go and check it out!

Alessandro

Automate All-The-Things With: Git Hooks

If you had the chance to work with some colleagues/friends on some projects, you already know that automate some boring tasks you have to do quite often is really important.

Everything started from a real conversation I had the past week:

Me: I updated the ad-hoc distribution profile. Please download it from the iOS Provisioning Portal and install it on your machine
My colleague: WAT?

This sounds like something just one of us should do and the others should JUST receive it without doing anything manually.

We use GIT) to manager all our code base so all we want to do is JUST run git pull on our local repository. Which tool can we use to achieve this?

Git Hooks

Hooks are little scripts you can place in your project $GIT_DIR/hooks directory to trigger action at certain points.

iPad Multitasking Support Requires These Orientations

Spreaker Studio is an Universal app. On iPhone the app works only in portrait. On iPad it works only in (both) landscapes. Interface rotation is enabled only on iPad, to allow user to choose where usb/headphone cable goes.

This morning I notice this app rotates on all orientations on tablet. This is unexpected because we declare on each view controller which orientations are allowed or not.

The point is that our Info.plist contains all interface orientations supported (both iPhone and iPad) letting each view controller, at runtime, decide which one is accepted or not.

From iOS9, Info.plist options overrides ANY interface rotation behaviour

RxJava Talk at Hackatron

Last week I did a talk about RxJava, a framework we’re using at Spreaker for a new project we’re working on.

RxJava it’s the Java implementation of the Reactive Extentions, a library for composing asynchronous and event-based programs using observable sequences.

It was a short introduction, just for scratching the surface.

Thanks to Hackatron for letting me talk about it!

Alessandro

Fastlane vs iTC

DISCLAMER: this is a living post. It will be updated frequently to add and update the code below as soon as fastlane/deliver will update. The list of changes is here

As all you iOS developers already know, recently Apple rolls out a new version of iTunes Connect.

That means that Apple broke all the fastlane things1 out there! How dare you, Apple!?

Keep calm and fix all the things

Felix, the (main) author of fastlane is working around the clock since days to make deliver working again. He decide (and I cannot disagree with him) to “abandon” the current version of deliver (0.13) and push faster on the new upcoming version that use spaceship, a new tool that greatly improved all iTunes Connect operations by NOT simulating user interaction on the website.

That said, here are the changes I made in our fastlane/deliver script to start publish again our iOS apps. It still not perfect and it not always works, but at least it runs.

EDIT 1: An official migration guide has been prepared on github. Please check it out.

Debug iOS8 Apps on iOS9 Devices

Before a new release of iOS came out, you want to test how the actual version works on it, right?

Be prepare, they said

Sometimes things can break so it’s better test (and fix ASAP) the actual version of the app on the upcoming version of the OS.

Of course, the public version of Xcode (6.4 6E35b) builds apps with iOS 8.4 SDK but it can run the app ONLY devices with iOS 8.4 tops. Newer versions are ineligible.

So it says

But there is a workaround for that.

Build iOS App for Facebook Review

Apple’s App Review is not enough? Let’s make our app reviewed also by Facebook! I mean, why not?!

I don't wanna live on this planet anymore

If you, like me, have an iOS app that requests some publish permissions, you have to let Facebook reviews it to make sure you’re requesting those for a good reason (and in a clear way).

There a simple guide available at developer.facebook.com, but it does not work if your app has a workspace.

Let’s say that your app uses third party libraries integrated with Cocoapods. The command suggested there will fail miserably (of course).

SPChart Update

Last week I spent some time on charts, using my SPChart. A couple of new features were necessary so I added them:

  • turn on/off drawing animation
  • flip upside down SPBarChart
  • customize font of the empty message
  • notify the delegate when user tap on the empty space of the chart.

I also fixed a couple of bugs:

  • popup could be displayed out of chart bounds
  • if chart view changes size, the chart was not redraw.

Today I released version 0.2 of SPChart so it’s time for you to update your pod files!

Alessandro