分段故障Swift 2 App

时间:2015-09-22 20:02:16

标签: ios swift parse-platform segmentation-fault

我刚将我的项目转换为Swift 2,将整个代码转换为新语法。但是,当我尝试构建应用程序时,我收到了Segmentation Fault错误。下面是构建输出。

$( "#datepicker" ).datepicker({
    onSelect: function() {
        var date = $(this).datepicker('getDate');
        if (date.getDate() > 27)
        {
          $(this).datepicker('setDate', new Date(date.getFullYear(), date.getMonth()+1, 0));
        }
    }
});

这个错误的原因是什么?我看到它与类型检查有关,但我无法弄清楚原因。我也在使用最新版本的Parse SDK。

1 个答案:

答案 0 :(得分:3)

PFQuery.findObjectsInBackgroundWithBlock的方法签名已更改。请参阅:https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/280

(speakerObjects:[AnyObject]?, error:NSError?) -> Void in替换为(speakerObjects:[PFObject]?, error:NSError?) -> Void in