Under the Radar

Under the Radar 98: The Accidental Episode


  welcome to under the radar a show hood

  independent iOS app development I'm

  Marco Arment and I'm David Smith under

  the radar is never longer than 30

  minutes so let's get started

  so we want to record a regular episode

  this week and in our preamble where we

  just kind of casually talk with each

  other before we record we ended up

  having a better discussion than whatever

  we were gonna talk about so we're we're

  gonna use that as the episode this week

  just some some context here I've been

  thinking about trying various ways to

  bring back watch offline audio playback

  for overcast you can play a background

  audio if you're a workout app so one

  option I'm considering is just making

  overcast a workout app on the watch

  where it would have to start its own

  workouts manage them in the overcast

  interface and then you know you could

  you can play the stuff in the background

  offline as long as they workout is

  running in the overcast app and as it

  has all sorts of problems and everything

  but it would work you know you you are

  the audio and watch expert I don't know

  nearly as much about the watch OSAP eyes

  as you do so you know I've been bouncing

  questions off of you of like can I do

  this can I do this like what are the

  downsides of this you also know a lot

  about health kit and dealing with health

  care which I have no experience with so

  I'm asking I've been asking you

  questions like you know what are the

  downsides of being a workout app and

  having to save data to health kit and

  work with health kit and how all the

  permissions for that and you've been

  experimenting with a project to have a

  workout audio player on the watch right

  yeah and so I've been playing since the

  LTE watch was announced I was like well

  maybe I need to try this and that it

  because as we get into and the

  discussion you know here it's a lot of

  things become pump more possible on the

  watch if you are a workout app I was

  like well I have a workout app I have

  workouts plus plus and the point of

  workouts opposed plus is to be this sort

  of super user like lots of customization

  kind of you know power app and so maybe

  adding podcasts playback to that

  wouldn't be crazy and so I've been

  experimenting with it and kind of

  building this out and it's in the II

  like working prototype stage at this

  point and it's kind of interesting to

  see you know is this a viable thing does

  it make sense and do we want to take it


  yeah hopefully you enjoy the discussion

  it's I personally I think I like these

  kinds of discussions where because like

  Marco and I we do this a lot it's

  probably fair to say like where it's

  useful to think through something out

  loud where there's you you're dealing

  with all these problems sequentially and

  you're able to benefit from each other's

  experience and just kind of see how

  these things evolve and you often end up

  in a place that's so different than what

  you may have thought you would when you

  were starting all right so with that

  here's our discussion we were having

  about these crazy things enjoy the

  episode and right before we start we are

  brought to you this week by Linode fast

  powerful web hosting options you can set

  up in just seconds and plans start at

  just five dollars a month for a Linux

  server with one gigabyte or

  industry-leading performance with native

  SSD storage user enterprise grade SSDs

  and access to before two gigabit network

  and intel xeon e5 processors these are

  the fastest processors available in the

  cloud market they have nine datacenters

  all over the world an API lets you

  easily automate tasks if you want with

  super simple scaling and hourly or

  monthly billing options they a fantastic

  pricing again all this starts with just

  $5 a month for one gig of ram about

  twice the amount of ram that you will

  get in other hosts like this I think

  it's the best deal of my posting I use

  it David uses it we lovely note it's

  wonderful as a listener of this show if

  you sign up at lynda.com slash radar you

  will support us and get $20 towards any

  Linode plan and with a 7 day money back

  guarantee there is nothing to lose so go

  to lynda.com slash radar to learn more

  sign up and take advantage of that $20

  credit or use promo code radar 2017 at

  checkout thank you so much to Linode for

  supporting this show I've made a lot of

  progress in workouts plus plus podcast

  player that's good it's just so slow to

  download and that it works like it's

  just it makes me feel like I'm down like

  downloading these files on a like a

  dial-up modem and so that makes me like

  I'm very curious to see what like an 80%

  faster Wi-Fi chip and the new watch will

  be and and I forget so last time when

  you were talking about this and telling

  me all the wonderful things you were

  finding the conclusion I believe you

  came to was

  it's pretty much impossible to do it

  right without an active workout running

  so you're like if you're just using

  audio file player in the background and

  you're not doing a workout

  what do the main is the main problem

  still that like it doesn't wake your app

  up when somebody hits the end and stuff

  like that I think it is it's along those

  lines yeah like a you'll have weird

  issues for example around interaction

  with the now playing control for example

  and things because in order to interact

  correctly with an out playing control

  you have to be running because you need

  to be constantly monitoring the status

  of the cue player because when they hit


  it's obviously you're not actually it's

  not skipping the file forward it's it's

  doing a next track and so you need to

  intercept that and override it there's a

  lot of things like that that if you're

  not doing a workout you won't have the

  ability to to do that interception like

  you'll get your little background you

  because as far as its concerned you've

  said play this file and it'll just

  merrily play it to the end or are they

  hitting it there are they hit next and

  then it would just stop I wish they

  would just wake you up in the background

  whenever like an event like that

  happened either somebody reaches the end

  or somebody advances to the next thing

  in the queue like sure I mean I mean

  they should and they're like I'm gonna

  up now playing side there's a ton of

  stuff that you really should do there

  yeah I rather than just like doing craze

  doing whatever to the file it should

  probably be in the same way that on iOS

  it does like you get a like an app

  delegate callback that says this button

  was pressed and then leave it up to me

  to do whatever I want to do with that I

  mean they probably don't do that because

  if they're gonna suspend you you

  probably can't be resumed fast enough to

  be responsive fund fundamentally the

  architecture is intended to be that if

  you are running that like it's this

  fire-and-forget kind of a thing that you

  say like play this file and then you can

  kill the app and it would be fine

  whereas in order to really do it

  properly you need to always be running

  which in the current form means you

  neither need to be a turn-by-turn

  navigation app or you need to be a

  workout app and also there's a bunch of

  other just like things that seem like if

  you're like keeping track of how far

  they've gotten for like bookmarking

  reasons and things

  um being a workout app is also something

  that seems somewhat important to be able

  to in the same way like I mean

  functionally the way I've built it now

  it just once a second I have the timer

  going and I'm just keeping track of how

  far they got and then also seeing has

  the cue changed and if it has adjusted

  you know she's restarting it thirty

  seconds ahead essentially you know it's

  mostly I do the back button still

  doesn't work but as far as I can tell I

  can't fix that because with a cue like

  the cue is strictly forward moving it

  doesn't go backwards because I get first

  what I was good at first what I did is I

  I set the cue up as play thirty seconds

  of silence played the podcast play

  thirty seconds of silence in the hope

  that if you hit back it would go back to

  the first thirty seconds of silence I

  can detect that you've jumped backward

  and then readjust play accordingly but

  that didn't work because hitting back

  just does nothing it just stops so this

  is I can tell there's nothing to be done

  there like it when you're playing the

  file the back button is like meaningless

  there's no like all it does is stop

  playback so I don't know that seems like

  that's just a bug and or a limitation of

  how he's implemented yes afford works

  and play pause works and now you're

  making me do this cuz like I figure I

  pretty much have the file transfer side

  of it solved I have my transcoding

  engine trend it makes it lower bitrate a

  base in smart speed if I do it again

  what I'm gonna do basically is just have

  it automatically sync stuff over

  overnight is there our background app

  refresh for the main extension like

  could I wake up them like periodically

  throughout the night and like cue up a

  back you a URL task or something like is

  that a thing I can do you you could you

  could ask to send the file to the watch

  but you would have no visibility as to

  when or if that is actually going to

  happen right there's no way for the user

  to prioritize or activate that so like

  you could in your app overnight say hey

  here's this file when

  when when it's convenient please

  transfer it to the watch and that would

  work but you don't know when and like

  that's the part of it like for when I

  was thinking through on my side of

  things I was like I needed up I'm just

  going to do it that it downloads using

  you know nsurl connection or nsurl

  session because it that way at least I

  can show the user what's going on by

  giving them that sense of feedback at

  least it's not frustrating for like well

  where's my file yeah I and it's like I

  see where you're going that I think it

  works in so far as like if you can do it

  when they're not when they're not paying

  attention and it works well enough then

  that may be good enough and you think

  that overnight if you play like if your

  watch is plugged in and your phone is

  plugged in that it would be use that as

  a good opportunity to move things across

  unless it needs for them to be unlocked

  yeah like I wonder like it is the

  session even active if they're both

  locked sitting on the table yeah that's

  a weird question because I don't know if

  it would say that hey this is a great

  opportunity to do it right or it would

  say the watch is off the wrist I'm not

  gonna do anything is the watch connected

  in the same way like is it in a like I'm

  asleep state because I'm not connected

  to a wrist anymore I don't know yeah so

  it's a bit of a mess I think I think

  first I will try the file transfer thing

  I'll just like set it up and just you

  know just but I don't have any playback

  you I just to see like is it able to

  stay on top of things that could

  automatically transferred overnight my

  idea is just like an automatically sync

  over like your whole queue and then you

  know once you finish that like you know

  basically try to sync overlay 24 hours

  of audio that's like you know finish the

  cue and then start just pulling new

  podcasts that have come in that aren't

  yet there and just just have tried to

  sink as much as possible if the workout

  hack is a way to simulate a decent or

  semi decent podcast audio player I'm

  going to go through all that all that

  hassle if it can be an overall good

  experience for the people who choose to

  go all-in on it so if you're willing to

  do a workout while you're playing things

  on your watch which I think most people

  are probably going to be doing one

  anyway during those times I'm willing to

  have this work again if everything else

  can be good like if the transfer

  experience can be good if the playback

  can be you know passable the awkward

  thing is just it's just so hard to know

  like the reason you ended up pulling it

  is because it worked but it didn't work

  well yeah and I suspect you will still

  have that same experience of like it'll

  work but it won't work well yeah and

  then you get into is it the same reason

  for the same reason that you pulled it

  last time is it better to just wait and

  hope that 4.1 or something will make it

  better and like ship it when it really

  works rather than it it's kind of a

  bundle of hacks in a lot of ways and the

  way I'm thinking about that now is like

  first of all like things have changed

  now with the release of the LTE watch

  demand is now going to be way higher so

  that changes the calculus a little bit

  because now all of a sudden like there's

  way more people who are going to be

  wanting standalone playback also if I

  make it a workout app that also solves

  the other purpose of just being

  convenient when you're working out like

  that that's gonna be the app that's

  gonna pop up first when your watch

  screen wakes up that you're gonna be

  able to see everything on just one

  screen instead of having to like pay

  between two things in the watch app

  horse or swap between two apps with like

  the rapid swapping features or like it

  can be better in these ways beyond what

  it was before if that makes sense

  oh sure I mean then you're thinking if

  you're a workout app then it's just you

  need to do all the health stuff yeah but

  but like so so what are the repos

  already have a privacy policy what else

  do I need I mean I think the biggest

  things is you look these easy ones like

  you have to add a disclaimer to your

  apps or description saying that you

  integrate with health that's all right I

  already have a big pile of those for

  subscriptions yeah it's like you need to

  have we need to do that and then it's

  just you'll need to add some at some

  point you'll need to throw up

  the health prompt requesting access on

  the phone to their health data like a

  very common thing that'll happen is they

  will gather that they'll not acted

  they'll not turn them all on and then be

  like why isn't my data there or the

  permissions won't sync correctly and so

  you have to tell them to go to the

  health app go to sources click your app

  turn them all off turn them all on

  Oh usually that resets it these are just

  like from a support perspective that

  come up with the health frameworks

  because there is such a like all of the

  permissions and privacy stuff that you

  then have to navigate just is a bit more

  tricky I don't think there's that you

  have to deal with people getting annoyed

  if you're for whatever reason you don't

  save the data correctly but I mean

  that's just like people people keep CC

  there they're very precious about their

  workouts of course so like if the app

  crashes during the workout they're very

  upset because they're like I'm working

  hard to earn this stat and you stole it

  from me that is worth a joke and

  actually how they feel like it feels

  like I took something from them that

  they worked towards when I suppose it's

  true in some ways but yeah I mean those

  are the big things I mean it's just it's

  just one other it's one other Avenue for

  things too that you have to now manage

  in terms of be like both the user

  experience which is a little awkward as

  well as I mean in general the confound

  haven't had too many issues on like the

  compliance or worry about people's data

  because I don't actually store any of

  their data all their data is in the

  health app if the only thing I'd be

  doing here is activating a workout

  session displaying its data on the

  screen during it and then saving it to

  health care that's it the other thing

  you'll have to navigate on your side

  that's related to that is Deakin I think

  you will have a fair bit of confusion

  around needing to have a workout active

  to start offline playback yeah and then

  that they need like if you send the

  workout the playback will stop will

  likely be more confusing because when

  you're playing from your phone that's

  not the case like you use the watch app

  while you're playing from your phone you

  there's no connection whatsoever and so

  I think they'll likely be confusing as

  to want I think why do I need to why do

  I need to start a workout I'm not

  working out to her I don't want to drain

  my battery with the heart rate monitor

  all the time I just want to listen to a

  podcast it's like well you need to

  because the primary purpose is to look

  for your app is to listen to the podcast

  not to do a workout I imagine there will

  be a dissidence there

  that's oh definitely yeah and that's

  that's the main argument for whether I

  should or shouldn't do this or not is

  like how bad is that basically yeah like

  how bad is combining these things and

  then what happens like if watch OS 5

  gives me the ability to do it without a

  workout then do I remove all these

  features that like yeah you are taking

  on the people's expectation that oh this

  is the app I use for a workout now yeah

  and so you are you then becoming a

  workout app forever and if they have

  Apple changes the way workouts can do or

  adds capabilities for workouts will you

  then have the problem of people being

  like oh I want you going to support the

  new something something workout system

  it but it may not really besides it's

  not really at all aligned with the core

  goal of the app I guess the advantage

  there is like they don't add new workout

  types that often usually it's like it's

  once a year it's you know during the

  watch OS update they'll add a few new

  ones so like it and the way I'm

  picturing the UI is like I replace the

  star button with a workout start/stop

  button and it pops up a tableview list

  that just says like alright pick your

  workout type and and you know it can't

  be smart and like you know sort the last

  ones you've used on top just throw that

  with the same the system workout app

  does yeah but like it doesn't matter how

  long that list is and then the API for

  all of them is the same so it wouldn't

  add like I think it would only add

  elements to that list as the workload

  right sure I mean necessarily I might

  just like workout types I think that's

  like so there's an example the recent

  addition in this I can watch OS 4 you

  can now do location tracking so you can

  get the map of where you walked while

  you went for your walk but in order to

  do that you need to implement all the

  core location stuff yourself oh I didn't

  know that wait so if I just start a

  workout and I do like just record like

  you know like I saw the this code sample

  online when I looked at it like last

  month and so if I just do like you know

  saving like the samples or whatever that

  does it it doesn't keep a GPS map no oh

  god so you have to implement that


  otherwise you lose the ability to have

  your GPS maps oh that's really bad so

  this is the this is that's more what I

  mean where it's really uh it's like as

  people's expectations for what a workout

  like because then if all of the overcast

  workouts don't have location data

  then is that gonna be annoying and

  frustrating and know what we want not

  what they want and do you want to go

  down the road for now implementing core

  location tracking and so on so that's

  more what I mean conceptually what

  you're sort of herders it's like having

  a workout app that's super minimal I

  mean maybe you could even just like all

  I can do is runs and walks right like

  even if you just said that that's what

  it does it's like it's just four runs

  and walks it's the purpose of any sort

  of like pedometer plus plus is workout

  app we're on the on the watch you can

  say like start a walk which for

  pedometer plus plus kind of it's like

  outdoor walk is the only workout type

  yeah because it's it's a pedometer like

  that's what it's it's four counting

  steps so narrowing it in that way it

  doesn't limit it too much but is it

  because you know your core purpose is

  not specific in fact it has nothing to

  do with working out it may be something

  that people do while they work out but

  it's got nothing to do with working out

  like it's I don't know and of course

  they have to worry about your cards that

  you're still worrying about your card

  API and your massive redesign and so who

  knows maybe you've got time you get

  finished with your cards watch it was a

  five will have come out and then it will

  all be a mute you know who all be fixed

  at that point so you don't even have to

  worry about it oh man alright so if I

  wanted to do this right I would have to

  not only have all the workout stuff

  starting and stopping the workout have

  that being basically tied to the

  play/pause button where they would like

  disable it when you're not running a

  workout but also have location tracking

  in my Abdur in the workout presumably

  I'd have to just like you know do

  continuous monitoring save the samples

  yep can you give location access with a

  prompt that only appears in the watcher

  does it prompt you on the phone I think

  it'll still show up on the phone they've

  made it anyone watch was for a couple of

  the prompts are now on the like the

  motion and Fitness one which is the one

  that I'd like interact with a lot is now

  possible to used to use to have to do it

  on the phone

  now it'll pop up and say you can approve

  it from the watch but yes I think health

  ones still require that you go to the

  phone which makes sense because they're

  so much more complicated

  and I don't know about location it

  wouldn't surprise me if you can do it on

  the watch now just because they did it

  for a look motion and fitness as well

  but I don't know that for sure this is

  just adding more and more clunkiness

  sure it does right and now all in any of

  the same thing it's like now you have a

  question of you need to have navigate

  people with location privacy or people

  come like try it looks like why does my

  podcast player need to know where I am

  and those types of questions which are

  enough attack both because if you want

  your workout map then I have to do this

  but all right so what if so what if I

  don't do workout stuff at all

  and I and just to recap so if I go back

  if I if I do wk audiophile player

  yeah I'm sure like what's the best I

  could do so like the bet that the

  problems that so now we know the

  problems of doing a workout at all this

  confusion all this overhead all this you

  know additional having to prompt for

  permissions and manage those permissions

  and everything maybe involving the phone

  and so ok if I go back to not having a

  workout go back to the way I was doing

  it before just this time with dub UK

  audio file player instead of AP audio

  ap file play whatever it is the main

  downsides to that is if somebody hits

  next track or previous track on their

  pods playback will stop and it will it

  won't be able to be restarted until they

  you know go to my app again and you

  won't know where they left off so what

  so if they got alright so fundamentally

  like the problem is that it's like you

  if you if you go down that road like the

  issue is it changes it from being able

  to like be the basic expectation with a

  podcast that you have a bookmark where

  you're keeping track and you like are

  offsetting from that doesn't work unless

  you can keep track of that bookmark

  right so if the user so let's say you

  know they they get back to their house

  they end the workout and they turn off

  their headphones or whatever it is like

  they they stop playback somehow and I'm

  not notified of that at all right not at

  all or at least you are almost certainly

  not like your app theoretically could be

  in the like if it was the last thing

  they had running you may be in the not

  fully background

  but not for grounded state so you may

  have some visibility but you have no

  guarantees of that or no expectation of

  of getting that event because it's not

  an event that you get like you know you

  would get the event when they finish it

  you'll get the like did finish to end

  notification the next time your app was

  for grounded but but it won't wake me up

  in the background and tell me it love

  these events as they happen oh I don't

  believe so now this I hate this so much

  why isn't this easy yeah

  our engineers they're our job is to

  solve hard problems because like

  literally like every day I'm gonna be

  getting questions from people every

  single day with LTE watches saying why

  haven't you done this yet why is there

  no podcast Apple I haven't you'd like

  and the worst thing is if Apple does it

  if Apple does their version of podcasts

  if they bring it to the watch they're

  gonna use real api's that I can't use

  and so that's gonna just make me look

  bad and make my user to complain and I'm

  gonna lose users for that because

  they're gonna be like well y-you know

  what if Apple can do it why can't you do

  it you know they're already oh also

  while I have you here talking about

  audio api's is there any streaming API

  that we can use on the watch said the

  only way to do streaming as best I can

  tell would be to so it would be to do

  the crazy hack saying I mentioned before

  I used to do in the first version of

  audio books back in iPhone OS - yeah

  where I would download mp3 files

  sequentially and after I had like the

  first the first two Meg's of it

  I would tell to give hand give that

  those two Meg's to the player and then

  have it start playing those and then

  keep backfilling like the you know it's

  like I'm on a train trying to build the

  tracks as I go yeah which is not

  straight it's like is is streaming in so

  far as most people's definition of

  streaming is just instant playback

  technically streaming is a different

  thing than fast start for most user

  expectation perspective streaming is

  fast start so as long as you could do

  something like that you would from a

  user's perspective it would base

  they'd be streaming and I mean you'd

  hope like if the watch is fast enough

  and the network connection is fast

  enough like if the download completes in

  you know ten seconds

  it doesn't really matter like the fact

  that it you have to wait ten seconds

  like that's not a huge killer like even

  if you're streaming there's usually like

  a buffering interval so yeah but yeah

  there's no there's not a strict

  streaming interface in the same way that

  like AV player you can just pass an HD

  HTTP URL and it takes care of it for you

  everything has to be file based yeah and

  we don't have the kind of low-level

  access that I could like do my own thing

  like I do in the phone version like cuz

  I don't use AV player but like I just I

  used raw audio playback API is that I I

  download the files and chunks myself I

  pass them as I have them to you know

  it's like but I can't do any of that on

  the watch because there's no core audio

  right or at least not not for not enough

  for background and playback yeah you

  would have the same problem you would

  have the same problem of using AV AV

  audio player where you can use AV audio

  player if you're a workout app but then

  you don't integrate with the now playing

  in or the now playing they're not

  playing app and you also can't control

  audio volume as a result so if the

  Bluetooth volume on the headsets is set

  too low

  there's no way to raise it up right yes

  I had that problem dramatically it's

  like at least if you use the file player

  API or the cue player API then you can

  change its correctly ties into it and so

  then you could say if you like I'm

  expecting to have a little I can detect

  what the current system audio is is that

  I can detect what the system volume is

  at least so I can tell you if it's if I

  can I know if it's low like if the

  system volume is like 0.2 then I can at

  least know that and pop up a thing that

  says please adjust your volume in the

  now playing app or something like that

  like I can at least tell you I can't I

  can't do it for you yeah that still

  sucks like it's it still sucks that like

  the experience of this will suck but at

  least it's better than like it just

  being super low and the user of not

  really knowing why or having any idea of

  how to change the yeah and having no no

  mechanism for I want so badly for these

  like I would just

  the phone audio api is on the lawyers

  like why why don't we have I mean I mean

  I will say it reminds me in the best

  possible like both in a lovely and in a

  terrible way of all the development I

  did for with audio api's in an iPhone OS

  2 like way back what is that eight years

  ago like I was dealing with back then I

  mean I remember it was a massive deal

  like huge like applause during the

  keynote when when Steve Jobs was playing

  and playing of playing us playing a

  track in Pandora and then he hit the

  home button and it didn't stop playing

  yeah that was like rip-roaring applause

  for something that now seems like

  completely foolish like and I remember

  having to build all these crazy like

  there's still a setting in audio books

  auto resume playback on launch which at

  the time I was an important feature

  right now I get some people being like

  why would I want to do that like when I

  open the app why should just like

  immediately start playing it's like well

  back in the day you'd get a text message

  and you'd quit the app and it would stop

  playing your audio and you know you'd

  apply to your text message and you'd

  come back to the app and you have to

  respring the whole thing because there

  wasn't multitasking so it would restart

  the app from scratch and then you'd want

  to keep playing I'm like that was that

  was the world in which I had to be I had

  to build things and like for the phone

  Fiat the watch feels like the phone did

  you know eight years ago in the same

  room in that way yeah except by year

  three of the phone we had multitasking

  maybe this June maybe next year you know

  we just need to wait one recycle or 4.1

  maybe or 4.2 I don't know

  so this is show I think we just made a

  show an intentionally the accidental the

  accidental technical podcast I hear

  accidental podcasts are very successful

  so yeah maybe it's a good it's a good

  pivot for us Wow well thanks for

  listening everybody and we'll talk to

  you next week