Search code examples
iosswiftxcodeuiswipegesturerecognizer

UISwipeGestureRecognizer extra argument 'target' in call for Archive project but not for Build project


If I Archive my project I receive Extra argument in 'target' in call but I do not receive this error if I Build the project. If I remove the target parameter name then I receive an error if I build.

let rightSwipeGestureRecognizer: UISwipeGestureRecognizer = UISwipeGestureRecognizer(target: self,    action: "respondToSwipeGesture:")

Solution

  • I faced the same issue today where I couldn't archive even though I did not change any of the files in days.

    I restarted xcode, tried to archive again and it worked. This is an xcode bug.