Getting Duplicate interface definition for class 'AppDelegate' AND Property has a previous declaration errors when adding swiftvalidator delegate method to my uiviewcontroller
Closed this issue · 4 comments
im getting odd errors with one of the swiftvalidator delegate methods
i added swift validator to my podfile
podfile looks as follows
platform :ios, '8.0'
use_frameworks!
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'SwiftValidator', '2.1.1'
i imported swiftvalidator to my LoginViewController (which is a subclass of UIViewController) by declaring import SwiftValidator
my class is declared as
class LoginViewController: UIViewController, UIAlertViewDelegate, UITextFieldDelegate, ValidationDelegate {
I initialised let validator = Validator() at the top level of the class
i added validator.registerField(emailField, errorLabel: emailErrorLabel, rules: [RequiredRule(), EmailRule()]) to viewdidload
i added skeleton of validationSuccessful delegate method as follows
func validationSuccessful() {
// submit the form
println("validation success")
}
but when i add other delegate method ie validationFailed as follows
func validationFailed(errors: [UITextField : ValidationError]){
println("test")
}
i get the following build errors ...
Getting Duplicate interface definition for class 'AppDelegate' and
Property has a previous declaration
in the apps swift header file ie komunety-Swift.h
if i change the errors parameter in this delegate function ie to func validationFailed(errors: [UITextField : String] the error goes away ... ie it seems to be related to the ValidationError type itself
any ideas on how to fix
Were you able to find a solution to this?
no. I ended up up just copying the framework manually rather than using cocoapods
I just had the same problem, and I suspect the reason is because AppDelegate.swift
is installed with the pod.
Fixed in 3.0.1