开发者

iOS: Deleted Code Keeps Affecting App

开发者 https://www.devze.com 2023-03-25 01:28 出处:网络
I removed an attribute from an object; I made sure there is no reference to it after I took it off; but when I run the app it crashes upon a certain meth开发者_C百科od saying that it cannot find this

I removed an attribute from an object; I made sure there is no reference to it after I took it off; but when I run the app it crashes upon a certain meth开发者_C百科od saying that it cannot find this attribute that I had removed.

To be more specific, I used this attribute in a method and the error I get in the log is:

2011-08-04 15:32:17.895 myApp[10125:207] -[myUIViewController aMethodName:anAttributeThatIHadDeleted:]: unrecognized selector sent to instance 0x5e5d010 2011-08-04 15:32:17.962 myApp[10125:207] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[myUIViewController aMethodName:anAttributeThatIHadDeleted:]: unrecognized selector sent to instance 0x5e5d010'

I tried the following and it didn't help:

  • I made sure that this anAttributeThatIHadDeleted does not appear in this method (nor in the h file neither in the m file)
  • I deleted the app from the iPhone Simulator, and then did Product >> Clean
  • I even closed the simulator, closed the application, after I did this delete + clean actions

Can anyone think of anything else I can do to resolve this?


If you're absolutely sure the method doesn't exist anymore, I'd delete it from the simulator, quit the simulator, quit XCode, delete the "build" folder in Finder of you project and then start them all again


There was one thing I forgot to do..... Deleting the Interface Builder >> UIButton connection to the File's Owner IBAction method and re-connecting it to the new one (it was the same one, I just deleted an attribute from it, but apparently it doesn't sync with IB, you have to do it manually...)

iOS: Deleted Code Keeps Affecting App

0

精彩评论

暂无评论...
验证码 换一张
取 消