Search
Rich's Mad Rants
Powered by Squarespace
« Partial Solution for iCloud & Core Data Ubiquitous Update bug | Main | Fun with Blocks »
Wednesday
Mar282012

Debug settings for Core Data and iCloud

I'm still trying to get Core Data and iCloud to work better together. Things seem more stable under iOS 5.1, but I'm still having an issue with a device occasionally receiving update notifications, but the new data doesn't appear to be available yet. However, when I shutdown and relaunch the application, it's then in the correct state (so, that's at least something).

I found an interesting tool for generating tons of debug information while working with iCloud and Core Data (thanks to @drewmccormack and @dlpasco on twitter). Just set the -com.apple.coredata.ubiquity.logLevel 3 launch argument.

In Xcode 4, click on the scheme and select Edit Scheme… in the drop down menu.

 

Editscheme

 

Now, select the Run action, and the Arguments tab. Then add "-com.apple.coredata.ubiquity.logLevel 3" as an argument.

 

AddRunArguments

 

Next time you run the app, it will generate a ton of data. Too much data, actually. I'm still trying to work through it in my own debugging. A lot of it doesn't make sense yet, but there are some interesting bits there. Like the following breakdown of all the files in my ubiquity container:

 

2012-03-28 16:40:29.428 MultiDocument[6616:3317] -[PFUbiquityImportScanOperation main](144): CoreData: Ubiquity:  <PFUbiquityImportScanOperation: 0x2715c0> got subpaths of root location: (

".baseline",

".baseline/TestDocument1",

".baseline/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

".baseline/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/baseline.zip",

".baseline/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/staging.nosync",

".baseline/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/staging.nosync/persistentStore",

".baseline/TestDocument2",

".baseline/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

".baseline/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/baseline.zip",

".baseline/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/staging.nosync",

".baseline/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/staging.nosync/persistentStore",

".baseline/current.nosync",

".baseline/current.nosync/TestDocument1",

".baseline/current.nosync/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

".baseline/current.nosync/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/baseline.gcmodel",

".baseline/current.nosync/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/baseline.meta",

".baseline/current.nosync/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/baseline.model",

".baseline/current.nosync/TestDocument2",

".baseline/current.nosync/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

".baseline/current.nosync/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/baseline.gcmodel",

".baseline/current.nosync/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/baseline.meta",

".baseline/current.nosync/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/baseline.model",

".cdmetadata",

".cdmetadata/metadata.nosync",

".cdmetadata/metadata.nosync/mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524",

".cdmetadata/metadata.nosync/mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1",

".cdmetadata/metadata.nosync/mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/4450B5BF-99DD-4134-898C-976F968ED329.cid",

".cdmetadata/metadata.nosync/mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument2",

".cdmetadata/metadata.nosync/mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument2/F2601224-6FC8-421B-83DD-30A6D91ECC6A.cid",

".cdmetadata/metadata.nosync/mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/metadata.store",

".cdmetadata/metadata.nosync/mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/metadata.store-shm",

".cdmetadata/metadata.nosync/mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/metadata.store-wal",

TestDocument1,

"TestDocument1/DocumentMetadata.plist",

"TestDocument1/StoreContent.nosync",

"TestDocument1/StoreContent.nosync/persistentStore",

TestDocument2,

"TestDocument2/DocumentMetadata.plist",

"TestDocument2/StoreContent.nosync",

"TestDocument2/StoreContent.nosync/persistentStore",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/001504B6-2D01-47DD-AE73-B803C8035260.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/20BFF411-6568-44B2-9DCB-168042D5CE1F.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/31C82DB6-BDF1-4E5B-903A-BCECFD9B4A1C.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/33D9CDFE-EBE7-4680-AC3F-920D4B9E1187.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/36E0F1D7-133B-4BB8-9F98-2A15C41F9559.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/38D95E15-E2A7-4415-9075-E3CE20761466.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/38DC2357-91AE-438D-BF14-31F64A737967.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/396FF0A4-23AD-4166-956B-6F28ABDF4CBA.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/6B0D9BF8-38ED-434F-A973-759E646E82CE.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/9965D68D-DE76-47C0-B005-9F17C649B962.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/9CE07122-E648-4223-BB9D-E5BDEBE8D5F3.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/9D53C5E4-049F-4750-8BB4-1005C6A2027F.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/A0048882-80D0-4125-A99B-295875B972F6.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/EA29AFD2-D3F5-41B4-B2A6-6174B24F9056.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/F1C0821B-F1C8-4F7D-BBE1-FDBD24A8EB8F.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/receipt.0.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument2",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/1A9E7FEF-EEDF-4CB8-BEAD-36E796EC60BA.1.cdt",

"mobile.3C7B62BB-61A2-57FF-8F35-78674A43F99A/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/receipt.0.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/.stage.nosync",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/.stage.nosync/TestDocument1",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/.stage.nosync/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/.stage.nosync/TestDocument2",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/.stage.nosync/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/008EDD62-DF18-4D05-A477-8D0BE6FBF521.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/0424A34D-6BEB-44BA-A87E-C9147FC04B3A.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/1605DC16-584B-425A-912A-6B28F83D8A4A.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/2C24C947-DA7F-4D74-A64A-6BA40EC4ECEF.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/381FFDB3-6EE5-48E1-BADF-9A66795F3D8B.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/54BD050D-D546-4BDE-A0C1-A69382841AFD.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/5E02B10A-300C-4870-8151-EAA9A3E843BD.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/73440C3D-D4A9-42AC-949A-4DF1B2C0503B.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/7888473C-3BC0-4165-9FE3-4995E6B43172.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/889C46AC-0780-41B4-859C-DD1D215CC400.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/A973A450-0AAE-48F9-8E8D-BC56E9341F81.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/B7036990-D33E-4F1B-9045-D7548BF282E2.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/C25E3570-B1FB-447A-BEC3-A6778C7CEE74.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/C6351ECD-D1D3-48BC-A17B-7FE480E14CE9.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/D69C37C3-43AE-4F4C-90B6-55FC6BDC805E.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/E259DC9D-FD8D-4CD7-8603-BECD99AEBE03.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/receipt.0.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument2",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/F0F13DE8-7CCA-4E29-BE27-0E04AAA11F23.1.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/TestDocument2/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A=/receipt.0.cdt",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/tempLogs.nosync",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/tempLogs.nosync/TestDocument1",

"mobile.D07EBC6E-03EA-5295-8D2F-0C1D2E737524/tempLogs.nosync/TestDocument1/WdKZGuhOiADrlyspq5GroEkGHfNbxImTR1BYSTCku1A="

)


And that just scratches the surface. So far, I haven't found anything that helps with my race condition problem. However, let me know if you use this setting, and if you find any useful signals inside all the noise.

-Rich-

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>