Launching iMessage on Spotify

Leave a comment

This week, a project me and my friends here in San Francisco have been working on finally went live. The Spotify iMessage App Extension.

Screen Shot 2017-08-04 at 1.25.07 PM.png

This app extension let’s you search for songs, send them to friends, and then play short 30 sec clips.

Sep-15-2017 08-14-06.gif

I know it doesn’t look like much – but it was a lot of work! You’ve got just the basic functionality of the App itself. You’ve got error handling. How to handle going off line. Analytics. Authorization. The expand and collapse interaction of iMessage. Nasty bugs. And the requirement to support both portrait and landscape orientations too (thank you UIStackView).

Sep-15-2017 08-18-08.gif

You don’t launch something like this without a lot of help. And I want to thank:

And my partner in crime, with whom this all started as a Spotify hackweek project, Joseph Baena.

Without them none of this would have worked.
So thank you team.
Onwards and upwards.
Looking forward to iterating more on this great platform!

Oh. And we are hiring! So if you are a mobile iOS or Android engineer, and have always wanted to work a great team in the great San Francisco Bay area, go checkout our job listings here and see if you’d like to join the band.

Links

Advertisements

How to fix iMessage orientation crash

Leave a comment

iMessage will crash in mysterious ways if you start in portrait, change to landscape, and then select something from your conversation.

My buddy kevski figured out that you can fix this by dismissing yourself every time you send a message.

MSMessageViewController.m

- (void)didStartSendingMessage:(MSMessage *)message conversation:(MSConversation *)conversation
{
[self dismiss];
}

Just another weird iMessage thing. But this seems to be what most apps do and it fixed an annoying bug I had. Merci kevski!

How to pin UI element to the top layout guide using autolayout

Leave a comment

Say you have a SearchBar that you want to pin to the top of your screen and have it stay there regardless of whether you are in collapsed or expanded mode.

Add your search bar, and then control drag a constraint to the top of the view like so

Screen Shot 2017-01-08 at 7.04.42 AM.pngScreen Shot 2017-01-08 at 7.04.48 AM.png

This will add a constraint that will bind the searchbar to the ‘Top Layout Guide’ property of your view controller. Top layout guide is a special property Apple provides to automatically keep your view below nav bars and things like this.

Screen Shot 2017-01-08 at 7.06.22 AM.png

Now just set the value of that constraint to zero (0) by double clicking on it.

Screen Shot 2017-01-08 at 7.07.04 AM.png

Add two more constraints to in the search bar to the sides (click the left and right red bars and then ‘Add 2 constraints’ at the bottom.

Screen Shot 2017-01-08 at 7.08.37 AM.png

Screen Shot 2017-01-08 at 7.09.33 AM.png

And then press Cmd + Alt + = to automatically reposition everything.

Screen Shot 2017-01-08 at 7.10.09 AM.png

Your searchbar should now be pinned to the top and stay there regardless of whether you are in expanded or collapsed iMessage mode.

Screen Shot 2017-01-08 at 7.11.15 AM.png

 

Screen Shot 2017-01-08 at 7.11.22 AM.png

 

iMessage Not Delivered

Leave a comment

If you get this error message on your childs iPad try the following:

Goto Settings -> General -> Date & Time

And turn on ‘Set Automatically’. If it’s already on turn it off and on again.
If you are still stuck go

Settings -> Messages and logout and log back in again.

For some reason this has fixed my kids iPad problems multiple times.

Links that help
http://support.apple.com/kb/ts4268

%d bloggers like this: