3
votes

So ive been building an app that uses homeKit and it was working awesome and then all of a sudden when opening it up to work on it yesterday i get a compiler error.

I have no idea what it means. I did report this to Apple just wanted to know if anyone is experiencing this and has a solution.

Error.

CompileSwift normal i386 com.apple.xcode.tools.swift.compiler cd /Users/newsclip/Dropbox/HomeKit export 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/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Products/Debug-iphonesimulator -F /Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Products/Debug-iphonesimulator -c -j4 /Users/newsclip/Dropbox/HomeKit/HomeKit/AccessoryDiscover.swift /Users/newsclip/Dropbox/HomeKit/AccessoryTableViewController.swift /Users/newsclip/Dropbox/HomeKit/HomeKit/CharacristicsViewController.swift /Users/newsclip/Dropbox/HomeKit/HomeKit/AppDelegate.swift /Users/newsclip/Dropbox/HomeKit/HomeKit/ServicesTableViewController.swift -output-file-map /Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/Objects-normal/i386/HomeKit-OutputFileMap.json -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/HomeKit.build/Objects-normal/i386/HomeKit.swiftmodule -Xcc -I/Users/newsclip/Library/Developer/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-generated-files.hmap -Xcc -I/Users/newsclip/Library/Developer/Xcode/DerivedData/HomeKit-eciduqavoiltvregqvqtboqgaibf/Build/Intermediates/HomeKit.build/Debug-iphonesimulator/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/Contents/Developer/Toolchains/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/Intermediates/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 source must be an integral %173 = inttoptr %objc_object* %146 to %CSo9HMService*, !dbg !341 LLVM ERROR: Broken function found, compilation aborted! Command /Applications/Xcode6-Beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 1

2
Xcode 6 beta 3? If so I've seen another question on here about that and I think the swift compiler is broken.trojanfoe
Guys don't put minus on this topic. It's global issue. Don't be trollAnton
Thanks for that. I didnt think it shouldve been marked down cause its a problem thats still in Xcode. but anyway , i did Figure it out on how to get my code to compile from this Thread. link i hope this helps others with the same problempjapple15

2 Answers

1
votes
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)
        }
    }

this is the code that was crashing for me and all i did was remove the HMService and then it worked. i didnt want to use the properties of HMservice but i could do without it.

so i just did something like this.

for service in detailItem!.services
    {
        if !services.containsObject(service)
        {
            println(service)
            services.addObject(service)
            tableView!.insertRowsAtIndexPaths([NSIndexPath(forRow: 0, inSection: 0)], withRowAnimation: UITableViewRowAnimation.Fade)
        }
    }

Hope this helps people

0
votes

Broken function found, compilation aborted IntToPtr source must be an integral %173 = inttoptr %objc_object* %146 to %CSo9HMService*

Have you set the oc header file? Show us the source code will helps.