Debugging UI updates on the main thread, iPhone, Activity Indicator not spinning
<p>so I know you are supposed to do your updates on the main thread.  I am using Apple's code for writing our database do the documents directory:</p>

<pre><code>// Creates a writable copy of the bundled default database in the application Documents directory.
- (void)createEditableCopyOfDatabaseIfNeeded {
    // First, test for existence.
    BOOL success;
    NSFileManager *fileManager = [NSFileManager defaultManager];
    NSError *error;
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"bookdb.sql"];
    success = [fileManager fileExistsAtPath:writableDBPath];
    if (success)
        return;
    // The writable database does not exist, so copy the default to the appropriate location.
    NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"bookdb.sql"];
    success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&amp;error];
    if (!success) {
        NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
    }
}
</code></pre>

<p>I do</p>

<pre><code>[activityIndicator startAnimating];
[self createEditableCopyOfDatabaseIfNeeded];
</code></pre>

<p>I do not see my activity indicator.  If I comment out <code>[self createEditableCopyOfDatabaseIfNeeded];</code>, I do see my activity indicator.  Is there a way to debug this to see what is happening and why I don't see my spinning indicator?  Thanks.</p>
