-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed - Xcode erros. CDVFileTransfer.m:304:54: Incompatible operand types ('id' and 'CGPathRef' (aka 'const struct CGPath *')) #18
Conversation
Would someone with authority on this project (@agrieve?) like to take a look and help us out? I'd really like to use the updated CocoaPod, but can't do so until this is fixed. |
Thanks for the ping. I haven't noticed any compile errors with this plugin. Are you turning on extra compiler flags to reproduce this? I notice the pull requests switches |
Sorry, sending from my iPod and sick :( I don't have any flags, just the Xcode default. I see that the code is technically vlid, but since it returns an ID, Xcode can't tell. If you used alloc init. Instead, it work work. The pull request is another way you could do it (force cast). The target/source replacement is because he used older source I believe. In earlier versions, it was target, now it's source. Ultimately, it's a typo, but the idea behind it is correct. Sent from my iPod On Mar 5, 2014, at 3:20 PM, agrieve [email protected] wrote:
|
I don't see this error/warning using Xcode 5.0.2. What version do you see this in? |
I'm using either 5.0.2 or 3 (most recent). I have a fresh Xcode project with this project added as a Cocoapod dependency. I can attach it if you'd like. Graham On Mar 11, 2014, at 1:25 PM, agrieve [email protected] wrote:
|
Hi, I'm also using this plugging as Pod (CococaPods). This fix represent the same but with other (better) syntax. If we disregard of build errors when we use CocoaPods, also for me it looks really ugly to use ternary operators in Objective-C . Objc is expressive and long naming language, such things are unwelcome. |
I don't know that I'd say the existing code is bad, or even wrong. Ternary and coalescing operators are commonly used in Objective-C. There aren't really any standards around the various Cordova repositories, so I don't think it's an issue. In fact, your pull request here is using a variable that doesn't exist, which wouldn't fix the problem either :( The ultimate problem is that To fix this, you can use any of these chunks of code, depending on your preference. They'll all work.
@agrieve, could you choose one and pull it in to close this issue out, please? |
I still don't quite understand how you're getting errors in XCode from the default settings (I see the issue as a warning if I use At any rate, I'll make the change, and see about finding other occurrences in the codebase too, if it's possible for this to trip people up. |
Here's a fresh project for you. Absolutely no code on my side, all generated. The only pod included is Cordova/Plugins. When I build, I see 4 Warnings and 1 Error -- the above. Hopefully you'll see the same, otherwise... something between our environments must be different some how. |
I see the error in your project, without any changes. Still no idea why it shows up in one but not the other. Possibly something to do with the CocoaPods packaging. It's pretty strange, anyway. |
Can you test the code on the dev branch, and close the pull request if it's all good now? |
Looks good, fixes the issue. Unfortunately, I don't own the pull request, but I approve 👍 |
Fixed - Xcode erros. CDVFileTransfer.m:304:54: Incompatible operand types ('id' and 'CGPathRef' (aka 'const struct CGPath *'))