2

When renaming a project the project became corrupted and i could not recover it. when opening the workspace no files are visible only the .xcworkspace file in red and the pods project file in red. the swift files remained so i copied them to a new project and now i cant get past the following error

2016-05-03 14:17:55.368 App Name[2194:827220] +[NSDate dateFromRFC3339String:]: unrecognized selector sent to class 0x397f0348
2016-05-03 14:17:55.369 App Name[2194:827220] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDate dateFromRFC3339String:]: unrecognized selector sent to class 0x397f0348'
*** First throw call stack:
(0x2289798b 0x22032e17 0x2289d241 0x2289af51 0x227c62f8 0x1c2de3 0x1c31a7 0x1c2957 0x1c45cb 0x1c5525 0x22df92b9 0x230a9659 0x2300a723 0x22ffccf9 0x230ab911 0x18d3b6b 0x18d8655 0x22859bdd 0x228580d7 0x227a72e9 0x227a70d5 0x23d97ac9 0x26e6c0b9 0x160910 0x2244f873)
libc++abi.dylib: terminating with uncaught exception of type NSException

The same code worked fine in the previous project and the error. the project file does not appear to be present in the original file.

I need help on either debugging the above errors or to fix the original project.

any help will be greatly appreciated

Lonergan6275
  • 1,938
  • 6
  • 32
  • 63
  • Where did you get `dateFromRFC3339String ` from? I see some gists when I search -- did you copy the file where this is into your new project? – Lou Franco May 03 '16 at 14:03
  • Its not anywhere in my project. dont know what it is or where it came from the only place i can find it is in the error. – Lonergan6275 May 03 '16 at 14:06
  • If you can't find it in your git history, then I guess copy it out of the gists you get by googling dateFromRFC3339String – Lou Franco May 03 '16 at 15:31

1 Answers1

1

Rebuild up your pods and the workspace by running pod install for this new project (perhaps clean out your Pods folder beforehand)

To be more clear

  1. Backup you entire project and files somewhere
  2. Exit xcode
  3. If you are not using the xcworkspace for anything except pods, delete it
  4. Delete the Pods folder
  5. run pod install -- if there are errors, stop and tell us what they are
  6. If there are no errors, you now have an .xcworkspace file and a Pods folder with pods
  7. Open the .xcworkspace file in Xcode. Pods should not be red.
Lou Franco
  • 87,846
  • 14
  • 132
  • 192