Skip to content
This repository

Build failed: Semantic Issue #39

ghost opened this Issue May 21, 2012 · 11 comments

3 participants

Kyle Browning Shahnawaz Alam Mark Dorison
Deleted user
ghost commented May 21, 2012

The content you are editing has changed. Reload the page and try again.


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,

Sending Request…

Attach images by dragging & dropping or selecting them. Octocat-spinner-32 Uploading your images… Unfortunately, we don't support that file type. Try again with a PNG, GIF, or JPG. Yowza, that's a big file. Try again with an image file smaller than 10MB. This browser doesn't support image attachments. We recommend updating to the latest Internet Explorer, Google Chrome, or Firefox. Something went really wrong, and we can't process that image. Try again.

Kyle Browning

This should be fixed thanks!

Kyle Browning kylebrowning closed this May 29, 2012
Shahnawaz Alam

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

Kyle Browning

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?

Kyle Browning kylebrowning reopened this September 10, 2012
Shahnawaz Alam

@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.

Shahnawaz Alam

@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.

Shahnawaz Alam

@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.

Shahnawaz Alam

@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.

Kyle Browning kylebrowning closed this September 26, 2012
Kyle Browning


Mark Dorison

I am still seeing the issue even with e154dd4 applied.

Kyle Browning kylebrowning reopened this September 26, 2012
Kyle Browning

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.

Kyle Browning

Its commented out now.

Kyle Browning kylebrowning closed this October 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.