Build failed: Semantic Issue #39

ghost opened this Issue May 21, 2012 · 11 comments

3 participants



I've set up a new xcode project and added the AFNetworking library as described and build the project, no issues.

Then I added the drupal-ios-sdk and tried to build the project again. Unfortunately now I get a "Semantic Issue" in DIOSNode.m within the nodeAttachFile in Line 114

"Incompatible block pointer types sending 'void (^)(NSInteger, NSInteger, NSInteger)' to parameter of type 'void (^)(NSInteger, long long, long long)'"

What did I do wrong?

Thanks in advance,


This should be fixed thanks!


Hello, I have the same problems. Can anyone please help?


Why would you doubt that someone will help, I literally just received a text message over your issue. Ive fixed this issue in a previous commit, can you please confirm with a screenshot and what SDk you are using that this is still an issue?

@kylebrowning kylebrowning reopened this Sep 10, 2012

@karimo Can you please tell me the link where you downloaded it from? I just downloaded it again and it shows the same error. This is the screenshot of the page I got it from:

It says DIOSNode.m was edited 5 days ago.


@karimo Its still showing me that same error even after downloading form your link. Here is the screenshot of the error:

And also, I use XCode 4.3.2 and iOS 5.1 as base SDK.


@kylebrowning @karimo Does it have anything to do with configuring the AFNetworking files? Because I went to 'Build Phases' and then 'Compile Sources' and then I pasted: -fno-objc-arc on the AFNetworking files. But please suggest a way for this error to be solved.


@karimo @kylebrowning Hey guys I found a solution to the error I was having. Maybe someone in the future can read this and get help.

You are sending three NSIntegers as parameters to setUploadProgressBlock when it's expected one NSUInteger (unsigned integer) and two long long parameters

totalBytesWritten and totalBytesExpectedToWrite need to be of type long long because that's how they are defined, not `NSInteger's. Your piece of code should look like:

AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
[operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) {
NSLog(@"Sent %lld of %lld bytes", totalBytesWritten, totalBytesExpectedToWrite);

Notice that in NSLog its best to send %lld parameters instead of %d because its expecting a long long type.




I am still seeing the issue even with e154dd4 applied.


Hrmm. Ive change this line like 50 times I think im just going to remove the actual nslog statement and give everyone the ability to add the upload progress block themselves.

@kylebrowning kylebrowning reopened this Sep 26, 2012

Its commented out now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment