0

Wanted to play around with MusicKit on MacOS now that we don't need to create JWT tokens manually anymore. But currently when I try to import MusicKit to a MacOS project, compiler is telling me

MusicKit is not available when building for macOS. Consider using #if !os(macOS) to conditionally import this framework.

From documentation page https://developer.apple.com/documentation/MusicKit/ I can see Availability listed as MacOS 12.0+ (Beta) MusicKit availability

I'm currently on macOS 12.0.1 myself, but still can't get it to build. I also tried bumping the deployment targets to 12.0 (although in the dropdown 11.3 was the latest) but doing this caused the compiler the yell at me again. I'm on Xcode 13.0

Am I missing something obvious?

jnpdx
  • 45,847
  • 6
  • 64
  • 94
Rene
  • 136
  • 1
  • 7
  • I'm on Mojave and checking Xcode - There was no MusicKit at the time? I am trying to do a command line client. I also check Macos 10.15 and there are also not a MusicKit. what the hell Apple? I am able to import MusicKit even on iOS 14 in PLaygrounds so what? – Sebastian Jun 20 '22 at 21:04

2 Answers2

3

Xcode 13.0 targets Big Sur (macOS 11).

You need (at least) Xcode 13.1 RC to develop apps for macOS Monterey (macOS 12).

You can download Xcode from the apple developer website

Alladinian
  • 34,483
  • 6
  • 89
  • 91
2

Also problem is apparently no MusicPlayer that is part of MusicKit framework is available on Macos. So even if you get data from API you cannot play them and documentation on that is silent.

Sebastian
  • 448
  • 4
  • 14