Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

After install this library there is a small bug. #3

Open
Engheangtouch opened this issue Dec 29, 2016 · 11 comments
Open

After install this library there is a small bug. #3

Engheangtouch opened this issue Dec 29, 2016 · 11 comments

Comments

@Engheangtouch
Copy link

It is a nice library and it easy to use ,but after install it have a bug.

screen shot 2016-12-29 at 10 18 09

How to solve it ?
Thank you!

@Cokile
Copy link
Owner

Cokile commented Dec 31, 2016

Can you provide more details:

  1. Cocoapods version
  2. Deployment target
  3. ARC or MRC

@Engheangtouch
Copy link
Author

Engheangtouch commented Jan 2, 2017

hello,

  1. cocoapds version 0.1.2
  2. target v0.1.2
  3. use ARC

Thanks !

@Cokile
Copy link
Owner

Cokile commented Jan 3, 2017

What's your project deployment target? iOS8?

@Engheangtouch
Copy link
Author

yes, my project deployment target iOS 8.0
thank you !

@Cokile
Copy link
Owner

Cokile commented Jan 8, 2017

Have to tried to update your Cocoapods?

@exavi
Copy link

exavi commented Oct 27, 2017

I was getting the same error, changing the following made the error go away and builds fine.

CCDropDownMenu.h line 37 change property from weak to unsafe_unretained

@property (nonatomic, unsafe_unretained) id <CCDropDownMenuDelegate> delegate;

@michaelharrigan
Copy link

Just did a pull request to fix that issue. I used the solution that @exavi proposed. You may also use strong which fixes the error, but that might cause a retain cycle.

@Cokile
Copy link
Owner

Cokile commented Nov 24, 2017

Try to add the snippet below to your Podfile and run pod install.

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            if target.name == 'CCDropDownMenus'
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
            end
        end
    end
end

Let me know if it works.

@michaelharrigan
Copy link

michaelharrigan commented Nov 27, 2017 via email

@Cokile
Copy link
Owner

Cokile commented Nov 29, 2017

So it's the problem of the Podspec file, not the code. I will release a new version to fix this issue later. For now, just use the Podfile workaround above instead of changing weak to unsafe_unretained.

FYI: What is the use of unsafe_unretained attribute?

@michaelharrigan
Copy link

@Cokile Awesome!

Thanks for that link too. I didn't want to use strong because of the fear of retain cycles. But luckily the Podfile fix seemed to make the error go away.

Thanks again.

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

No branches or pull requests

4 participants