gpt4 book ai didi

ios - Swift - 理解 iOS 崩溃日志

转载 作者:搜寻专家 更新时间:2023-11-01 05:42:00 24 4
gpt4 key购买 nike

我收到了来自用户的报告,我的应用程序打开,到达启动屏幕,然后崩溃。他来自葡萄牙,使用运行 iOS8 的 iPhone 5。这是他的崩溃日志 - http://justpaste.it/j36w

这是我的第一个 iOS 应用程序,所以我无法理解这一点。我看到导致崩溃的异常 - EXC_BREAKPOINT (SIGTRAP),但我真的不明白是怎么回事。

我的第一个想法是它与本地化字符串有关,但他说他的手机是英文的。有什么想法吗?

编辑:http://justpaste.it/j3jy

编辑2:

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
}

最佳答案

步骤-

  1. 获取.app文件
  2. 获取.dSYM 文件
  3. 从崩溃报告中获取地址
  4. 运行 xcrun atos -o MYAPP.app/MYAPP -arch arm64 -l 0x1000f4000 0x00000001002162c8

为了更好地理解检查this article出。

关于ios - Swift - 理解 iOS 崩溃日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28155875/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com