当前位置: 动力学知识库 > 问答 > 编程问答 >

How can I stop the iOS Media Player framework logging on each query?

问题描述:

I'm using the iOS MediaPlayer.framework to retrieve data about the user's iTunes library. I do this using the following code:

MPMediaQuery * allSongsQuery = [MPMediaQuery songsQuery];

NSArray * songsData = [allSongsQuery items];

//Iterate over songsData and fetch values for various keys, including title/album/artist

None of my code makes any calls to NSLog, however I'm seeing that the Media Player framework is logging a lot during this query:

{MediaLibrary} Database validation succeeded

{MediaLibrary} Rolling back transaction.

{MediaLibrary} Rolling back transaction.

{MediaLibrary} Rolling back transaction.

{MediaLibrary} Rolling back transaction.

{MediaLibrary} Rolling back transaction.

... (continues on another 200 times)

Whilst this doesn't really affect the execution of my application, it is incredibly annoying when debugging. Is there any way of stopping the Media Player framework from logging?

分享给朋友:
您可能感兴趣的文章:
随机阅读: