原stackoverflow上解决方案地址:
http://stackoverflow.com/questions/39632975/xcode-8-swift-3-command-failed-due-to-signal-killed-9
问题描述:
升级Xcode 8 以及 代码迁移到Swift3.0之后,编译swift会变的非常缓慢,花费很长的时间,并且电脑变的非常慢,30分钟后得到了错误信息:
...
// 主要信息
Command failed due to signal: Killed: 9
...
造成原因:
let params : [String: Any] = [
"person_id" : kPersonId,
"person_promo_id" : promo.personPromoId!,
"promo_page_id" : promo.promoPageId!,
"seq_no" : promo.seqNo!,
"promo_type" : promo.promoType!,
"page_name" : promo.pageName!,
"image_name" : promo.imageName!,
"start_date" : promo.startDate!,
"end_date" : promo.endDate!,
"website" : promo.website!,
"facility_name" : promo.facilityName!,
"address" : promo.street!,
"city" : promo.city!,
"prov_state_cd" : promo.provState!,
"country_cd" : promo.country!,
"contact_name" : promo.contactName!,
"contact_phone" : promo.contactPhone!,
"latitude" : promo.latitude!,
"longitude" : promo.longitude!,
"bgColorRed" : promo.bgColorRed!,
"bgColorGreen" : promo.bgColorGreen!,
"bgColorBlue" : promo.bgColorBlue!,
"promoCategories" : promoCat
]
像文件中含有这样的字典,会导致编译速度非常缓慢。
解决方案:
var params : [String : Any] = [:]
params["person_id"] = kPersonId
params["person_promo_id"] = promo.personPromoId
params["promo_page_id"] = promo.promoPageId
params["seq_no"] = promo.seqNo
params["promo_type"] = promo.promoType
params["page_name"] = promo.pageName
params["image_name"] = promo.imageName
params["start_date"] = promo.startDate
params["end_date"] = promo.endDate
params["website"] = promo.website
params["facility_name"] = promo.facilityName
params["address"] = promo.street
params["city"] = promo.city
params["prov_state_cd"] = promo.provState
params["country_cd"] = promo.country
params["contact_name"] = promo.contactName
params["contact_phone"] = promo.contactPhone
params["latitude"] = promo.latitude
params["longitude"] = promo.longitude
params["bgColorRed"] = promo.bgColorRed
params["bgColorGreen"] = promo.bgColorGreen
params["bgColorBlue"] = promo.bgColorBlue
params["promoCategories"] = promoCat