nxtbgthng / OAuth2Client

Client library for OAuth2 (currently built against draft 10 of the OAuth2 spec)
855 stars 217 forks source link

Incompatible pointer types #120

Closed doc-iwatersports closed 10 years ago

doc-iwatersports commented 10 years ago

I recieved the following on a new install of the development branch.

ProjectDir/Pods/NXOAuth2Client/Sources/OAuth2Client/NXOAuth2PostBodyPart.m:42:52: Incompatible pointer types sending 'CGPathRef' (aka 'const struct CGPath ') to parameter of type 'NSString ' Here is the code.

return [self initWithName:name fileContent:[content path]];

This:

return [self initWithName:name fileContent:[NSString stringWithFormat:@"%@",[content path]]];

will fix it, however, it may not be a problem as it shows up in a future version of XCode.

stigi commented 10 years ago

Seems Xcode is having a problem resolving content to the proper type. Might think it's of type id and therefore think that -path is a method from UIBezierPath...

A simple cast might help: return [self initWithName:name fileContent:[(NSURL *)content path]]; and also be the cleanest solution considering the class check 1 line above.

doc-iwatersports commented 10 years ago

That works, thanks.