Post

Replies

Boosts

Views

Activity

Why Apple Music API is so lame?
There is no endpoint to delete song from playlist. I wanted to track what I am playing during a month and do some statistics. Problem is Recently Played tracks returns only last 30 items WITHOUT UNIXTIME of being accessed. If I stop listening to music for few days it still returns me these song as recently played! It's hard to believe that developers at Cupertino can be so dumb, no wonder why each OS update breaks things :(
0
0
698
Dec ’21
Could Apple create properly working Recently Played Endpoint?
I already submitted bug by Feedback Assistant. Hopefully, Apple engineers will read this. What is wrong?: Lack of date and time of song's access. Without this it's impossible to scrobble. When I play song using MusicKitJS v1 they are not reflected in history at all. If I play the same song several times in loop endpoint suggests song was played only once. Also there is a mess in documentation. Official page of MusicKit redirects to JS version 3 while Apple Developer Documentation lists MusicKit v1, I assume there was no version 2 and 3 is in beta? Since there is some progress e.g ability to play radio stations in JSv3 it would be nice if main Apple Music API was also updated and finally gaves us ability to delete song from playlist.
0
1
790
Dec ’21
Xcode 13.4 New project "command line tool" cannot run because of missing entitlements
I set bundle identifier the same as AppID generated on developer account (that itself shouldn't be necessary but my theory is Apple removed possibility to test app on device for non-paying developers but that't another story). My project uses MusicKit, even if properly authorised with authorisation status equals .authorised app crashes and saying there are missing entitlements and permission denied. Problem is project does not contain any info.plist file and no .entitlements file anywhere. Xcode is set to automatically manage signing. This really makes me feel depressed today, I asked two friends developers nobody wanted to help :( and my mood makes searching for a job even harder and times are challenging. What am I missing here and why solution (if any) is not documented?
6
0
2.4k
Aug ’22
How to play Apple Music on MacOS as there is no player?
Seriously Apple? You release MusicKit for: OS 15.0+iPadOS 15.0+macOS 12.0+Mac Catalyst 15.0+tvOS 15.0+watchOS 8.0+ but in "Playback" section ApplicationMusicPlaye and SystemMusicPlayer is only for: iOS 15.0+iPadOS 15.0+Mac Catalyst 15.0+tvOS 15.0+ documentation does not provide workaround, MediaPlayer class that according to docs is part of MusicKit framework, on Mac is not and it cannot be found in scope. Is this a way to force us to use Catalyst? Or maybe I should use MusicKit JS embedded in WebView and faked as native app? This is so frustrating to spent many hours on a project to see it won't work :(
0
0
774
Aug ’22
Problems with Hex Unicode conversion in Swift
print(UInt16("0x2C",radix: 16)) print(UInt32("0x1F431",radix: 16)) I'm struggling with this for last 2 days and it's extremely annoying. I get fragment of the code from https://stackoverflow.com/questions/31284538/how-to-express-strings-in-swift-using-unicode-hexadecimal-values-utf-16 : let value0: UInt8 = 0x43   // 97 let value1: UInt16 = 0x203C  // 22823 let value2: UInt32 = 0x1F431 // 127822 However print(UInt8("43",radix: 16)) --> 67? print(UInt32("1F431",radix: 16)) --> 128050??? print(UInt16("203C",radix: 16)) ---> 8252??? Does author cannot count and offers misleading information or I am missing something here? But even worse: print(UInt16("2C",radix:16)) // gives 44 print(UInt16("0x2C", radix:16)) gives nil WTF print(UInt32("1F432",radix: 16)) -->8252 print(UInt32("0x1F432",radix: 16)) --> nil WTF print(UInt32("0x1F432")) --> also nil I mean what's the reason behind this? I read in Apple Swift book that putting "0x" in front of string automatically infers the hexadecimal why is not the case? Even even worse when working with UnicodeScalars if argument is nil then Xcode returns not informative message. I neeed this as I rewrite someone else code from Typescript and looks it's just not possible in Swift to do things as elegant and simple as: for (let i = str.length; i >= 1; i -= 2) { r = String.fromCharCode(parseInt("0x" + str.substring(i - 2, i))) + r; } no equivalent for parseInt() function and no .fromCharCode method. Shouldn't Int, UInt and their variants behave like parseInt()? why it's not possible to do: print("\u{\(unicodetakenfromvariable)}")
2
0
1.7k
Sep ’22
I rsync between two iCLoud location and lost the files.
I asked the same question on normal apple community, but I doubt people care. So I am asking here as it looks like more engineering question. Is this done by design? I did rsync -avzP --remove-source-files between two locations in iCloud drive in terminal. Lot of *.icloud files were copied, removed from source but they did not appear in destinations. So essentially I lost several video files. Being desperate I tried to do this with another set of videos that I can not regret deleting and the results are the same - directories were copied, files was lost, source directories was not removed. when I logged into iCloud drive on web browser and hit "recently deleted" there was zero files to recover. so what the hell? why rsync not copy properly important files? is it forbidden to ever touch *.icloud files?
1
0
1k
Sep ’22