swift failed with exit code 1 while compiling in Xcode - possibly related to Bridging-Headers

前端 未结 25 2934
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 02:00

I have an Obj-C Project I\'m trying to migrate to Swift. I did succeed with various classes but recently ran into an issue I can\'t seem to make sense of. When I try to comp

25条回答
  •  星月不相逢
    2020-12-05 02:18

    I did the same all answer says but mine issue was not resolved. I did figured out that issue was related to broken function call.

    A function syntax was not wrong but its calling mechanism was wrong.

    To check the exact error for this issue check following:

    Select issue navigator > Click on error will show logs for error > In that select All Messages tab.

    This will show all detail logs for this error.

    enter image description here

    Scroll down and You got logs like, in my case

    enter image description here

    So, by reading this I figure out that something wrong with function calling. I browse my code and resolved it, Below was correct and wrong code.

    Wrong Way:

    var region = MKCoordinateRegionMake(self.mapView.userLocation.coordinate, span)
    // It will not shown error here but when you build project compiler shows error.
    

    Right Way:

    let region = MKCoordinateRegion(center: self.mapView.userLocation.coordinate, span: span)
    

提交回复
热议问题