I just upgraded my project to swift 1.2. And after 5 or 6 consecutive 'Convert to latest Swift' action :), i was able to make it compiles. Then i had lot's of my UI test failing. It was due to the fact that my 'NSFetchedResultsControllerDelegate' was not called any more.
After (i might say) a very lucky attempt, i found that it as due to the fact that my delegate was not a NSObject. So i was able to fix it by subclassing NSObject or adding @obj.
Before:
class BasicFetchedResultControllerDelegate : NSFetchedResultsControllerDelegate
After:
class BasicFetchedResultControllerDelegate : NSObject, NSFetchedResultsControllerDelegate
I don't think i saw something related to this in the change log. What is the changes that lead to that. Did you notice other changes like this?
I received this from Apple after i filled up a bug report:
This issue behaves as intended based on the following:
This is a behavior change in Swift 1.2: methods in non-Objective-C-derived classes will no longer be implicitly marked @objc even if they match an Objective-C protocol. You can explicitly mark the methods with the @objc attribute if you don't want to extend NSObject. This is described in the Xcode 6.3 release notes at https://developer.apple.com/library/ios/releasenotes/DeveloperTools/RN-Xcode/Chapters/xc6_release_notes.html#//apple_ref/doc/uid/TP40001051-CH4-SW3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With