Post

Replies

Boosts

Views

Activity

MusicCatalogSearchRequest without AppleID/Account on iPhone
Hi, I'm currently working on a little music app PoC. I want to search the albums in the Apple Music Catalog which will done via a MusicCatalogSearchRequest: let musicAuthorizationStatus = await MusicAuthorization.request() print(musicAuthorizationStatus) // Issue a catalog search request for albums matching search term. var searchRequest = MusicCatalogSearchRequest(term: searchTerm, types: [Album.self]) searchRequest.limit = 5 let searchResponse = try? await searchRequest.response() print(searchResponse?.albums) I would expect to get a valid search response but it is nil instead. This is the console log when no AppleID is configured on my test device: 2021-06-15 23:07:19.083194+0200 ShareFi[1519:727518] [Entitlements] MSVEntitlementUtilities - Process ShareFi PID[1519] - Group: com.apple.private.tcc.allow - Entitlement: kTCCServiceMediaLibrary - Entitled: NO - Error: (null) .authorized 2021-06-15 23:07:19.130446+0200 ShareFi[1519:727542] [DataRequesting] Failed retrieving MusicKit tokens: Error Domain=ICErrorDomain Code=-8102 "Failed to fetch user token." UserInfo={NSDebugDescription=Failed to fetch user token., NSUnderlyingError=0x2825d8750 {Error Domain=ICErrorDomain Code=-7401 "No active account." UserInfo={NSDebugDescription=No active account.}}}. Throwing .userTokenRequestFailed. 2021-06-15 23:07:19.131133+0200 ShareFi[1519:727542] [DataRequesting] Failed retrieving tokens for MusicDataRequest.Context(url: https://api.music.apple.com/v1/catalog/us/search?term=Earfood&types=albums&omit%5Bresource%5D=autos&limit=5). Error = .userTokenRequestFailed. When I use a sandbox account the error is still a .userTokenRequestFailed but the message says something like: Privacy terms must be accepted first. The Apple Music API seems to require a "Developer Token" but no "User Token" for search requests?! So my questions are: Is it possible to make MusicCatalogSearchRequests without having an AppleID configured? What resources can a user without a active Apple Music subscription interact with? Best regards :) Julian
3
0
1.9k
Jun ’21
SwiftUI App crashes in main method on Startup (macOS 11)
Hi, my app sees quite a lot of crashes (crash report below) and I have no clue how to debug the problem any further. The problems seems only to occur on macOS 11. Is there anyone als having this kind of problems? Are there fixes/workarounds? The source code of my app is open source - https://github.com/PDF-Archiver/PDF-Archiver if anyone would like to have a look into it. OS Version: macOS 11.2.2 (20D80) Report Version: 104 Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: ILL_NOOP at 0x00007fff2ca430f4 Crashed Thread: 0 Application Specific Information: Fatal error SwiftUI Thread 0 Crashed: 0 libswiftCore.dylib 0xfffe591310f4 _assertionFailure 1 SwiftUI 0xfffe8516c6fc ViewCache.commitPlacedChildren 2 SwiftUI 0xfffe850727f4 IncrementalChildPlacements.updateValue 3 SwiftUI 0xfffe8512890e Attribute.initT 4 AttributeGraph 0xfffe8625b17e AG::Graph::UpdateStack::update 5 AttributeGraph 0xfffe8625b607 AG::Graph::update_attribute 6 AttributeGraph 0xfffe862638f2 AG::Subgraph::update 7 SwiftUI 0xfffe85463679 GraphHost.runTransaction 8 SwiftUI 0xfffe85464bce GraphHost.runTransaction 9 SwiftUI 0xfffe85463ec8 GraphHost.flushTransactions 10 SwiftUI 0xfffe85464b6e GraphHost.asyncTransactionT 11 SwiftUI 0xfffe85464738 @callee_guaranteed 12 SwiftUI 0xfffe84d172b0 ViewGraphDelegate.updateGraphT 13 SwiftUI 0xfffe853201b9 ViewRendererHost.updateViewGraphT 14 SwiftUI 0xfffe8531e2a8 ViewRendererHost.updateViewGraphT 15 SwiftUI 0xfffe85329e98 NSHostingViewT 16 SwiftUI 0xfffe84d12f06 ViewGraphDelegate.updateGraphT 17 SwiftUI 0xfffe84d17258 NSHostingViewT 18 SwiftUI 0xfffe85464b49 GraphHost.init 19 SwiftUI 0xfffe84d18c9b @callee_guaranteed 20 SwiftUI 0xfffe8537a250 @callee_guaranteed 21 SwiftUI 0xfffe85377ee5 NSRunLoop.flushObservers 22 SwiftUI 0xfffe8537a198 NSRunLoop.addObserver 23 SwiftUI 0xfffe853755fd @callee_guaranteed 24 libswiftObjectiveC.dylib 0xfffe66ed2d9d autoreleasepoolT 25 SwiftUI 0xfffe8537a182 NSRunLoop.addObserver 26 SwiftUI 0xfffe8537a1ca NSRunLoop.addObserver 27 CoreFoundation 0xfffe40ab4dac __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ 28 CoreFoundation 0xfffe40ab4c3c __CFRunLoopDoObservers 29 CoreFoundation 0xfffe40ab3745 CFRunLoopRunSpecific 30 HIToolbox 0xfffe5101162f RunCurrentEventLoopInMode 31 HIToolbox 0xfffe5101142b ReceiveNextEventCommon 32 HIToolbox 0xfffe5101114e _BlockUntilNextEventMatchingListInModeWithFilter 33 AppKit 0xfffe45b349b0 _DPSNextEvent 34 AppKit 0xfffe45b33176 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 35 AppKit 0xfffe45b25689 -[NSApplication run] 36 AppKit 0xfffe45af996e NSApplicationMain 37 SwiftUI 0xfffe84ab59f3 runApp 38 SwiftUI 0xfffe8534c791 runAppT 39 SwiftUI 0xfffe84ecb09c App.main 40 PDFArchiver 0x2067699b0 [inlined] PDFArchiverApp.$main 41 PDFArchiver 0x2067699b0 main 42 libdyld.dylib 0xfffe40967620 start Crash Report - https://developer.apple.com/forums/content/attachment/8bc85490-ee29-4233-91e2-63ff3cd0d3b8
3
0
4k
Feb ’21