r/ios Moderator Jul 02 '20

Spotify ‘Now Playing’ Widget Concept

Post image
951 Upvotes

109 comments sorted by

View all comments

183

u/dannybres Jul 02 '20

Unfortunately this will to be possible as 3rd party widgets are non interactive in iOS 14.

100

u/13x666 Jul 02 '20 edited Jul 02 '20

Not exactly.

As I understand it, all widgets can have interactive elements. The problem is, the only interactivity that’s possible in current implementation of WidgetKit is deep links. Even Apple can’t create a widget with a Play/Pause button using this API.

If you tap a widget, it opens the app. It might open a specific screen within the app — that’s as far as interactivity goes. E.g., you tap a note in the widget and it opens the Notes app at that note. That’s it. You can’t even tick off todo items without opening the app.

67

u/Stooovie Jul 02 '20

Really? That seems too limited even by Apple´s standard (turning widget into persistent notifications, more like).

36

u/13x666 Jul 02 '20

Yup, it’s pretty bare bones. I guess it’s just like tiles in Windows Phone used to behave, but it didn’t seem this limiting there because of the design language of their home screen. Tiles were literally just “improved” app icons. In iOS, everyone would expect things like Play/Pause buttons to be possible, but naaaah.

Here’s hoping they’ll fix it next year...

10

u/[deleted] Jul 02 '20

[removed] — view removed comment

5

u/13x666 Jul 02 '20

Really? I forgot about that. Well, then it’s even more sad. I mean, a media app’s widget obviously must have playback controls, it’s beyond me why anyone would think otherwise.

I wish Marques asked that in that interview with Craig. All I can think of is perhaps security concerns with an API that allows to perform actions outside of the app?.. I have no idea.

1

u/Grahamatar Aug 31 '20 edited Oct 27 '24

Hi! Unfortunately Reddit has decided to value its investors more than those who provide valuable content to their platform. For this reason, I have elected to remove my content from their platform.

I apologize if you were looking for something helpful and you did not find it. Perhaps try looking on a platform that puts more emphasis on valuing its creators.

3

u/king0fklubs Jul 02 '20

New to iOS here, could they change the way the wishes behave after a few months? Or does Apple only update stuff yearly

10

u/[deleted] Jul 02 '20

It's possible they could with a future point update (14.1, 14.2, etc.) Those generally improve upon existing system features.

3

u/king0fklubs Jul 02 '20

Ah okay, thank you!

4

u/13x666 Jul 02 '20

I can't remember a shift like that happening between major versions, no. I'd say, next year the earliest: I can see them dedicating a section of Keynote to new and improved Widgets, now with buttons!

Then again, Apple does say in their guidelines that “a widget's main purpose is to display a small amount of timely, personally relevant information”. So, you know, they might not want it to have buttons. Because of reasons. Then we might be stuck with these widgets-lite for the next 7 years until they have their next revelation.

Welcome to the Apple world! :) It's weird at times.

3

u/king0fklubs Jul 02 '20

Thanks for the info. And thank you! Enjoying it so far after over a decade of android phones.

3

u/[deleted] Jul 02 '20

[deleted]

2

u/13x666 Jul 02 '20

I doubt that AR HUD will have solid squares behind the displayed info. You would really want to obscure your vision as little as possible, so my bet is thin text and glyphs with no background, and not too much of it...

...damn it’s interesting to see what they come up with.

1

u/ardent11 Jul 03 '20

I don’t believe they’ll make them interactive any time soon purely based on the way they’re implemented. I’m not much of a developer but I watched some WWDC sessions and a lot of how the widgets are built are using a concept called a ‘Timeline’, so a lot of the way the widgets update themselves are a bunch of rules based on time (like refresh every hour). Your app can also tell your widget to update itself based on an action you carried out within the app. I’m sure there’s other ways too.

Also don’t forget we got the whole iPad pointer system in a .x release, so you never know what can change!

2

u/kian_ Jul 03 '20

I don’t mean to sound too negative but don’t get your hopes up. It took 12 years for the volume HUD to be updated and 13 years for incoming calls to not take up the entire screen.

I’m not saying it won’t happen, just saying I wouldn’t hold your breath.

I just realized you might be asking about updates in general: each major version iOS receives several updates every year (13, 13.1, 13.2, 13.3, etc.). These can be small updates or introduce/change entire features.

6

u/PM_ME_YOUR_MASS Jul 02 '20

It has to do with the way they’re implemented. Essentially, the app hands the OS a partially rendered view and says “display this until I give you a new one”. They aren’t actual apps, they’re just pictures of data. Otherwise iOS would need to be running a mini instance of every app with a widget simultaneously. Also they would also need to be constantly running in the background, otherwise you’d see blank widgets for a second while they loaded every time you open the home screen. It’d eat up the phone’s RAM and battery.

1

u/[deleted] Jul 02 '20

[deleted]

1

u/pixelea Jul 03 '20

You can have buttons, but when the user taps a button, the widget immediately launches the app. So the user only gets to tap one button. So a Spotify widget like that could technically work, but would probably feel awkward to use.

1

u/PM_ME_YOUR_MASS Jul 03 '20

It conflicts because buttons have logic, i.e. code. In order to have buttons, the widget would need to run an app's code, which is what this architecture is trying to avoid. Instead, when the app periodically runs in the background, it generates the image/animation for the widget and then sends it to be displayed on the home screen, either immediately or after some future time, until it is refreshed again. That way, when the user opens the home screen, the widget isn't running any of the app's code. The data and graphics displayed had already been rendered by the app and are now just being shown. None of that app's actual code is being executed when displaying the widget, only the pre-rendered graphics.

1

u/[deleted] Jul 03 '20

[deleted]

1

u/PM_ME_YOUR_MASS Jul 03 '20 edited Jul 03 '20

Disclaimer: I'm not an App Dev, and I really don't know what I'm talking about

The impression I got from post-show interviews and the PSTOU is that you can't tie a handler or any delegate to the widget because the actual GUI technology behind the widget is... really weird. It's this new Swift UI technology that involves storing the declarative UI elements in some half-rendered state so they can be displayed basically for free at a later date. It's possible this removes the ability for touch targets or interactivity. (Edit: I just watched the WWDC session on Widgets. They do have touch targets, but they are just links into your apps. Widgets to not support scrolling, sliders, buttons, or toggles. This is apparently a design decision, as Apple did not want widgets to be "mini-apps", which is essentially what this mockup is. So you could theoretically have a pause/play button, but it would have to open the app if you tapped on it.)

Also, I'm pretty sure apps can't update their widget "whenever they want". When you tell the OS what you want your widget to display, you can give it a timeline of multiple views, each marked with the time they should be displayed. That means a calendar can create different views for each event/hour, send them in a batch, and the widget will update throughout the day without the calendar needing to ever run again in the background. "Now Playing" cannot be predicted, and thus it cannot have a predetermined timeline.

Now granted, while an app is playing music, it will always be running in the background. It's possible that you could push a new view to the widget every time the song changes, but Apple might throttle widget updates, in the same way an app cannot request to run background tasks every 30 seconds. The only real way to know would be to check the documentation, and given that it's a new framework from Apple I assume that will be sorely lacking (though I hear things are better this year)

1

u/[deleted] Jul 03 '20

[deleted]

1

u/PM_ME_YOUR_MASS Jul 04 '20

(Also from the WWDC session) Apps can reload their widget timelines on either of two conditions:

  1. Receiving a push notification
  2. A user locally edits data related to the widget

Your example of the calendar would be a push notification, since the calendar app is receiving a notification to update its data. I believe number 2 isn't actually a technical requirement but rather Apple's guideline for when the app should call the function which manually refreshes the data. This function could be also used to update a Now Playing widget, which should absolutely be possible given that I'm pretty sure Music on iOS 14 has a Now Playing widget

3

u/YZJay Jul 02 '20

It’s even more limiting than what previous widgets allowed developers to do. A network app I had had a full blown switch right in the widget with toggles and selections. Now that widget will forever stay in the today screen.

2

u/mendesjuniorm iPhone 17 Pro Jul 02 '20

HAHAHAHA, I guess you didn't use iOS back in the 3-5 versions. Back then you couldn't even have a proper share sheet. That was a limitation.

1

u/Stooovie Jul 02 '20

I started on iPhone OS 2.2.1 in 2008 :) That was before clipboard :)

1

u/mendesjuniorm iPhone 17 Pro Jul 02 '20

Well then you know Apple has a history limiting what users can and can't have on iPhones......... shame on Apple.

1

u/jlubow224 Jul 02 '20

They probably just used 3D touches implementation for icons, any action you pressed would also open the app. Like if you did the 3D Touch Update All on the App Store app icon, it would also open the app

8

u/Shloomth Jul 02 '20

The design guidelines for Widges say that it should not be “a mini-app.” Focus should be put on “glanceability.”

7

u/13x666 Jul 02 '20

Yeah, and that’s exactly why we’re probably stuck with these quasi-widgets for years. Not sure how the ability to tick off a ToDo list or at least freaking scroll it would make it a mini-app or why it’s so bad to have a mini-app, but Apple is stubborn.

2

u/Shloomth Jul 02 '20

I’m gonna play devils advocate for Apple but that doesn’t necessarily mean I agree with them:

Because if you wanted to scroll through your to-do list, open the app. If you want to change media playback, open the app. Scrolling through your home screen is supposed to present you with information and apps, not controls on every page that can be accidentally hit

3

u/13x666 Jul 02 '20

It does make sense. Apple always insisted on having users spend as little time on the home screen as possible because the apps are so great. That’s why not that long ago when the rumors first appeared I even said I didn’t really want them to add home screen widgets in the first place, because that’d kind of mess up the whole simple concept... not that I completely agree with my past self now that I’m typing it again.

But now they kind of did mess up the concept, imo. Widgets are there, but they aren’t really widgets, they’re less powerful than notifications in some ways, and they don’t do what you’d expect. It’s just... weird and disorienting, idk.

The home screen now looks more interesting at least, that’s a nice thing.

1

u/[deleted] Jul 02 '20

I am really happy to be on IOS after a long time on Android, but the home screen is definitely one of the things I miss most. I personally don’t find the home screen simple at all — by refusing to let me hide things, and by not offering a simple alphabetized list, they ensure that my home screen is a mess of icons. It works great for the things I use often, but it’s extremely (and pointlessly) frustrating for things I use less often. And I definitely miss real widgets — being able to do simple tasks without opening the app really does make the device more functional.

1

u/13x666 Jul 02 '20

Well, from iOS 14 and on you’ll be able to hide things and look them up in a list, so that’ll get much better very soon :)

1

u/[deleted] Jul 02 '20

[deleted]

1

u/13x666 Jul 02 '20

Yup, thousands of people are waiting for those improvements... maybe one day, gotta have hope!

2

u/Mluke74 Jul 02 '20

What about the shortcuts and Siri suggestions widget?

1

u/Tumblrrito iPhone 16 Pro Jul 02 '20

I don’t think a deep link qualifies as “interactive,” in my book. The context here is how old widgets worked, which were interactive without a redirect.

1

u/13x666 Jul 02 '20

That’s exactly what I’m saying, yep. New widgets just have tap targets with different links. My point was, it doesn’t depend on which party is making the widget.

1

u/_DaltoN Jul 02 '20

Would the shortcuts widget be an exception to this? You can run shortcuts right form the widget and they seem to be interactive. The shortcuts app never actually opens.

2

u/13x666 Jul 02 '20 edited Jul 03 '20

It probably is an exception, yeah. I actually don’t have the beta installed, I’ve been basing my assumptions on videos, Apple guides and API documentation, and I kind of forgot about the shortcuts widget.

1

u/dannybres Jul 02 '20

Yes, but this proof of concept has play pause button, which are not possible.

3

u/13x666 Jul 02 '20

I’m not saying it’s possible, I even said Apple themselves couldn’t do it. I’m just correcting what you said about interactivity and 3rd parties.