skip to Main Content

I already created my Apple Watch music app with background sound in SwiftUI. I want to somehow present NowPlayigView. The only thing I found on the Apple Developer website about it is in the attached picture. Maybe the solution is very simple, but I can’t find it. Please help. Image

https://developer.apple.com/documentation/watchkit/storyboard_support/adding_a_now_playing_view

2

Answers


  1. Just put

    NowPlayingView() where you want it.

    Oh and make sure you import WatchKit.

    Apple talks about it at about minute 15:40 in Build a workout App for Apple Watch

    Login or Signup to reply.
  2. @Antoni277 I believe you also have to provide meta data about what your App is playing for it to show in any Now Playing screen. For instance your code will have to provide a instance of MPNowPlayingInfoCenter.

    Have a look at the documentation at Becoming a Now Playable App

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search