#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:
- pod cache clean -- all
- pod repo --update
- Add Authorize me to Podfile
- pod install
- 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)
}
Thank you, @bbookman. We added this as fix https://github.com/rubygarage/authorize-me/blob/master/Core/Controllers/ProviderController.swift#L56