Iglistkit: isEqual function different on simulator vs on device

Created on 19 Nov 2016  路  7Comments  路  Source: Instagram/IGListKit

New issue checklist

General information

  • IGListKit version: 1.0 master branch
  • iOS version(s): 10
  • CocoaPods/Carthage version: latest
  • Xcode version: 8
  • Devices/Simulators affected: All
  • Reproducible in the demo project? (Yes/No): No
  • Related issues:

Since the change of the -isEqual: function to -isEqualToDiffableObject:, I'm having a problem running on the device vs running on the simulator. The simulator correctly uses the new -isEqualToDiffableObject: function. However, running the exact same code and switching to a device produces the following error:

Method 'isEqual(toDiffableObject:)' has different argument names from those required by protocol 'IGListDiffable' ('isEqual')

If I change back to the old -isEqual: method, then it's completely fine... Until I run again on the simulator as it wants me to use the new method.

Is this an issue with IGListKit or is there something wrong with my project?

question

All 7 comments

Hey @yusuftor 馃槃

Sounds like you probably need to clean and re-build?

In Xcode, cmd-shift-K

Looks like this might be a Swift bug due to the methods both having isEqual(...) signatures?

https://bugs.swift.org/browse/SR-1208

https://github.com/apple/swift/commit/e003e5e099b9cf79b581560ff9d494a7722fc465

Agree cleaning should help. We should brace for this being an issue.

Ugh.

Are there more bridging features we can use? I vaguely remember some kind of "refined for Swift" ObjC macro or something...

Oh also -- can we repro in the demo projects?

can we repro in the demo projects

I never ran into this, but I didn't run on device after refactoring. I still have the demo on my phone I'll run and see what happens.

Just ran it: no repro. Hopefully a one-off?

Solved it. I cleaned the build folder, but then that gave me a lot of other issues to do with Cocoapods. After disintegrating/installing cocoapods a few times it seemed to disappear. Weird, but I can close this issue now!

Thanks @yusuftor !

Was this page helpful?
0 / 5 - 0 ratings