The error you're seeing indicates that your program calls dispatch_group_leave
too many times. It's trivial to reproduce. I reproduced it with this program:
int main(int argc, const char * argv[])
{
@autoreleasepool {
dispatch_group_t group = dispatch_group_create();
dispatch_group_leave(group);
}
return 0;
}
Therefore I deduce that your fetchDataWithCompletion:
method calls its completion block more than once. If you can't figure out why, edit your question to include the source code of that method (and any related methods or declarations).