1and2papa / CTAssetsPickerController

iOS control that allows picking multiple photos and videos from user's photo library.
MIT License
2.15k stars 550 forks source link

Unrecognized Selector when using Swift #165

Closed Akcbryant closed 8 years ago

Akcbryant commented 9 years ago

When I set showSelectionIndex on an instance of CTAssetsPickerController I get the following: [CTAssetsPickerController setShowsSelectionIndex:]: unrecognized selector sent to instance

I can replicate this with a fresh single page application with a Podfile that contains the following:

_useframeworks!

pod 'CTAssetsPickerController'`

Akcbryant commented 9 years ago

picker.showsSelectionIndex = true works if I go through the manual installation steps so this is probably a cocoapods issue

1and2papa commented 9 years ago

Hi @Akcbryant, I made a fresh project and cannot reproduce such error. Please make sure the cocoapods install the proper version (3.1.0 or above).

The result of running pod install should look like this:-

pod install                                                             
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing CTAssetsPickerController (3.1.0)
Installing PureLayout (3.0.1)
Generating Pods project
Integrating client project
Akcbryant commented 9 years ago

I get the exact same output from running pod install. I am using Swift with Xcode 7.0.1. When I debug into the instance of CTAssetsPickerController it doesn't show that there is a property showsSelectionIndex even though I can clearly see it in the source code. If you have it working in Swift then I must have an issue with cocoapods. Thanks for the responses.

1and2papa commented 9 years ago

That's strange. Mine was Objective C. Not sure if it made the difference. Have you updated cocoapods to latest btw?

Akcbryant commented 9 years ago

Yeah everything is up to date. The Objective-C works flawlessly but using Swift I get this error. Ill update this when if I find out whats wrong. Thanks again btw

Akcbryant commented 9 years ago

@chiunam Have you run the demo app on a device? Even with Objective-C I am getting the same unrecognized selector error when I try to access use the "Show selection order" part of the demo.

Akcbryant commented 9 years ago

Sorry finger slipped.

1and2papa commented 8 years ago

@Akcbryant I tried running fresh cloned demo app with Xcode 7.1 and iPhone 6. Still cannot reproduce your issue.

Akcbryant commented 8 years ago

Just to be clear, this is on your iPhone 6 device? Not the simulator?

1and2papa commented 8 years ago

Yes. This is on my iPhone 6 device.