RSSAmplifier

Blog

Damian Mehers’ blog

Swift, SwiftUI and .NET from Switzerland

damian.fyiRSS feed ↗180 posts

Latest posts

The Curious Case of the missing SwiftUI Clicks

I’m still developing my Ploze app (import your life’s history from a myriad of sources into an integrated searchable on-device timeline).

My TV tacking app, TV Next is done

Since the start of this year I’ve been working on and off on the TV Tracking app that I wanted.

ATP made me do it: Ubiquiti and Tailscale

Intro

Ploze now supports the Model Context Protocol

For the last couple of years I’ve been working on an app called Ploze that lets you import data exported from a wide variety of services (Reddit, Day One, Skype, Twitter/X, Amazon, etc.) and present them in an integrated searchable timeline - everything stays on device. It is Mac only for now.

Adding extensions to sqlite-net

sqlite is amazing and Frank Krueger as gone above-and-beyond in creating sqlite-net.

Getting, storing, and using LLM embeddings in a .NET App using sqlite

Oh no! Not yet another breathlessly gushing post about AI and LLMs … That’s right, this is not another post like that.

I gave a talk: Something is Happening with Headsets

I gave a presentation at GenTechies in Geneva, called Something is Happening with Headsets

Making .searchable text only show if you scroll a List

In my FoodPhotoLog app I want to make the content searchable, but I don’t want the search field cluttering up the UI unless the user scrolls down slightly to expose it.

Podcast appearence on Empower Apps: Voice in a Can with Damian Mehers

Great discussion with Leo Dion on his podcast talking about winding down Voice in a Can and the experience launching it and realizing its impact was more significant for some people than I first realized

Food Photo Log: Be more aware of what you eat

I’ve made an app for logging photos of what I eat.

Ploze: Your digital life unlocked

I’ve a TestFlight for a new app called Ploze that imports data from many different services and presents it all in an integrated searchable timeline.

End of life for Voice in a Can

I’m getting reports for some new users that Voice in a Can (Alexa on your Apple Watch, Vision Pro, Mac and iPhone) is showing an Amazon error Key master exception and when I look at the logs I indeed see this:

Build errors might just be warnings in disguise …

I like to build with warnings treated as errors, however sometimes this can cause unexpected headaches.

Crash using .searchable bound to viewModel and sidebar placement on macOS

On macOS 14.2.1 (23C71), xCode 15.2 (15C500b)

Bringing Alexa to the Apple Vision Pro

Voice in a Can In 2018 while on my daily train commute I started playing with the Alexa Voice Service (AVS), which provides a network API to Alexa.

Opening a photo in Apple Photos from Swift on macOS

The GitHub issue I created for myself was Tap a photo to load it in Apple Photos. It was supposed to be a 10 minute thing. One of those tasks you quickly knock off and then feel good about yourself because you’ve been so productive.

AsyncStream in the real world: wrapping an Apple Photos callback

I’ve read plenty of blog posts about Swift’s AsyncStream but never had a reason to use it to implement something myself until now. It was surprising easy.

Swift strings look identical but aren’t

I recently found myself trying to debug a most perplexing problem. Two identical strings were different. How could this be?

A virtual reality experience that’s real

I’ve been hearing a lot of hot takes about there being no compelling VR experiences, so I want to share one in which I participate each week.

XUnit build error: The FrameworkReference Microsoft.WindowsDesktop.App was not recognized

I’ve been banging my head against a wall trying to run XUnit tests on my Mac, for my Xamarin Forms app.

Detecting when a SwiftUI MenuBarExtra with window style is opened

In theory when using a SwiftUI MenuBarExtra with the window style, you should be able to use scenePhase environment variable to detect when the menu bar button is clicked, and the window is shown.

If you give a Moose an Apple Watch (unfinished)

If you give a Moose an Apple Watch, then they’ll want to use it to automate their Alexa smart-home . Which will require you to implement the Amazon Alexa Voice Service in a Swift and SwiftUI Apple Watch app . So that the moose can say things like Turn on my electric blanket when out in the wilds, and be nice and cosy by the time they tuck up in bed at the end of the day. Which will make the moose…

Rendering the Alexa Presentation Language in SwiftUI (with bonus Moose)

What if you wanted to render a dynamic UI in SwiftUI, where you knew nothing of the view hierarchy at compile time? One that was downloaded at runtime from the internet? One that could change in response to user action or server events?

From C# to Swift: some hints for those considering this path

I’m trying to convince myself that I’ve not really moved to Swift from C#, more that I’ve added Swift and SwiftUI to my repertoire, but I can feel my C# and .NET slipping away.

Moving on from Xamarin for Apple Watch apps

I’ve written several posts about using Xamarin to build Apple Watch apps, but I’m moving to Swift and SwiftUI for my watchOS apps now.

A Xamarin Stripe example

I’ve just put together a Xamarin Forms Stripe example app, based on their standard iOS and Android examples that let you browse products (Emoji), choose a shipping address and method, add and select a payment method, and purchase the product.

Ordering a list by frequency in Swift

I have a list of items that I want order by frequency, so that

Sharing tokens between iOS, macOS and watchOS app using the iCloud KeyChain

I wanted to be able to share a token between my macOS, iOS app and watchOS app so that I could login on the phone and be automatically logged in on the watch too. I wanted to save the token to the iCloud KeyChain on the phone or mac and have it automatically sync to all the other devices.

Viewing console output in iPad Swift Playgrounds

I’m learning Swift and SwiftUI, and as part of this journey I’m working my way through Donny Wals’ excellent Practical Combine: An introduction to Combine with real examples! The problem I’ve been working on my 11” iPad Pro running iPad OS 13.5.1, with the book open on one half of the screen and Swift Playgrounds on the other, and I’ve noticed that the results from calls to print in Combine…

Code snippets for Xamarin Forms XAML Platform-specifics

This post is part of Luis Matos Code Snippets’ Xamarin Month In the early days of Xamarin Forms, if you wanted to use a platform-specific feature of a page or a view, you’d have to write a custom renderer. Later came effects, which were a little less painful. But the game-changer was when Microsoft decided to build-in common platform-specific features, right into the XAML, so that you could turn…

Building and releasing a Xamarin WatchOS app to TestFlight

I’m working on my third Apple Watch app built using Xamarin. In this post I’m going to describe how I develop and what some of the issues were that I encountered when testing and uploading to the App Store for beta testing. The edit/build/run development loop I build and run and test on the WatchOS simulator when doing general development, since this is the fastest, and I can debug apps on the…

Running older versions of Xcode and Xamarin

I’m inherently optimistic. A new version of the app is available? Install it straight away! And this generally works well, I’m aware of the updates and new features and don’t get left behind. Except when it doesn’t. I’d updated to the latest version of Xcode (11.4) and updated Visual Studio for Mac and the corresponding Xamarin.iOS, and … let’s just say it did not go well: This method contains IL…

Returning HTML from an Azure Function

After spending a lot of time with AWS Lambdas, I’m exploring Azure functions. The out of the box example just returns a OkObjectResult as a IActionResult.

Tips for building Xamarin Apple Watch apps as of December 2019

I’ve been building Apple Watch apps using Xamarin for a couple of years. I love it. I get to write apps using my favorite programming language, C#, and get all the .NET goodness that comes with it. When I’ve structured my software well I’ve re-used the core code across WearOS, Tizen, and beyond. It isn’t always easy. That is largely because what Xamarin is doing isn’t easy. They track changes in…

Visual Studio for Mac: “Error updating Xcode project” opening Storyboard in xCode

I’ve been getting the error Error updating Xcode project on my Mac when trying to open a storyboard using Xcode in Visual Studio, by right-clicking the storyboard and choosing Open With|Xcode Interface Builder. Going to Help|Open Log Directory and then opening Ide.log I got a clue: WARNING [2019-11-26 18:42:18Z]: Slow command update (28ms):…

Build, Notarize, Repeat: Some tips to avoid endlessly failing to notarize your Xamarin Mac app.

As with most of my posts, this is a message to my future self who will have forgotten everything I did today, to get my Xamarin Mac app notarized. I hope it helps other people too. Apple rejected my app from the store … please include specific macOS features that the application will use and not aggregated content. I’ve no idea what it means, but I interpreted it as we like Siri and we don’t like…

Not even worth one star: Reacting constructively to App Store reviews

Instant rage I’ve done it, you’ve done it, we’ve all done it. We’ve reacted with rage to some frustrating failure in an app, and left a negative, one star review. It’s a different experience though, when you are on the receiving end of these kinds of reviews. Trying to not immediately respond to the review with that same flash of anger takes experience, detachment, and maturity. The user doesn’t…

Achieving maximum re-use: The evolution of a multi-platform app (Voice in a Can) Alexa everywhere)

Xamarin Tizen Networking: Under the covers of HTTP/2 in .NET

My current side/passion project requires the use of HTTP/2: It’s a .NET implementation of the Alexa Voice Service and I use it to drive Voice in a Can: Alexa for iOS, Apple Watch, Mac, Android, Android Wear, and … Tizen. This isn’t an advert, but I do want to set the context. The Alexa Voice Service requires the use of HTTP/2 and this is a real-world product, not an academic excercise. Why HTTP/2?…

Auto launching Xamarin Mac apps at login

I have an app, called Voice in a Can, which lets you use Alexa on your Apple Watch and iPhone. I’m working on bringing it to the Mac, and one of the things I want is that it be started at login, if the user wants this. To do this in a sandboxed app, you need to create a helper app, and bundle it inside your main app, in a specific location (/Contents/Library/LoginItems). This helper app is…

Running Xamarin Forms apps on the new Tizen 4.0 Samsung Galaxy Watch

I picked up a new Samsung Galaxy Watch (SM-R800) today, and after spending an evening on it, I managed to deploy and run a Xamarin Forms (Tizen 4.0) app on it … I just tried the default template: In case it helps someone else, these are some of the things I did. FWIW I’m using Windows running in Parallels on a Mac. Install the Tizen tools for Visual Studio, and create a new Tizen XML App (Xamarin…

Voice in a Can: Alexa on your Apple Watch

I’m looking for beta testers for an Apple Watch (and iPhone) app I’ve created that brings Alexa to your wrist. Demo and details:

Screencast: Your computer screen as an Alexa Smart Home Security Camera

This is a screencast I just put together showing how you can show your computer’s screen as an Alexa Smart Home Security Camera.

Using Siri to control your Alexa Smart Home devices

I have many Smart Home devices that can be controlled from my Amazon Echo, however none of those devices can be controlled from Siri on my Apple Watch or iPhone. None are HomeKit compatible.

Live coding a Xamarin Forms Custom Circle Control using SkiaSharp

Supports segments of varying colors, radius and degrees, and supports data binding. Resulting code in GitHub

Live coding an Alexa Smart Home skill from scratch in C#

Resulting code is here

Recording of “OS and Android and C# and Xamarin: These are a few of my favorite things”

Using Google Sign-in for iOS in Xamarin Forms to access Google APIs

This is another of those posts where I am essentially writing a message to my future self to remind myself how to do something, and in the process perhaps help out someone else. I wanted to use the Google Sign-in for iOS Xamarin Component from Xamarin Forms to let a user sign-in to Google, and then use the resulting access token to invoke one of the Google APIs, in my case the Google Tasks API.…

A more friendly Xamarin Forms DatePicker

This is a small, simple thing, to make a Xamarin Forms DatePicker more friendly. Instead of showing the date for yesterday, today and tomorrow, as it normally does, it instead shows “yesterday”, “today”, and, you guessed it, “tomorrow”: iOS: Android: The view is totally straight-forward, except that instead of just binding the Date in the DatePicker, I also bind the Format: <?xml version="1.0"…

Using the Apple Thunderbolt display with the Dell XPS 13

After many years of buying Mac laptops, I’ve bought a Dell XPS 13.