fmdb icon indicating copy to clipboard operation
fmdb copied to clipboard

Incompatible block pointer types sending 'void *(^)(FMDatabase *__strong)' in FMDatabaseQueue

Open Stophface opened this issue 6 years ago • 1 comments

I am trying to use FMDatabaseQueue. When I implement it like described in the documentation

FMDatabaseQueue *queue = [FMDatabaseQueue databaseQueueWithPath:aPath];

Then use it like so:

[queue inDatabase:^(FMDatabase *db) {
    [db executeUpdate:@"INSERT INTO myTable VALUES (?)", @1];
    [db executeUpdate:@"INSERT INTO myTable VALUES (?)", @2];
    [db executeUpdate:@"INSERT INTO myTable VALUES (?)", @3];

    FMResultSet *rs = [db executeQuery:@"select * from foo"];
    while ([rs next]) {
        …
    }
}];

I get this error:

Incompatible block pointer types sending 'void *(^)(FMDatabase *__strong)' to parameter of type 'void (^ _Nonnull)(FMDatabase * _Nonnull __strong)'

XCode 9.2

Stophface avatar Mar 30 '18 09:03 Stophface

Did you resolve the issue

nethraUCS avatar Nov 04 '19 08:11 nethraUCS