Cocoanetics / DTFoundation

Standard toolset classes and categories
BSD 2-Clause "Simplified" License
802 stars 237 forks source link

NSString+DTURLEncoding.h stringByURLEncoding unrecognized selector #50

Closed parkej60 closed 10 years ago

parkej60 commented 10 years ago

I'm having an issue with the stringByURLEncoding category class. Whenever I try to use it I just get a unrecognized selector error. It fails on any string that I use.

For example NSString test = @"Test"; NSString value = [test stringByURLEncoding];

Throws this error: 2014-01-06 14:14:56.437 Echo[38693:70b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFConstantString stringByURLEncoding]: unrecognized selector sent to instance 0x6511d8' * First throw call stack: ( 0 CoreFoundation 0x04df85e4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x03f668b6 objc_exception_throw + 44 2 CoreFoundation 0x04e95903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275 3 CoreFoundation 0x04de890b __forwarding + 1019 4 CoreFoundation 0x04de84ee _CF_forwarding_prep_0 + 14 5 Echo 0x000973ed -[MainViewController viewDidLoad] + 397 6 UIKit 0x029b49a8 -[UIViewController loadViewIfRequired] + 696 7 UIKit 0x029da1a5 -[UINavigationController _layoutViewController:] + 39 8 UIKit 0x029da6bb -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 235 9 UIKit 0x029da7b3 -[UINavigationController _startTransition:fromViewController:toViewController:] + 78 10 UIKit 0x029db72c -[UINavigationController _startDeferredTransitionIfNeeded:] + 645 11 UIKit 0x029dc349 -[UINavigationController __viewWillLayoutSubviews] + 57 12 UIKit 0x02b1539d -[UILayoutContainerView layoutSubviews] + 213 13 UIKit 0x0290bdd7 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355 14 libobjc.A.dylib 0x03f7881f -[NSObject performSelector:withObject:] + 70 15 QuartzCore 0x0277b72a -[CALayer layoutSublayers] + 148 16 QuartzCore 0x0276f514 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380 17 QuartzCore 0x0276f380 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26 18 QuartzCore 0x026d7156 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 294 19 QuartzCore 0x026d84e1 _ZN2CA11Transaction6commitEv + 393 20 QuartzCore 0x02794870 +[CATransaction flush] + 52 21 UIKit 0x028bd979 _afterCACommitHandler + 131 22 CoreFoundation 0x04dc053e CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 30 23 CoreFoundation 0x04dc048f CFRunLoopDoObservers + 399 24 CoreFoundation 0x04d9e3b4 CFRunLoopRun + 1076 25 CoreFoundation 0x04d9db33 CFRunLoopRunSpecific + 467 26 CoreFoundation 0x04d9d94b CFRunLoopRunInMode + 123 27 GraphicsServices 0x04bca9d7 GSEventRunModal + 192 28 GraphicsServices 0x04bca7fe GSEventRun + 104 29 UIKit 0x028a194b UIApplicationMain + 1225 30 Echo 0x0007477d main + 141 31 libdyld.dylib 0x0447d70d start + 1 32 ??? 0x00000001 0x0 + 1

parkej60 commented 10 years ago

I removed the Pod file and just pulled the individual category and it fixed the issue. Not sure what's wrong with the Pod file.