-
Notifications
You must be signed in to change notification settings - Fork 814
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
Bridged Casting Not Supported #33
Comments
We haven't seen issues involving bridged casts. Are you positive you have ARC enabled? How did you set your project up? Is it imported? (Perhaps ARC settings aren't being preserved) If it's just some code you added after enabling ObjC support in MSVC then you can enable ARC per-file or per-project in the settings dialog. Can I get a compiler log of the error you're seeing? |
I created a project this morning to demonstrate the issue. Also, this project was imported using vsimporter. Here's the VS log when attempting to build.
Project can be downloaded here: https://www.dropbox.com/s/5hcvs7m6s15d4g9/WinObjC_Issue33.zip?dl=0 |
Thanks for the example. The reason this is happening is because the iOS version of CGPathRef is a struct*, a C type. Our version is an id, which means no bridge cast is necessary in this circumstance (you can't bridge cast from id to id - in fact you don't have to). This is a bug in our code. Unfortunately our CGPathRef is an Objective C class called CGPath that has a few convenience methods on it. It should be a C struct with only state. This will be the case for some other Ref types as well (CGFont for example) but we've fixed up most of them already. We're working on it! Sorry again. |
@TorreyBetts This issue should be fixed with newer versions of the bridge. Could you please check with the latest release and close the issue if it is resolved? |
When you have code such as the following, should the __bridge cast be supported?
The text was updated successfully, but these errors were encountered: