Skip to content
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

XCode 8 error - 'objc_unretainedObject' is unavailable: use a (__bridge id) cast instead #218

Open
shikharsinghal opened this issue Oct 7, 2016 · 6 comments

Comments

@shikharsinghal
Copy link

I recently upgraded to XCode 8,after installing pods correctly i get the following error on trying to build my project-
AQGridView/Classes/AQGridViewCell.m:199:57: 'objc_unretainedObject' is unavailable: use a (__bridge id) cast instead

Similar errors are given at about 10 different lines in the pod.
Please update the Repo for XCode 8.

@hyd00
Copy link

hyd00 commented Nov 11, 2016

faced same issue.

This might help

@macApps
Copy link

macApps commented Dec 19, 2016

@hyd00 AQGridViewAnimatorItem * animatingItem = (AQGridViewAnimatorItem *)objc_unretainedObject(CFDictionaryGetValue( animatingCellTable, (void *)oldIndex )); replaced with "(__bridge void *)" will show the error "Incompatible types casting 'NSUInteger'to 'void *'with a __bridge cast".

@hyd00
Copy link

hyd00 commented Dec 20, 2016

@macApps try changing void * to NSUInteger * maybe?

@macApps
Copy link

macApps commented Dec 23, 2016

@hyd00 it still doesn't work, Incompatible types casting 'NSUInteger'to 'NSUInteger *'with a __bridge cast.

@raid5
Copy link

raid5 commented Feb 5, 2017

I'm having issues with this as well.

@Pepsi1x1
Copy link

Pepsi1x1 commented Mar 10, 2017

You should replace it with a cast of the same type, in this case:

AQGridViewAnimatorItem * animatingItem = (AQGridViewAnimatorItem *)objc_unretainedObject(CFDictionaryGetValue( animatingCellTable, (void *)oldIndex ));

becomes:

AQGridViewAnimatorItem * animatingItem = (__bridge AQGridViewAnimatorItem *)(CFDictionaryGetValue( animatingCellTable, (void *)oldIndex ));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants