rubygarage / authorize-me

Authorization with social networks

Home Page:https://rubygarage.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#selector' refers to instance method 'cancel()' that is not exposed to Objective-C

bbookman opened this issue · comments

AuthorizeMe/Core/Controllers/ProviderController.swift:46:86: Argument of '#selector' refers to instance method 'cancel()' that is not exposed to Objective-C

The dev can fix this and xCode supplies a fix, however I suggest fixing it in your code.

Add '@objc' to expose this instance method to Objective-C

Now library is supporting only Swift 3. You can switch to Swift 3.2 for AuthorizeMe pod in Build Settings and try to compile app again.

We will release Swift 4 support soon.

New release with Swift 4 support have just been submitted to CocoaPods https://cocoapods.org/pods/AuthorizeMe

Did the following and still see the same issue:

  1. pod cache clean -- all
  2. pod repo --update
  3. Add Authorize me to Podfile
  4. pod install
  5. open my project and build

Same exact error as before. This is due to the fact that you need to add @objc statements I believe

"Add '@objc' to expose this instance method to Objective-C'

Here is the fix

**@objc** func cancel() {
    complete(withUrl: nil, error: AuthorizeError.cancel)
}