Category Archives: iOS

feedsushi 1.4

A feedsushi update is available!

We added support for labels and made some UI changes. I would like to thank you again all of you for leaving messages on our support page or reviewing the app!

First of all I have to apologize for the method used to ask for reviews (sorry Emielvg). Actually there was a problem in a trigger and the app continued bothering you all with an alert. It should be much better now.

One of you (thank you wordperson23) suggested to insert an option to disable the wiggling animation  occurring when navigating between articles. After a few discussions we agreed that actually he was so right that not only we inserted an option but we disabled the animation by default as well.

Last but not least we tried to make some changes to the UI (thank you mkormendy). Unfortunately there isn’t a designer behind feedsushi and we know that its UI could be much better. We cannot change it completely but we try to make some improvements release after release. Menu bar is now always visible on iPad, we added a swipe gesture (from left margin, similar to the one already present in the headlines) in the articles to open the menu bar (iPhone) and we improved the navigation between articles as well.

That’s all, apart from some bug fixes of course! We hope you enjoy this new release!

feedsushi 1.3

A new update of feedsushi is out! I hope you will enjoy this version because this one, more than any others, is the result of your help. As you know we are developing feedsushi because we like Tiny Tiny RSS and we use it everyday. We want to make feedsushi better and we will always need your help.

Some of you asked for the Basic Authentication and, at last, we had time to introduce it. For now only single user is supported: please let us know if you need the multi user feature.

We have to thank everyone who wrote us with plenty of suggestions about sharing and improving the usability of the article view. Now we can select images and text on an article and copy/share a portion of text or an image, define a single word (from local dictionary) or view/copy/share the alternate text for an image (useful for xkcd.com :). We improved the sharing feature as well. Now feedsushi has different text for each sharing target.

Some minor changes are:

  • You can now use the “~” in the URL field. (Sorry we didn’t think about it before)
  • A single tap on the status bar returns to the top of the headlines, the article or even the menu.

I hope the next version will have the offline reading. We need it! Paid work is necessary to live unfortunately and we work on feedsushi on our spare time, usually on weekends. Be patient! 🙂

“Men at work”

I’m back! My vacation in the Dolomites has come to an end and I have a lot of work to do. In my feedsushi app I used Crashlytics to trace crashes and there are some of them waiting to be fixed. I’m working on it and a new release will be ready soon with some fixes and hopefully some new features.

In the meantime if you want to give a look to some nice Dolomites photos my fiancé posted ours here.

Inject Javascript functions into a UIWebView

When working with UIWebViews it is often needed to change the appearance of the pages when it is already visible to the user. What if you want give him the possibility to change font or font size?

The answer is the UIWebView method

stringByEvaluatingJavaScriptFromString

And here are some easy examples:

[objc]
-(void)changeFontNameTo:(NSString *)fontName{
NSString *jsFixedString = @”document.getElementsByTagName(‘body’)[0].style”;
NSString *jsString = [[NSString alloc] initWithFormat:@”%@.fontFamily=’%@'”,jsFixedString,fontName];
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
}

-(void)changeFontSizeTo:(NSInteger)fontSize{
//fontSize is in percentage
NSString *jsString = [[NSString alloc] initWithFormat:@”document.getElementsByTagName(‘body’)[0].style.fontSize= ‘%d%%'”, fontSize];
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
}

-(void)changeLineSpacingTo:(NSInteger)lineSpacing{
NSString *jsFixedString = @”document.getElementsByTagName(‘body’)[0].style”;
NSString *jsString = [[NSString alloc] initWithFormat:@”%@.lineHeight=’%d%%'”,jsFixedString,lineSpacing];
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
}

-(void)changeMarginTo:(NSInteger)margin{
NSString *jsFixedString = @”document.getElementsByTagName(‘body’)[0].style”;
NSString *jsString = [[NSString alloc] initWithFormat:@”%@.marginLeft=’%d%%’;%@.marginRight=’%d%%'”,
jsFixedString,margin,jsFixedString,margin];
[self.webView stringByEvaluatingJavaScriptFromString:jsString];
}
[/objc]

For full explanation read also: How To Inject JavaScript Functions Into a UIWebView by Nick Dalton.

TimeLord 1.1 available in the App Store

TimeLord 1.1 is available in the App Store at last! I delayed the previous version immediately after release when I realised to have left wrong metadata about french and german translations. I will supply them in a future release. I took some time to solve some minor bugs and submitted the new version for review: this phase has taken more days than the other to be approved (maybe caused by the security breach of the developer center).

“Ready for sale”…up there in the mountains

I’m back from a wonderful mountain holiday in the Dolomites. I love going for walks in the mountains in summer and the Dolomites are like paradise. Before leaving I decided to submit TimeLord for revision. Frankly I was somewhat afraid to do it, it is my first app in AppStore. I have been reading the guidelines again and again thinking that I might forget something to do before submission but at last I decided to go on. I was sleeping after a day walking when the news arrived:”Your app TimeLord has changed to Ready for Sale”. Actually Marco woke me up because I had heard the notification but I was afraid to see a rejected status. TimeLord will be available very soon, free obviously, with full import/export as In-App purchasing.

Interesting article about lighter View Controllers

In a previous post I stressed the importance of creating maintainable code. I’m trying to improve in this field reading and coding with more attention to maintainability. Recently I read a very interesting article about “lighter” View Controllers. The site is new and if a good beginning bodes well… I subscribed to be notified of future articles.

Create a Universally Unique IDentifier

Problem: How to get a unique device identifier (i.e. to implement InApp purchasing) without using UDID, banned by Apple.
Solution: In iOS6 we can use identifierForVendor. In prior versions we will use CFUUIDRef. Note that in this case every call of CFUUIDRef creates a new UUID. It is necessary to save the UUID in the device keychain to make it unique.
Read also: Universally Unique IDentifier in iOS5 by Marek Bell
[objc]
+ (NSString *)createLocalUUID {

NSString *localIdentifier;

if ([[UIDevice currentDevice] respondsToSelector:NSSelectorFromString(@”identifierForVendor”)])
// iOS version >= 6
localIdentifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
else {
// iOS version < 6 CFUUIDRef uuidRef = CFUUIDCreate(NULL); CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef); CFRelease(uuidRef); localIdentifier = [NSString stringWithString:(__bridge NSString *)uuidStringRef]; CFRelease(uuidStringRef); } return localIdentifier; } [/objc]