gpt4 book ai didi

ios - SIGABRT - 目标解析推送通知

转载 作者:行者123 更新时间:2023-11-29 01:17:12 26 4
gpt4 key购买 nike

我正在尝试保存 UISwitch 结果并使用它们来填充 Parse.com 推送通知的“ channel ”。我遵循了解析指南,但每次我尝试单击保存开关值的保存按钮时,我都会收到一个 SIGABRT。非常感谢任何帮助

@IBAction func Save(sender: AnyObject) {

if Athletics.on{
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject("Athletics", forKey: "channels")
currentInstallation.saveInBackground()
}else{let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.removeObject("Athletics", forKey: "channels")
currentInstallation.saveInBackground()
}


if Academics.on{
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject("Academics", forKey: "channels")
currentInstallation.saveInBackground()
}else{let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.removeObject("Academics", forKey: "channels")
currentInstallation.saveInBackground()
}

if LinkCrew.on{
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject("LinkCrew", forKey: "channels")
currentInstallation.saveInBackground()
}else{let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.removeObject("LinkCrew", forKey: "channels")
currentInstallation.saveInBackground()
}

if Events.on{
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject("Events", forKey: "channels")
currentInstallation.saveInBackground()
}else{let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.removeObject("Events", forKey: "channels")
currentInstallation.saveInBackground()
}

if Parents.on{
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject("Parents", forKey: "channels")
currentInstallation.saveInBackground()
}else{let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.removeObject("Parents", forKey: "channels")
currentInstallation.saveInBackground()
}

if Day1Day2.on{
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.addUniqueObject("Day1Day2", forKey: "channels")
currentInstallation.saveInBackground()
}else{let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.removeObject("Day1Day2", forKey: "channels")
currentInstallation.saveInBackground()
}


}

最佳答案

问题不在于您的代码,而在于您的 main.storyboard。 SIGABRT 错误显示 Storyboard元素何时连接到不再存在的某个其他元素或导出。

要修复此错误:

  1. 转到您的主要 Storyboard
  2. 点击您的元素之一(例如 UILabel 等)
  3. 单击连接检查器(看起来像圆圈中的箭头)
  4. 查看它是否连接到不存在的东西并删除它/它们
  5. 对所有元素执行第 2 步到第 4 步

关于ios - SIGABRT - 目标解析推送通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35027534/

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