SwiftyJSON - var searchIndex:索引!错误 Xcode 8.2.1,Swift 3

SwiftyJSON - var searchIndex: Index! Error Xcode 8.2.1, Swift 3

每次我将 SwiftyJSON 导入到我的项目中。它会引发 Index! 错误!有谁知道如何解决这一问题?我在 Algolia 搜索中使用它。

错误消息:常规类型的引用

让我插入!然后一旦插入要求我将其删除。

Index! - 虽然不是将军。它与 Algolia cocoa pod 一起使用。

class SearchVC: UITableViewController {

var businessSearch = [Business]()

// Where the problem occurs
var businessIndex: Index!

let query = Query()
var searchId = 0
var displayedSearchId = -1
var loadedPage: UInt = 0
var nbPages: UInt = 0

SwiftyJSON 和 AlgoliaSearch 都使用 Index

所以为了指定你想使用哪个模块,你需要输入:AlgoliaSearch.Index!