I'm using iCloud Music Library. I’m using macOS 14.1 (23B74) and iOS 17.1.
i’m using MusicKit to find songs that do not have artwork. On iOS, Song.artwork will be nil for items I know do not have artwork. On macOS, Song.artwork is not nil. However when the songs are shown in Music.app, they do not have Artwork. Is this expected? Alternately, is there a more correct way to determine that a Song has no Artwork?
I have also filed FB13315721.
Thank you for any tips!
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello,
I have a SwiftUI application that uses NavigationSplitView. It's working great on iOS, iPad, and macOS. I decided to give it a try on tvOS. After it builds, it will not allow user interaction on the NavigationSplitView's sidebar. I've tried various view focus modifiers without any success. I'd also expect this to "just work" as default behavior. I have filed FB13447961 on this issue. Here is a distillation of the code that demonstrates the problem. Any ideas? Thank you.
enum Category : String, CaseIterable {
case first
case second
case third
}
enum Detail : String, CaseIterable {
case one
case two
case three
}
struct DetailView : View {
let category : Category?
var body: some View {
if let category {
Text(category.rawValue)
List(Detail.allCases, id: \.self) { detail in
NavigationLink(value: detail) {
Text(detail.rawValue)
}
}
} else {
Text("Select Category")
}
}
}
struct ContentView: View {
// NOTE: If this category is set to something, it will show that category's detail.
// The problem is that the NavigationSplitView sidebar does not have, nor does not
// seem to be able to get focus.
@State var category: Category?
@State var path : [Detail] = []
var body: some View {
NavigationSplitView {
List(Category.allCases, id: \.self, selection: $category) { category in
Text(category.rawValue)
}
} detail: {
NavigationStack(path: $path) {
DetailView(category: category)
.navigationDestination(for: Detail.self) { detail in
Text("\(detail.rawValue)")
}
}
}
}
}
#wwdc2023-10162 #wwdc20-10042
I have an app that gets data from Music.app with both the iTunesLibrary and MusicKit.
iTunesLibrary has ITLibArtist.sortName and ITLibAlbum.sortTitle and ITLibAlbum.sortAlbumArtist.
I can’t seem to find an equivalent in MusicKit. How are those properties obtained using MusicKit? Thanks.
FYI I have filed FB15554956 on this. You also may see my code at https://github.com/bolsinga/itunes_json
Hello, CLServiceSession is not on macOS.
Does anyone have a drop-in CLServiceSession like replacement for macOS that wraps CLLocationManager? I would like to migrate to the latest for the other platforms.
FWIW I filed FB17910626
Thanks!
Hello, I'm having trouble understanding Focus in SwiftUI on macOS for my application. I have distilled it down to a small reproducible case here.
struct ContentView: View {
struct Item : Identifiable, Equatable, Hashable {
let id : Int
let url : URL
@ViewBuilder var view : some View {
if id % 2 != 0 {
AsyncImage(url: url)
} else {
Image(systemName: "questionmark.diamond")
}
}
}
struct DetailView : View {
@Binding var item: Item?
var items : [Item] {
if let item {
return [item, item]
}
return []
}
var body: some View {
List(items) { item in
item.view
}
}
}
var url : URL {
return URL(string: "https://is1-ssl.mzstatic.com/image/thumb/Music/4c/aa/6f/mzi.cnwthgxu.jpg/900x900bb.jpg")!
}
var items : [Item] {
var a : [Item] = []
for i in 0..<10 {
a.append(Item(id: i, url: url))
}
return a
}
@State private var selectedItem : Item?
var body: some View {
NavigationSplitView {
List(items, selection:$selectedItem) { item in
NavigationLink(value: item) {
Text("\(item.id)")
}
}
} detail: {
DetailView(item: $selectedItem)
}
}
}
If you click on an even row, the behavior is as expected. The side List highlights. Press the Tab key. Nothing highlights, but I assume focus is in the DetailView. Press the Tab key a second time. It will now highlight the focus on the side bar show/hide button in the toolbar. Press the Tab key again, and it will go back to the side view list’s selection.
If you click on an odd row, the behavior is not as expected. The side List highlights. Press the Tab key. Nothing highlights, but I still assume focus is in the DetailView. Press the Tab key a second time. This time, instead of focusing the sidebar show/hide button, nothing highlights again. I still assume focus is in the DetailView, but it is not clear what. Now press the Tab key again, and the highlight focuses on the sidebar show/hide button.
I’m confused why two Images (one from Image(systemName:) and the other from an URL via AsyncImage) have different Tab key behavior. Why does AsyncImage seem to capture the two images, while the SF Symbols Images do not? Why does anything in the DetailView capture focus at all?
Thanks for any tips!
FB12044843
The new Map builder SwiftUI is awesome. Does it support cluster annotations? I have opened FB12244017. Thank you very much!
Hello,
On macOS I can use the defaults command line tool to reset or modify @AppStorage data outside the application.
Where is @SceneStorage data stored? Alternately, how do I reset my application back to "it's not yet stored"?
Thank you for any tips!
Hello,
When I use xcstrings in my app, and I have my scheme's localization debugging enabled (when it renders all caps for any non-localized text).
Prior to converting to xccstrings, my app shows non caps text for everything. After I convert to xcstrings, some of my app shows caps text for some items. I can see the keys in the xccstrings that I expect, so I do not think it is a bug in the conversion. Could it be a bug in the renderer somehow?
FB13261276
Thanks!
-- Greg
Hello,
I use CLGeocoder to get the CLLocationCoordinate2D and CLRegion for an address. Now that this is deprecated in OS 26, I don't see a replacement for that property on MKMapItem via MKMapItemRequest and PlaceDescriptor. I've filed FB19027378 on this issue.
Basically I have some addresses that have a street address, and others that just have a city. With CLGeocoder, when geocoding just the city, the CLRegion was set such that I could show my map zoomed out just right. I'm not sure how to do that now.
Thanks!
I would like to have an AppEntity with a Property that is a Date, which is only the date, not the time. ie the equivalent of 09/14/2025, not 09/14/2025 09:00 UTC
How would I model this? How would I create an EntityPropertyQuery for this? If I add QueryProperties they have the UI in Shortcuts pick a time too.
Thanks!