Comments (10)
Have you #imported
the NSString+HTML.h
category into your code?
from mwfeedparser.
Yes like this:
#import "NSString+HTML.h"
The GTMNSString+HTML is (sufficiently?) imported by NSString+HTML, so I assume I don't have to import it explicitly in my own code?
The following files are copied into my project:
GTMNSString+HTML.h
GTMNSString+HTML.m
NSString+HTML.h
NSString+HTML.m
Do I need anything else?
from mwfeedparser.
Here's how I'm trying to use it:
NSString *title = [[entry valueForKey:@"title"] stringByDecodingHTMLEntities];
from mwfeedparser.
Have you checked that [entry valueForKey:@"title"]
is an instance of NSString
?
from mwfeedparser.
Looks like it's actually NSMutableString, but could that be the problem? Can't check right now...
from mwfeedparser.
I did a copy on the NSMutableString, which should return a regular NSString. It did not fix the problem.
from mwfeedparser.
I'm getting an erro like this, too, after upgrading an old project to Xcode 4.3.2. My error is:
-[__NSCFString JSONFragmentValue]: unrecognized selector sent to instance 0x6994560
and as far as I can tell I have a correctly implemented Category on NSString that implements the JSONFragmentValue. I suspect that there's something new and different in the way Categories on built-in classes are implemented in Xcode 4.3.2. I also had a similar problem with a Category on NSNumber and ended up re-writing that as its own independent class (which worked fine).
Any ideas what may have changed to break code like this in Xcode 4.3.2?
from mwfeedparser.
In browsing the web for other possible solutions to this problem I found this:
SDWebImage/SDWebImage#85
And in the offered solutions there I saw this:
Adding the -all_load flag to 'Other Linker Settings' in my app project, as seen in the first answer here: http://stackoverflow.com/questions/3998483/objective-c-category-causing-unrecognized-selector
This "rang a bell" with my earlier work on my particular project in an older Xcode. It said somewhere that this "-all_load" flag was required. I checked and somehow it hadn't migrated properly to Xcode 4.3.2. I added this to the previously empty "Other Linker Settings" and instantly the exceptions went away and the project worked! Now I'm going to go back and undo my changes to the Category on NSNumber and see if that works the original way, too!
from mwfeedparser.
NSString+HTML is not compatible with Xcode 4.2 because GTMNSString+HTML isn't ARC compatible, it is using struct
.
You can always add -fno-objc-arc
to the files (https://code.google.com/p/google-toolbox-for-mac/wiki/ARC_Compatibility)
from mwfeedparser.
Awesome. I added -fno-objc-arc
as build flag to GTMNSString+HTML.m and NSString+HTML.m under the Compile Sources settings in the Build Phases tab of my Target settings. That solved my problem. Thank you Abe!
from mwfeedparser.
Related Issues (20)
- Why Weird Licence
- Enclosures does not contain all media content HOT 3
- Retrieving <wfw:commentRss> and <slash:comments>
- Can`t call delegate functions
- iOS 9 SSL Issues HOT 3
- How To parse Image (media:content) HOT 1
- How display image for different RSSfedd's Key. like (media:content , image, thumbnail)
- Problem with & HOT 1
- Atom parsing: MWFeedItem 'link' is null HOT 1
- Search with keyword.
- Impliment search option.
- Problem (and solution) handling 32bit unicode entities
- Current code is not working HOT 5
- exc_bad_access when dismissing MWFeedParser delegate
- create app with wordpress
- Support for IOS10?
- Error Domain=MWFeedParser Code=2 "A server with the specified hostname could not be found." UserInfo={NSLocalizedDescription=A server with the specified hostname could not be found.}
- Error parsing img tag (and possibly dates)
- Crash On iOS 8 / Xcode 6 - Beta 6
- Using MWFeedParser for parsing only HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mwfeedparser.