Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Build failed: Semantic Issue #39

Closed
ghost opened this Issue · 11 comments

3 participants

@ghost

Hi,

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,
anni

@kylebrowning

This should be fixed thanks!

@shiny13

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

@kylebrowning

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

@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: http://i84.photobucket.com/albums/k39/shiny13/ScreenShot2012-09-10at31948PM.png

It says DIOSNode.m was edited 5 days ago.

@shiny13

@karimo Its still showing me that same error even after downloading form your link. Here is the screenshot of the error: http://i84.photobucket.com/albums/k39/shiny13/ScreenShot2012-09-10at33238PM.png

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

@shiny13

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

@shiny13

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

@kylebrowning

Fixed.

@markdorison

I am still seeing the issue even with e154dd4 applied.

@kylebrowning

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

Its commented out now.

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.