iosobjective-cobjective-c-blocks

internal compiler error using iOS block format


I am trying to get use to this format. However I keep getting odd issues like this...

 [accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) {
        if(granted) {
            mAccounts  = [[accountStore accountsWithAccountType:accountType] retain];

            if(acctId != nil) {
                mActiveAccount = [[accountStore accountWithIdentifier:acctId] retain];
            }
        }
    }];

When I compile I get an error on the last line of the block...

internal compiler error: in convert_all_function_calls, at tree-nested.c:1976

Solution

  • My compiler settings were confused. I had it set to default which changed per computer. It needs to be set to 'Apple LLVM 3.0'