Skip to content

Objective-C provided getter does not match requirement's selector #143

@santanu4ver

Description

@santanu4ver

I'm having trouble converting my old source to Swift 3.0 in following area. I've this following usage which was working prior to the version 3.

    extension NewManPhoto: FICEntity
    {
        internal var UUID: String!
        {
            if _UUID == nil
            {
                // MD5 hashing is expensive enough that we only want to do it once
                let imageName: String = sourceImageURL.lastPathComponent
                let UUIDBytes: CFUUIDBytes = FICUUIDBytesFromMD5HashOfString(imageName)
                _UUID = FICStringWithUUIDBytes(UUIDBytes)
            }
            
            return _UUID;
        }
    }

New XCode starts giving me following error:
'UUID' has been renamed to 'uuid'

But when I looked inside the FICEntity file I noticed it had 'UUID' only:
*@Property (nonatomic, copy, readonly) NSString UUID;

Anyway, after accepting Xcode's auto-fix suggestion it became small-case, but pops another error:
Objective-C method 'uuid' provided by getter for 'uuid' does not match the requirement's selector ('UUID')

The code became something like this:

    internal var uuid: String!
        @objc(UUID) {

But beside it fixed, XCode erupt same error again to the line Objective-C method 'uuid' provided by getter for 'uuid' does not match the requirement's selector ('UUID') and the problem continues until the source became looks ugly and non-fixable.

Can you help how to resolve this situation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions