Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (20.3k points)

I'm working on a universal iOS app and I'd like to see the raw SQL in the logs when I'm debugging. There is some info in this blog post about how to enable raw SQL logging for iOS Core Data development. The given example is for Xcode 3 and it's just not clear to me how to enable this in Xcode 4.

I've tried "Product" -> "Edit Scheme" and added "-com.apple.CoreData.SQLDebug 1" to "Arguments Passed on Launch", but I'm still not seeing any output in the logs. Not sure if I'm looking in the wrong place or just passing the arguments incorrectly.

1 Answer

0 votes
by (40.7k points)

You must look at the same place where you'll get the NSLOGS

Follow these steps:

1. Go to Product 

2. Select Edit Scheme

3. Now, Select Run YOURAPP.app from the left panel and go to the main panel's Arguments Tab. Here, you can add an Argument Passed On Launch.

4. Add -com.apple.CoreData.SQLDebug 1 and enter OK.

Note: Here, the key is used to edit the scheme you can use it for testing.

Related questions

0 votes
1 answer
asked Jul 19, 2019 in DevOps and Agile by chandra (29.3k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...