Text Fields in Lists on macOS SwiftUI

Today’s post is a bug report. I’ve sent a developer feed back to Apple already but got no response yet. I don’t know exactly when Apple introduced this bug. But it may well be with the first release of macOS Ventura (13.0) and it’s still not fixed as of macOS 13.4.1.

At that time I’ve noticed that the text fields of one of my macOS Apps got an unintended left padding when included in a List. Here is a very simple test code to demonstrate the problem:

Weiterlesen

Missing Tiles in MKTileOverlayRenderer

Well, there is a bug in Apple’s MapKit since iOS 13.2, as the folks in developer community say: If you want to use non-Apple maps (e.g. OpenStreetMap®) occasionally tiles are not rendered although you supply the correct data in your sub-class of MKTileOverlayRenderer. There seems to be no obvious systematic but if you scroll around the map you’ll soon find missing tiles. There seems to be no real fix for that problem and your app will not be notified if that happens; the delegate method mapViewDidFinishRenderingMap(mapView:fullyRendered:) will always signal „fullyRendered“ although tiles may be missing. Weiterlesen

SwiftUI and the Problems of Timing

Well, SwiftUI is certainly a big improvement on building maintainable, robust and nice user interfaces on iOS and macOS compared to the old MVC architecture (Massive View Controller) and the NIB (Next Interface Builder). But it is mainly a declarative framework and from the application developer’s point of view it’s sometimes hard to anticipate what is really going on behind the scenes and especially when its going to happen. There are situations where the promised behaviour doesn’t take place and I’ve already struggled hours for hours to look for a workaround.

Especially the .onAppear modifier seems to be problematic. It looks as if the supplied closure will be executed too early sometimes and the statements inside do not have the desired effect.

Weiterlesen

MapKit: Change in Behaviour of addOverlay on iOS 16 / Xcode 14.0

Just after I have published my latest app project „Muvy“, a very nice tracking app for all outdoor activities, Apple released iOS 16 and Xcode 14.0. With big horror I had to notice that my app was not working properly with the new version of the operating system. All non-Apple maps were covering my tracks so that they were not visible anymore. What a pity. It turns out that Apple changed the behaviour of the quite central method addOverlay without notice.

Weiterlesen