I am developing an app running on iOS/iPadOS and on macOS using MacCatalyst. It uses ApplicationMusicPlayer.shared to play music from Apple Music. However, on the Mac songs with contentRating == .explicit do not work.
I will get the following error (sorry, German localization):
Failed to prepareToPlay error=<MPMusicPlayerControllerErrorDomain.6 "Failed to prepare to play" {}>
Error playing item: Der Vorgang konnte nicht abgeschlossen werden. (MPMusicPlayerControllerErrorDomain-Fehler 6.)
On iOS/iPadOS these songs play correctly. What can I do to also play explicit songs using MacCatalyst?
Thanks,
Dirk
Post
Replies
Boosts
Views
Activity
Hi.
I know that playing videos from Apple Music was not possible with iOS 17. There is only the workaround to open the Music app.
My question is whether anybody found a solution for iOS 18 (Beta).
Thanks,
Dirk
Hi.
I saw that in iOS 18 Beta there is a property "transition" on the Music Kit's ApplicationMusicPlayer. However, in my app I am using MPMusicPlayerApplicationController because I want to play Apple Music songs, local songs and podcasts. But I didn't find an analogue property on MPMusicPlayerApplicationController to specify transitions between songs. Am I missing something?
Thanks,
Dirk
Hi.
In iOS 17 Apple introduced crossfading for the Music app. In my app I am using MPMusicPlayerController.applicationQueuePlayer and also want to support crossfading. In an early beta of iOS 17 my app crossfaded automatically with the same setting as for the Music app which maybe was a bug. However, I did not find any way to enable crossfade for my app.
Does anybody know how to do that?
Thanks,
Dirk
I have my app including iCloud support in the App Store for many years now. When I run the app on iOS 17 Beta 2 I am experiencing a very bad performance because the main thread seems to be blocked most of the time.
When I run the app using the Time Profiler in Instruments it also reports the hangs and the busy main thread.
I looked into the profiler window to see methods with long runtime. The most prominent method was:
[BRQuery itemCollectionGathererDidReceiveUpdates:deleteItemsWithIDs:] coming from "CloudDocs". That seems to be some iOS internal class.
I do not really know where to look next and I want to know whether somebody of you also experienced a similar problem?
Thanks,
Dirk
Hi.My users report crashes of my app but in "iOS Settings > Privacy > Diagnostics & Usage > Analytics Data" they don't find regular crash reports. But one user send a report with the name "mytracks4ios.wakeups_resource-2018-10-12-104731.ips".Here is the content:{"app_name":"mytracks4ios","timestamp":"2018-10-12 10:47:31.95 +0200","app_version":"5.1.2","slice_uuid":"91105FB1-2963-34CF-960E-4D1339679EDB","adam_id":358697908,"build_version":"199","bundleID":"info.stichling.mytracks4iphoneos","share_with_app_devs":false,"is_first_party":false,"bug_type":"142","os_version":"iPhone OS 12.0 (16A366)","incident_id":"6C1DE657-EBEF-4658-A2C3-D2AEAF6FCA05","name":"mytracks4ios"}
Date/Time: 2018-10-12 10:47:19 +0200
End time: 2018-10-12 10:47:30 +0200
OS Version: iPhone OS 12.0 (Build 16A366)
Architecture: arm64
Report Version: 27
Incident Identifier: 6C1DE657-EBEF-4658-A2C3-D2AEAF6FCA05
Data Source: Microstackshots
Shared Cache: 0xab18000 71D8E433-B619-3FC6-9F11-608BF2311FB8
Command: mytracks4ios
Path: /private/var/containers/Bundle/Application/8B39C1F4-1E11-4E0B-8798-FD487F319414/mytracks4ios.app/mytracks4ios
Identifier: info.stichling.mytracks4iphoneos
Version: 5.1.2 (199)
Beta Identifier: 42E181B6-4089-4469-AD69-BD9F7EF05495
PID: 2950
Event: wakeups
Action taken: none
Wakeups: 45001 wakeups over the last 255 seconds (177 wakeups per second average), exceeding limit of 150 wakeups per second over 300 seconds
Wakeups limit: 45000
Limit duration: 300s
Wakeups caused: 45001
Duration: 11.04s
Steps: 12
Hardware model: iPhone7,2
Active cpus: 2
Boot args:
Heaviest stack for the target process:
12 ??? (libsystem_pthread.dylib + 45660) [0x18b60925c]
12 ??? (libsystem_pthread.dylib + 45820) [0x18b6092fc]
6 ??? (<E0DA27EE-A1D9-3DEF-8832-9785C7F48CD8> + 2495912) [0x100db95a8]
5 ??? (libsystem_kernel.dylib + 143116) [0x18b584f0c]
Powerstats for: mytracks4ios [2950]
UUID: 91105FB1-2963-34CF-960E-4D1339679EDB
Path: /private/var/containers/Bundle/Application/8B39C1F4-1E11-4E0B-8798-FD487F319414/mytracks4ios.app/mytracks4ios
Architecture: arm64
Parent: UNKNOWN [1]
UID: 501
Footprint: 753.27 MB
Start time: 2018-10-12 10:47:19 +0200
End time: 2018-10-12 10:47:30 +0200
Num samples: 12 (100%)
CPU Time: 0.028s
Primary state: 7 samples Frontmost App, Non-Suppressed, Kernel mode, Effective Thread QoS Default, Requested Thread QoS Default, Override Thread QoS Unspecified
User Activity: 0 samples Idle, 0 samples Active, 12 samples Unknown
Power Source: 0 samples on Battery, 0 samples on AC, 12 samples Unknown
12 ??? (libsystem_pthread.dylib + 45660) [0x18b60925c]
12 ??? (libsystem_pthread.dylib + 45820) [0x18b6092fc]
6 ??? (<E0DA27EE-A1D9-3DEF-8832-9785C7F48CD8> + 2495912) [0x100db95a8]
5 ??? (libsystem_kernel.dylib + 143116) [0x18b584f0c]
1 ??? (libsystem_kernel.dylib + 143120) [0x18b584f10]
1 <User mode>
3 ??? (<E0DA27EE-A1D9-3DEF-8832-9785C7F48CD8> + 2145488) [0x100d63cd0]
3 ??? (libsystem_c.dylib + 480420) [0x18b4fa4a4]
3 ??? (libsystem_kernel.dylib + 144424) [0x18b585428]
1 <User mode>
1 ??? (libsystem_pthread.dylib + 15592) [0x18b601ce8]
1 <User mode>
1 ??? (<E0DA27EE-A1D9-3DEF-8832-9785C7F48CD8> + 2496112) [0x100db9670]
1 ??? (libsystem_kernel.dylib + 143116) [0x18b584f0c]
1 <User mode>
1 ??? (<E0DA27EE-A1D9-3DEF-8832-9785C7F48CD8> + 2016916) [0x100d44694]
1 ??? (<E0DA27EE-A1D9-3DEF-8832-9785C7F48CD8> + 1976508) [0x100d3a8bc]
1 ??? (<E0DA27EE-A1D9-3DEF-8832-9785C7F48CD8> + 1193636) [0x100c7b6a4]
1 ??? (libsystem_c.dylib + 336512) [0x18b4d7280]
1 ??? (libsystem_c.dylib + 338508) [0x18b4d7a4c]
1 ??? (libsystem_c.dylib + 272956) [0x18b4c7a3c]
1 ??? (libsystem_c.dylib + 318432) [0x18b4d2be0]
1 ??? (libsystem_c.dylib + 424448) [0x18b4eca00]
1 ??? (libsystem_c.dylib + 282688) [0x18b4ca040]
1 <User mode>
Binary Images:
0x100600000 - ??? mytracks4ios <91105FB1-2963-34CF-960E-4D1339679EDB> /private/var/containers/Bundle/Application/8B39C1F4-1E11-4E0B-8798-FD487F319414/mytracks4ios.app/mytracks4ios
0x100b58000 - ??? ??? <E0DA27EE-A1D9-3DEF-8832-9785C7F48CD8>
0x18b485000 - 0x18b503fff libsystem_c.dylib <40DD5C3B-586A-38EB-9F52-74D994ECD9D2> /usr/lib/system/libsystem_c.dylib
0x18b562000 - 0x18b58cfff libsystem_kernel.dylib <982CCBAD-717D-3A28-946E-BA07918897A3> /usr/lib/system/libsystem_kernel.dylib
0x18b5fe000 - 0x18b60efff libsystem_pthread.dylib <D2815AB1-46C1-3831-82FC-D22AE83B0CAD> /usr/lib/system/libsystem_pthread.dylibNow I would like to know whether this may be the reason for the crash or whether this report or more like a warning but not really the reason for the crash.Thanks,Dirk
I want to implement drag&drop of an entry in an NSTableView to a folder in Finder.
Here is my code of the controller:
override func viewDidLoad() {
	super.viewDidLoad()
self.tableView.setDraggingSourceOperationMask(.copy, forLocal: false)
}
func tableView(_ tableView: NSTableView, pasteboardWriterForRow row: Int) -> NSPasteboardWriting? {
return NSFilePromiseProvider(fileType: kUTTypeJPEG as String, delegate: self)
}
func filePromiseProvider(_ filePromiseProvider: NSFilePromiseProvider, fileNameForType fileType: String) -> String {
return "test.jpg"
}
func filePromiseProvider(_ filePromiseProvider: NSFilePromiseProvider, writePromiseTo url: URL, completionHandler: @escaping (Error?) -> Void) {
print("never called")
}
The method filePromiseProvider(_ filePromiseProvider: NSFilePromiseProvider, fileNameForType fileType: String) is called.
But filePromiseProvider(_ filePromiseProvider: NSFilePromiseProvider, writePromiseTo url: URL, completionHandler: @escaping (Error?) -> Void) is never called.
I am using Xcode 12.2 beta 3 (12B5035g).
Do you have similar problems with drag&drop?
Thanks,
Dirk