AVAsset download UIKitForMac

Hi,


I'm converting my iOS app to MacOS app thanks to UIKitForMac. I use AVAssetDownloadTask class to download my assets.


Content I try to download is encypted with Fairplay and I configure resourceLoader of asset to preload content keys :


asset.resourceLoader.preloadsEligibleContentKeys = true


On iOS, all works like a charm : content keys are loading during assets downloading but on MacOS, I'm encountering several problems :


- Despite that I put "preloadsEligibleContentKeys, any content keys are loaded during download (only on playback beginning).

shouldWaitForLoadingOfRequestedResource

is not called during downloading on macos.


- 'persistentContentKey(fromKeyVendorResponse: '')' works on iOS but it returns nil on MacOS with decoded CKC data seems to be OK in parameter...

loadingRequest.contentInformationRequest!.contentType = AVStreamingKeyDeliveryPersistentContentKeyType



If someone could have a solution, I don't know if it's a MacOS Catalina bugs or if I should add a specific parameter for MacOS.


I work on MacOS Catalina 10.15 (19A512f) and Xcode 11.0 Beta 4.




Edit:


During persistentContentKey(fromKeyVendorResponse:...) call, I get this log :

objc[65267]: Class asn1ReceiptToken is implemented in both /System/Library/PrivateFrameworks/StoreServices.framework/Versions/A/StoreServices (0x7fff9ea24d40) and /System/Library/PrivateFrameworks/CoreFP.framework/CoreFP (0x11d5a9288). One of the two will be used. Which one is undefined.

objc[65267]: Class ISPurchaseReceipt is implemented in both /System/Library/PrivateFrameworks/StoreServices.framework/Versions/A/StoreServices (0x7fff9ea22a90) and /System/Library/PrivateFrameworks/CoreFP.framework/CoreFP (0x11d5a92d8). One of the two will be used. Which one is undefined.

objc[65267]: Class asn1Token is implemented in both /System/Library/PrivateFrameworks/StoreServices.framework/Versions/A/StoreServices (0x7fff9ea22680) and /System/Library/PrivateFrameworks/CoreFP.framework/CoreFP (0x11d5a9328). One of the two will be used. Which one is undefined.

objc[65267]: Class asn1SetToken is implemented in both /System/Library/PrivateFrameworks/StoreServices.framework/Versions/A/StoreServices (0x7fff9ea226a8) and /System/Library/PrivateFrameworks/CoreFP.framework/CoreFP (0x11d5a9350). One of the two will be used. Which one is undefined.

objc[65267]: Class asn1SequenceToken is implemented in both /System/Library/PrivateFrameworks/StoreServices.framework/Versions/A/StoreServices (0x7fff9ea226d0) and /System/Library/PrivateFrameworks/CoreFP.framework/CoreFP (0x11d5a9378). One of the two will be used. Which one is undefined.

objc[65267]: Class asn1IntegerToken is implemented in both /System/Library/PrivateFrameworks/StoreServices.framework/Versions/A/StoreServices (0x7fff9ea226f8) and /System/Library/PrivateFrameworks/CoreFP.framework/CoreFP (0x11d5a93a0). One of the two will be used. Which one is undefined.

objc[65267]: Class asn1OSToken is implemented in both /System/Library/PrivateFrameworks/StoreServices.framework/Versions/A/StoreServices (0x7fff9ea22720) and /System/Library/PrivateFrameworks/CoreFP.framework/CoreFP (0x11d5a93c8). One of the two will be used. Which one is undefined.