2019 in review

As we start 2020 I wanted to take a moment to look back into 2019. 

The launch of NewsWave this past May was the indisputable highlight. Releasing a new app after months of work is always a nerve wracking experience.

Stacks image 2eadb64 1198x952

Fortunately the app was very positively received, since launch the app has been updated multiple times to improve and polish it. Even though there’s much else that can be done, more on that in the upcoming “2020 roadmap” post, I’m very happy with where the app is at today.  

Excelling, the first app I ever released (in 2013 no less), continues to have its stable niche audience. As every year, I updated it with UI improvements and under the hood changes to ensure it remains functional as iOS continues to move forward. 

ExcellingPost

Denarius, the finance app launched in 2017, continued to struggle to find an audience. When I built Denarius banks did not offer an easy way to manage your spending in Europe. This changed drastically since then though as most banks now offer a way to track where and how you’re spending your money. This, together with the fact that Denarius was designed around the European banking system, thus limiting its success elsewhere, made me realize it was time to sunset the app.

I’m very proud of Denarius, it’s hard to retire an app you’ve invested hundreds of hours into, but its time. 

Stacks image 3b458f4 714x454

 

RiverNews is a stand alone RSS reader for the Mac built in 2018 as a POC inspired by a post from Brent Simmons. Even thought it had no marketing it quickly gained traction and has convinced me to use it as a foundation for NewsWave for Mac (more on this soon).

Stacks image 3a8506e

 

And that is all! 2019 was a great year, thank’s to all my users and fellow developers that have helped. 

I’ll soon post about the 2020 roadmap, couldn’t be more excited about what’s to come for NewsWave and other apps. 

 

Until next time,

 

Marc

—-

 

 

 

Twitter -> @MarcMasVi

NSImage with Rounded Edges

Nothing like vacation to accelerate personal projects, very happy with how NewsWave for Mac is shaping up. No promises on when, but I’m planning to post more about its progress very soon. 

One of the items I worked on today is how icons and images will appear in the app, the intent is to show as much content as possible while making them attractive. To to that, images and icons will be scaled down, using “Aspect Fill’, and their edges will be rounded. This is a very simple thing to do in iOS, but it needs a bit more work on macOS. 

I wanted to go from this:

Screen Shot 2019 12 31 at 11 27 21

To this:

Screen Shot 2019 12 31 at 11 25 59

 

The cleanest way I’ve found is to subclass NSImageView, overriding the image variable, and simply use that new class for the images you want. Here’s the class code, works like a charm: 

import Cocoa

 

class ImageAspectFillView: NSImageView {

    

    override func draw(_ dirtyRect: NSRect) {

        super.draw(dirtyRect)

        

    }

 

    override var image: NSImage? {

        set {

            self.layer = CALayer()

            self.layer?.contentsGravity = CALayerContentsGravity.resizeAspectFill

            self.layer?.contents = newValue

            self.wantsLayer = true

            

 

            self.layer?.cornerRadius = 8.0

            self.layer?.masksToBounds = true

 

            

            super.image = newValue

        }

        

        get {

            return super.image

        }

    }

 

}

 

Until next time,

 

Marc

—-

 

 

Twitter -> @MarcMasVi

Creating a collage by combining an array of images (macOS & iOS)

In NewsWave, when you are in the “Add Feed” view you have the option to search the RSS repository, add a RSS URL or choose from ‘recommended feeds’. 

Recommended feeds may change over time so, instead of using static images, NewsWave looks at the feeds from each recommended category and creates a collage to represent the group. Here’s an example from NewsWave for iOS:IMG 4EB8598DD377 1

For the upcoming NewsWave for Mac version however, the code needed some tweaking. Below you’ll find both the mac and iOS versions -the function takes a rect (size of the desired outcome image) and a collection of images for the collage-.

In the version below it will output 2 rows and 3 columns but that can be easily tweaked by changing ’totalNumberOfColumns’ and ’totalNumberOfRows’. 

Here’s the macOS version:

    func collageImage(rect: CGRect, images: [NSImage]) -> NSImage {

        if images.count == 1 {

            return images.first!

        }

        

        let outcomeImage = NSImage(size: NSSize(width: rect.width, height: rect.height))

        outcomeImage.lockFocus()

        //Charecteristics of output

        let totalNumberOfColumns: CGFloat = 3

        let totalNumberOfRows: CGFloat = 2

        //Process

        let heightOfSubImage: CGFloat = rect.height/totalNumberOfRows

        let widthOfSubImage = rect.width/totalNumberOfColumns

        var columnNumber = 0

        var rowNumber = 0

        var i=0

        while i<images.count {

            let rectToDrawIn = CGRect(x: CGFloat(columnNumber)*widthOfSubImage, y: CGFloat(rowNumber)*heightOfSubImage, width: widthOfSubImage, height: heightOfSubImage)

            images[i].draw(in: rectToDrawIn)

            if columnNumber == (Int(totalNumberOfColumns) 1){

                rowNumber = rowNumber + 1

                columnNumber = 0

            }

            else {

                columnNumber = columnNumber + 1

            }

            i = i + 1

        }

        

        outcomeImage.unlockFocus()

        return outcomeImage

    }

 

And the iOS version:

    func collageImage(rect: CGRect, images: [UIImage]) -> UIImage {

        if images.count == 1 {

            return images.first!

        }

        

        UIGraphicsBeginImageContextWithOptions(rect.size, falseUIScreen.main.scale)

        //Charecteristics of output

        let totalNumberOfColumns: CGFloat = 3

        let totalNumberOfRows: CGFloat = 2

        //Process

        let heightOfSubImage: CGFloat = rect.height/totalNumberOfRows

        let widthOfSubImage = rect.width/totalNumberOfColumns

        var columnNumber = 0

        var rowNumber = 0

        var i=0

        while i<images.count {

            let rectToDrawIn = CGRect(x: CGFloat(columnNumber)*widthOfSubImage, y: CGFloat(rowNumber)*heightOfSubImage, width: widthOfSubImage, height: heightOfSubImage)

            images[i].drawInRectAspectFill(rect: rectToDrawIn)

            if columnNumber == (Int(totalNumberOfColumns) 1){

                rowNumber = rowNumber + 1

                columnNumber = 0

            }

            else {

                columnNumber = columnNumber + 1

            }

            i = i + 1

        }

        

        let outputImage = UIGraphicsGetImageFromCurrentImageContext();

        UIGraphicsEndImageContext();

        return outputImage!

    }

 

Until next time, 

Marc

—-

 

Twitter -> @MarcMasVi

Why I will not ship a Catalyst port of NewsWave

When Catalyst was announced at WWDC I was very excited about the possibilities that it created for NewsWave. Even though NewsWave launched as an iOS-only app, bringing it to the Mac has always been a priority.

A couple of months ago I started woking on porting it. As it turns out, and as you probably figured out based on the title, there were complications…

I got the app working on the Mac with little work, almost none really. However, when I started to change it to make it more Mac-like is when I started to face difficulties. It became clear this would not be a relatively easy undertaking: missing APIs, non-Mac behaviors and bugs meant I would need to invest a lot of time to, at most, end up with a barely decent Mac port. If you look at the best Catalyst ports out there you’ll see what I mean, they’re not bad but they are certainly not great either…

When I look at how I spend my time (remember I’m doing this part time), I don’t believe using it to create something decent makes sense. Here’s the Catalyst port of NewsWave running on the Mac for your reference:

Screen Shot 2019 10 27 at 22 32 50

So, what am I doing in the end? Well, I’m building a native Mac app! I’m considering experimenting with SwiftUI but based on what fellow developers said, I’ll likely will stick to Storyboards for now.

It’ll take a bit more than a Catalyst port but certainly will be a significantly better app for the Mac and for my users.

Until next time,

Marc

—-

Twitter -> @MarcMasVi

NewsWave iOS13 Feature Update – 2019.8

About a week ago I released NewsWave 2019.8, the iOS13 feature update. The objectives were to simplify the onboarding experience, add Dark Mode support and strengthen the app. Here’s a summary of what has changed and the impact it has had so far:

a) Simplifying & clarifying the onboarding experience to avoid the poor conversion rate. 

This was a big deal, as mentioned in my previous post, conversion rate -users downloading the app vs. users creating an account- was roughly 20%. This meant, that about 80% of users who downloaded NewsWave never ended up using it. 

To solve this issue I believe I’ll need to completely redo the onboarding experience. However, I did a couple of changes hoping to mitigate the issue. First, I renamed ’START FREE TRIAL’ with ‘CREATE ACCOUNT’ to avoid having users incorrectly assume they were getting into an auto-renewable subscription. Second, I changed the description that appears immediately below to clarify any questions the user may have. It now reads:  “Create your private account and try all features for free. After 30 days you can subscribe or continue using the app in free mode.”. 

IMG 4850 copy

Even though it’s too early to tell, after two weeks I can confirm a very significant jump on conversion rate: from 20% to 50%. 

b) Adding Dark Mode

This was quite fun, it involved creating new colors in the Assets for every group of non-standard text, button or background color that should change…Screen Shot 2019 09 22 at 15 48 08

 

It also meant changing the way colors were called in code…

Screen Shot 2019 09 22 at 15 48 49

And finally, creating a new dark-version of all the icons and images… One of the benefits of not having a designer is that I can do this changes myself and relatively fast. Here’s the example of the dark gray vs. light gray. 

Screen Shot 2019 09 22 at 15 48 26

 (the dark appearance color of the icon is almost the same color as the background which is why you don’t see it)

 

c) Under the hood & other minor changes:

On the under the hood area this involved replacing iOS13 deprecated APIs with their newer counterparts and further strengthening of back-end processes to (hopefully) fix a bug that I can’t reproduce.

As for other changes worth highlighting: improvements to the Export OPML process, improvements to how onboarding and renew windows are drawn and tweaks to some NavigationBar titles. For instance, the main timeline is now called ‘Your Timeline’.  

Screen Shot 2019 09 22 at 15 47 23

 

d) Bonus: Changing App Store Keywords & Screenshot:

Something I also tried to improve is discoverability. My ranking is not stellar, if I search for ‘RSS Reader’ NewsWave appears at the 120th position, and if I search for ‘Feed Reader’ the position is 107th… So, not good. 

Following advice from ’the web’ I’ve changed the app name in the store to ‘NewsWave: RSS Feed Reader’ and the subtitle is ‘Feeds, Blogs, RSS & News’. After two weeks, not measurable improvement… 

I’ll continue to investigate what I can do better, discoverability is by far the key challenge I -and probably many other developers- face. Ah, almost forgot, I also added new ‘Dark Mode’ screenshots to make the app more appealing. 

IMG F180EB835D8B 1

Until next week, 

 

Marc

 

—-

Twitter -> @MarcMasVi

iOS 13 & macOS Catalina updates

As October gets underway and leaves are starting to fall in the Bay Area, with the recent launch of iOS13 and the upcoming macOS Catalina release, it’s back to iOS development time.

One of the first things I learned as a part time developer is that you have limited time, prioritizing is critical to get things done. Here are the items I’m focusing on in the next few months: 

1. Excelling iOS13 compatibility update (done!):

Even though it’s my oldest and simplest app it’s also the most profitable. Excelling continues to be downloaded frequently and brings regular income every month -typically between $50 to $200-. It’s starting to show its age and it would benefit from an internal makeover but for now I wanted to ensure it worked well in iOS13; this meant adding support for dark mode and fixing bugs and deprecated APIs. After roughly 4 hours of work I submitted the app to Apple and it’s already in the App Store. 

 

2. NewsWave iOS13 feature update (wip):

NewsWave continues to gain users at a steady peace and feedback is at large very positive. There’s however room for improvement, one of the areas that need attention the most is “Onboarding”: data shows out of every 10 people that download the app only 2 end up signing up. I’m guessing this is due to two factors:

a) people are cautious of the $0 In App Purchase, they may incorrectly assume it will start charging them if they don’t unsubscribe. 

b) the onboarding message does not convey enough value. 

Therefore for the iOS13 feature update, in addition to dark mode support and API improvements I’m tweaking the onboarding experience to mitigate these problems. In addition this update will include many other improvements across the app: syncing, OPML export improvements, etc. 

Untitled

 

3. NewsWave for iPad / macOS (not started):

Once I ship the iOS13 feature update I’ll start working on a complete overhaul of the iPad (and potentially macOS Catalina) app. Not much to share just yet but I’ll be posting about the progress here. 

 

I’ve loved the vacation break but at the same time I’m so happy to be back to coding on the side. Until next week, 

 

Marc

2019 Holiday Learning Update

As I do every summer, this last few weeks I’ve been deep diving into a new subject: AI & Machine Learning.  

Almost every day I pack my laptop, Aurélien Géron’s book -he has done a phenomenal job-, and walk to a coffee shop close by to study. 

IMG 4106

Yes, that’s an HP laptop right there! It’s great for ML on the go. 

It’s been so much fun, not only because of how refreshing this change is: Python instead of Swift, Jupyter Notebooks instead of Xcode, cafeteria instead of home office… But also because of how interesting Machine Learning has turned out to be. 

Not only deep diving into Machine Learning gives you many ideas on topics you could work on, but it also allows you to understand its pitfalls (hello YouTube video recommendations or Amazon suggestions). So far I’ve been focusing on everything but neural networks but that will change starting tomorrow. Can’t wait. 

On other news, I likely won’t be able to post the following two weeks as I’ll be in Australia for holidays. I’ll pack my faithful HP Spectre and Aurélien’s book to keep at it during flights and during idle times though, so I’ll have plenty to report once back. 

Hope you’re having a productive summer. 

 

Marc

—-

 

Twitter -> @MarcMasVi    

2019 Holiday Learning

One of the things I deeply enjoyed from my middle & high school summer holidays was how I would, overnight, switch my school routine for almost 2 months of passion projects. 

As I grew older and my interests changed I deep dived into different areas: I vividly remember one summer sitting for hours at a time devouring ‘The Three Investigators’ books or on another one discovering how to bring ideas to live with wood. There was no plan about it, just learning areas I was passionate about. 

Nowadays I don’t have 2 months of holidays anymore but I like to apply the same concept for my “on the side” projects; for around 2 months I deep dive on a new area I am passionate about. This area must be different from what I work on the rest of the year thus helping me expand my knowledge to areas outside of my existing competencies and enabling me to recharge batteries.  

This year I’m spending the time getting up to speed on the latest improvements to AI & Neural Networks and how they can be leveraged for everyday applications. I’ll likely post something more in the future as I work on it more. 

Coincidently one of the YouTube channels I follow just posted an excellent high level overview of what AI & ML is. You don’t need to be an engineer nor to code to follow along, totally recommended

Have you considered summer holiday for your ‘on the side’ projects? If not, I totally recommend it. 

 

Marc

—-

 

Twitter -> @MarcMasVi     |     Micro.blog -> @MarcMV

NewsWave 2019.7

And just like that, NewsWave 2019.7 is now available on the App Store. 

 

OPML Import / Export

This was one of the most requested features from day one (and it retrospect a feature NewsWave should have shipped with):

-OPML Import: From any app that can export feeds (or using an OPML file) you’ll find an option called “Copy to NewsWave”. This will start the import process, feeds that no longer exist or that return an error will be skipped. Once the import finishes you’ll see the total number of feeds that were successfully added.

-OPML Export: When you trigger it you’ll get a prompt asking you what to do with the file: send via email, save in files, copy to another app… The choice is yours! 

 

Bug fixes & improvements

Many! Thanks to all of the users who shared feedback, here are some of the key fixes / improvements:

-Fixed an issue that could show the “Today” button under incorrect circumstances.

-Added a validation step to know if the user can send email before triggering the “Send Feedback” action.

-Improved the way cleanup is handled if the app has not been opened for a long time. 

-Improved the process of syncing deleted feeds between devices. 

-Improved link handling of Daring Fireball articles. 

-Fixed an issue preventing some of the “Delete Read Articles After” options from being displayed. 

-Added an option to manually refresh feed list. 

-Fixed an issue that could result in inconsistent scrolling in the feeds view. 

-Addressed an issue that could result in views not showing the latest information. 

-New subscriptions based on a url search will now grab the latest articles from that feed instead of only future ones.

-Many other tweaks and minor improvements. 

 

What it does not include

It does not include a “Default mix of feeds for new users”. And the reason is that I’m still not sure on the best way to implement it. Should it suggest only 1 recommended mix of feeds, should I recommend a couple? Should I ask new users if they want to subscribe to them or should I just subscribe them by default?

It needs more work and I did not want to delay all the other improvements. I’ll most likely be posting about this soon, it will be one of the main focus areas of 2019.8. 

You may have spotted that I just shipped 2019.7 but in previous posts I was referring to 2019.6. You would be right, I released a quick fix for the Import OPML feature. 

Until next week,

 

Marc

—-

 

 

 

Twitter -> @MarcMasVi  

 

 

 

Using DispatchSemaphore to control async execution

I’ve been debugging the upcoming OPML Import functionality of NewsWave and this bug was driving me nuts:  in some cases and for no apparent reason URLSessions would fail without a callback. 

At first the bug seemed random, but after a bit of testing I realized the more feeds I tried to import, the more likely the bug would materialize. 

After looking at error codes from Xcode, the issue seemed to be related to having too many URLSessions opened in parallel. What can I do to fix this? Well, DispatchSemaphore of course! 

Transit

DispatchSemaphore works by allowing certain execution cycles to go through and holding the rest until you signal its time to continue. Here’s an example of how it works, in this case I’m allowing up to 20 simultaneous queries:

 

 

let semaphoreOfImportQueries = DispatchSemaphore(value: 20) //Starting
with 20 credits.

for iteratorOfFeeds in feedImportQueries{

       //Wait reduces semaphoreOfImportQueries by
1, if it reaches 0 the execution will wait here

semaphoreOfImportQueries.wait() 

 

       self.functionThatCallsAnAPIAndExecutesAsync(completionHandler: { _ in

           //Signal allows the next process to start by adding 1 to semaphoreOfImportQueries

semaphoreOfImportQueries.signal() 

 
           

        })

}

This is a great tool to have in your toolbox when dealing with URL Sessions. Important though, this should always be executed on a background thread else you’ll block the main queue.

 

Marc

—-

 

 

 

Twitter -> @MarcMasVi     |     Micro.blog -> @MarcMV