简体   繁体   中英

Xcode 6.1 NSLayoutConstraint no know class method issue

I upgraded my iPhone 5 to iOS 8.1 and XCode to 6.1 (which turns out a tragedy), I then test my custom keyboard using them. At first, everything was ok, I can run my custom keyboard on simulators and on my device with no issue, but suddenly, building the app against my device gave me

No know class method for selector 'constraintWithItem:attribute:relatedBy:toItem:attribute:contant:'

The weird part is I did not change anything on this part of code. And building it against simulators passed fine, it even built fine if I removed my device and archive it against 'iOS Device'.

I then created a ad-hoc build and install it on my 'problematic' device using iTunes, it works fine.

I am totally lost, here, anyone has any idea?

Much appreciated.

I had the same error with Xcode 6.1 building for iPad Air on the iOS Simulator. Not sure what the cause was but I did find a solution / workaround. I deleted the Derived Data folder ('your username'/Library/Developer/XCode/Derived Data) and the issue disappeared. I have been able to build my app for all of the simulated devices and install and run it on an iPad Air (iOS 8.1).

I had the same issue. I tried Andy1982's solution and thought that it didn't work. Turns out that was because I deleted only the relevant App directories inside the "Derived Data" folder. When I cleared out the folder entirely, things were fixed. Perhaps the offender was inside the ModuleCache directory. I wanted to post this as a comment to Andy1982's answer, but it seems I need reputation to do so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM