因此,我一直在构建一个使用homeKit的应用程序,并且它的运行非常出色,然后突然在昨天打开它以对其进行工作时突然出现编译器错误。
我不知道这是什么意思。我确实向苹果公司报告了此事,只是想知道是否有人在遇到这种情况并有解决方案。
错误。
CompileSwift正常的i386 com.apple.xcode.tools.swift.compiler
cd/用户/newsclip/Dropbox/HomeKit
导出PATH =“/Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode6-Beta3.app/Contents/Developer/usr/bin:/usr/bin :/bin:/usr/sbin:/sbin“
/Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -target i386-apple-ios8.0 -module-name HomeKit -O0 -sdk/Applications/Xcode6-Beta3.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -g -module-cache-path/Users/newsclip/Library/Developer/Xcode/DerivedData/ModuleCache -I/Users/newsclip/Library/开发人员/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/产品/Debug-iphonesimulator -F/用户/newsclip/库/开发人员/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/构建/产品/4s/newsclip/Dropbox/HomeKit/HomeKit/AccessoryDiscover.swift/Users/newsclip/Dropbox/HomeKit/AccessoryTableViewController.swift/Users/newsclip/Dropbox/HomeKit/HomeKit/CharacristicsViewController.swift/Users/newsclip/Dropbox/HomeKit/HomeKit/AppKitgate .swift/用户/newsclip/Dropbox/HomeKit/HomeKit/ServicesTableViewController.swift-输出文件映射/Users/newsclip/库/开发人员/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/Objects-normal/i386/HomeKit-OutputFileMap.json -serialize-diagnostics -emit-dependencies -emit-模块-emit-module-path/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/Objects-normal/i386/HomeKit.swift模块- Xcc -I/用户/newsclip/库/开发人员/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/swift-overrides.hmap -Xcc -iquote -Xcc/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/HomeKit生成的文件.hmap -Xcc -I/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesim ulator/HomeKit.build/HomeKit-own-target-headers.hmap -Xcc -I/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit。 build/HomeKit-all-target-headers.hmap -Xcc -iquote -Xcc/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/HomeKit-project-headers.hmap -Xcc -I/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Products/Debug-iphonesimulator/include -Xcc -I/Applications/Xcode6-Beta3.app/内容/开发人员/工具链/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/DerivedSources/i386 -Xcc -I/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermedi ates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/DerivedSources -Xcc -DDEBUG = 1 -emit-objc-header -emit-objc-header-path/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit- eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/Objects-normal/i386/HomeKit-Swift.h
IntToPtr源必须是不可分割的
%173 = inttoptr%objc_object *%146到%CSo9HMService *,!dbg!341
LLVM错误:发现功能中断,编译中止!
命令/Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift失败,退出代码为1
最佳答案
for service: HMService in detailItem!.services
{
if !services.containsObject(service)
{
println(service)
services.addObject(service)
tableView!.insertRowsAtIndexPaths([NSIndexPath(forRow: 0, inSection: 0)], withRowAnimation: UITableViewRowAnimation.Fade)
}
}
这是对我来说崩溃的代码,我所做的就是删除HMService,然后它起作用了。我不想使用HMservice的属性,但没有它我可以做。
所以我只是做了这样的事情。
for service in detailItem!.services
{
if !services.containsObject(service)
{
println(service)
services.addObject(service)
tableView!.insertRowsAtIndexPaths([NSIndexPath(forRow: 0, inSection: 0)], withRowAnimation: UITableViewRowAnimation.Fade)
}
}
希望这可以帮助人们