2
我曾經有一個用戶的報告,我的應用程序打開,進入啓動屏幕,然後崩潰。他是來自運行iOS8的iPhone 5的葡萄牙人。這是他的崩潰日誌 - http://justpaste.it/j36wSwift - 使iOS的崩潰日誌感
這是我的第一個iOS應用程序,所以我無法理解這一點。我看到導致崩潰的異常 - EXC_BREAKPOINT(SIGTRAP),但我不太明白。
我首先想到的是它與本地化字符串有關,但他說他的手機是英文的。有任何想法嗎?
EDIT2:
func createBarArray(townName: String, dict: NSDictionary) -> NSMutableArray{
var barArray = dict[townName] as NSArray
var bars = [] as NSMutableArray
// Get day of the week
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = "EEEE"
let dayOfWeekString = dateFormatter.stringFromDate(NSDate())
for bar in barArray{
var name = bar["name"] as NSString
var dealsArr = bar[dayOfWeekString] as NSArray
var deal = dealsArr[0] as NSString
var lat = bar["lat"] as Double
var long = bar["long"] as Double
var negLong = -long
var newBar = BarAnnotation(latitude: lat, longitude: negLong, name: name, deal: deal)
switch(townName){
case "amesBars":
newBar.town = "Ames"
case "cedarFallsBars":
newBar.town = "Cedar Falls"
case "iowaCityBars":
newBar.town = "Iowa City"
default:
newBar.town = ""
}
bars.addObject(newBar)
}
return bars
}
您應該嘗試的第一件事是[以象徵性的崩潰日誌](http://stackoverflow.com/questions/25855389/how-to-symbolicate-crash-log-xcode-6)。一旦完成,錯誤的確切位置和原因應該更加明顯。如果沒有,請在這裏張貼你的符號崩潰日誌 – Emilie 2015-01-26 18:04:28
好吧,它在SIGTRAP中通常表示錯誤的內存訪問的標籤。 – 2015-01-26 18:11:06
我加了符號。 – leerob 2015-01-26 18:14:11