Here’s a quick tip on how to open a URL in the background or foreground depending on a user-set preference. if(openInBackgroundPreferenceSet == true){ NSWorkspace.shared.open([linkToOpen], withAppBundleIdentifier: nil, options: NSWorkspace.LaunchOptions.withoutActivation, additionalEventParamDescriptor: nil, launchIdentifiers: nil) }else{ NSWorkspace.shared.open(linkToOpen) } Questions / comments? I’m at @MarcMasVi …
Author Archives: mmv
How far ahead of Apple Maps is Google Maps?
Extremely good article explaining why Google Maps is ahead on many areas ahead of Apple maps. Worth your time: link Marc
Denarius 1.6 & the slippery bug
This last couple of months I’ve been hard at work on two new projects, the first of which will be released fairly soon! But, today I wanted to write about something else: CoreData Concurrency. Since the release of Denarius about a year ago I’ve been regularly improving the personal finance app with new features and, …
“MP3 is dead” missed the story, great article from Arment
Great article from Marco Arment on the news about the “death” of the MP3 format. Worth a read: https://marco.org/2017/05/15/mp3-isnt-dead Marc
Shoe Dog: A Memoir by the Creator of Nike
Just finished “Shoe Dog: A Memoir by the Creator of Nike” and it’s great: well written and refreshingly honest. Even if you’re not into business books, I believe this one is worth your time. Bill Gates could not have said it better in his book review: “Shoe Dog, Phil Knight’s memoir about creating Nike, is a …
Continue reading “Shoe Dog: A Memoir by the Creator of Nike”
Get Date Day, Month or Year in Swift 3.0
Just a quick update to show how to get Date Day, Month or Year in Swift 3 //Here I’m creating the calendar instance that we will operate with: let calendar = NSCalendar.init(calendarIdentifier: NSCalendar.Identifier.gregorian) //Now asking the calendar what month are we in today’s date: let currentMonthInt = (calendar?.component(NSCalendar.Unit.month, from: Date()))! //Now …
Blogging about developing an app: Denarius
Roughly two years ago I started blogging about the challenges of developing a new Mac app. I decided to do so after reading Brent Simmons great series on Vesper development. I thought it was a great way to 1. structure my thoughts and 2. help the community. It’s been one of the most fun times I’ve …
Continue reading “Blogging about developing an app: Denarius”
Simple Animations on macOS (Swift 3)
If you’ve ever coded for iOS you’ll most likely be familiar with the UIView animateWithDuration function. Wouldn’t it be great if there would be an OSX equivalent? Well, there sure is, just type the following: NSAnimationContext.runAnimationGroup({_in //Indicate the duration of the animation …
Synchronizing Main and Background Core Data Threads (Swift 3)
Let’s say we have two different managedObjectContext (with one persistentStoreCoordinator). The first one is used across the app for most quick fetches: var mainManagedObjectContext = NSManagedObjectContext(concurrencyType: NSManagedObjectContextConcurrencyType.mainQueueConcurrencyType) mainManagedObjectContext.persistentStoreCoordinator = coordinator And the second, running in the background, for the queries that take a long time: var backgroundManagedObjectContext = NSManagedObjectContext(concurrencyType: …
Continue reading “Synchronizing Main and Background Core Data Threads (Swift 3)”
Are we (NSViewController view) the First Responder?
In some cases a class may want to know if it’s the first responder before triggering an action. For instance if several loaded View Controller classes are listening for the same notification, how can they know which one should trigger the action? Well… they should ask their view. In this case a NSTableView class is …
Continue reading “Are we (NSViewController view) the First Responder?”