CCDropDownMenu icon indicating copy to clipboard operation
CCDropDownMenu copied to clipboard

After install this library there is a small bug.

Open Engheangtouch opened this issue 8 years ago • 11 comments

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!

Engheangtouch avatar Dec 29 '16 15:12 Engheangtouch

Can you provide more details:

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

Cokile avatar Dec 31 '16 04:12 Cokile

hello,

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

Thanks !

Engheangtouch avatar Jan 02 '17 12:01 Engheangtouch

What's your project deployment target? iOS8?

Cokile avatar Jan 03 '17 13:01 Cokile

yes, my project deployment target iOS 8.0 thank you !

Engheangtouch avatar Jan 03 '17 15:01 Engheangtouch

Have to tried to update your Cocoapods?

Cokile avatar Jan 08 '17 12:01 Cokile

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;

exavi avatar Oct 27 '17 09:10 exavi

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.

michaelharrigan avatar Nov 23 '17 17:11 michaelharrigan

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.

Cokile avatar Nov 24 '17 03:11 Cokile

Hey,

Just got around to adding it and it looks like that fixes the issue.

On Nov 23, 2017, 10:26 PM -0500, Cokile Ceoi [email protected], wrote:

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. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

michaelharrigan avatar Nov 27 '17 13:11 michaelharrigan

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?

Cokile avatar Nov 29 '17 01:11 Cokile

@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.

michaelharrigan avatar Nov 29 '17 10:11 michaelharrigan