10

I am using a NSPersistentCloudKitContainer for the database in my iOS app. By default it seems to log all events to the console, I am assuming for debugging purposes. These messages look like this:

CoreData: CloudKit: CoreData+CloudKit: -[PFCloudKitExportContext processAnalyzedHistoryInStore:inManagedObjectContext:error:]_block_invoke_4(201): Finished processing analyzed history with 1 metadata objects to create, 0 deleted rows without metadata.
CoreData: CloudKit: CoreData+CloudKit: -[PFCloudKitExporter exportIfNecessary]_block_invoke_2(137): <PFCloudKitExporter: 0x282a785f0>: Found 2 objects needing export.
CoreData: warning: CoreData+CloudKit: -[PFCloudKitExporter exportOperationFinished:withSavedRecords:deletedRecordIDs:operationError:](384): Modify records finished: (
    etc...

They are constant and are getting in the way of other debug messages, is there any way to disable them?

4

1 回答 1

29

我使用这两个参数来减少输出(启动时传递的参数):

禁用 CoreData 调试输出:

-com.apple.CoreData.Logging.stderr 0

禁用 CloudKit 调试输出

-com.apple.CoreData.CloudKitDebug 0

在此处输入图像描述

产品 > 方案 > 编辑方案

于 2019-12-01T12:48:56.257 回答