Posts

Post not yet marked as solved
13 Replies
13k Views
I'm about to release an app update with a new app icon. I've changed the icons several times to try different designs with Xcode 12.x and iOS 14 and never had any issues. Today I updated to Xcode 13 + iOS 15, and no matter what I try, the device keeps showing my previous version of the app icon. Xcode displays the new icon (e.g. under "Targets" of the project settings). The correct (new) icon is being displayed when running in simulator. In the "Devices and Simulators" window, the old/wrong icon is displayed under "Installed Apps". Things I've tried: I checked all asset catalogs etc. in my project and can confirm the old icon asset is no longer there. Clean build folder. Delete the app off the device from "Devices and Simulators". Delete the app on the device itself. Restart the iPhone whilst app is still on the device. Restart the iPhone whilst app is deleted. Restart Mac. I created a new iOS icon asset and linked that from the iPhone project settings. Increased the build number of the iPhone app. No matter what I try, the old icon keeps coming back. It seems like iOS 15 caches the icon and building and running on device from Xcode is not enough. Any ideas
Posted
by NickZ.
Last updated
.
Post marked as solved
2 Replies
2.6k Views
I have a TabView in my app. One of the tabs contains a screen with a List view. No matter what content or .listStyle I try to apply, the List messes up the tab bar: The divider line disappears immediately and then, when the user goes to a different tab, depending on that content, it either restores/fixes the tab bar, so it looks normal again, or it remains messed up in a sense that only the currently active tab icon + label are visibly in the foreground. The blurred background of the tab bar and the other icons are either invisible or too far in the background, i.e. the content of the tab screen goes in front of the tab icons. The tab bar is expected to always be above the screen contents, even if the screen uses .ignoresSafeArea(). I also tried manually setting .zIndex(1) on various views. Everything worked perfectly fine with iOS 14.x, but since upgrading to iOS 15 this weird bug appeared. Example project: import SwiftUI import MapKit struct ContentView: View { var body: some View { TabView { screen1.tabItem { Image(systemName: "1.square.fill") Text("Tab 1") } .tag(1) .navigationViewStyle(StackNavigationViewStyle()) screen2.tabItem { Image(systemName: "2.square.fill") Text("Tab 2") }.tag(2) screen3.tabItem { Image(systemName: "3.square.fill") Text("Tab 3") }.tag(3) } } var screen1: some View { ScrollView { VStack { ForEach(1..<80) { index in Text("Line \(index)") } } .frame(maxWidth: .infinity) } } @State private var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 0, longitude: 0), span: MKCoordinateSpan(latitudeDelta: 1, longitudeDelta: 1)) var screen2: some View { Map(coordinateRegion: $region) .ignoresSafeArea() } var screen3: some View { List { Text("List Item") } } }
Posted
by NickZ.
Last updated
.
Post not yet marked as solved
1 Replies
1.5k Views
I've integrated a map view into my app (now using iOS 15). In one particular area I'm getting these kinds of errors in the console of Xcode: 2021-09-29 17:46:16.330607+0100 […] [VKDefault] Building failed to triangulate! Wrapped around the polygon without finishing... :-( List has 66 nodes: 144 [...abbreviated...] 2  2021-09-29 17:46:16.331588+0100 […] [VKDefault] Building failed to triangulate! 2021-09-29 17:46:16.493476+0100 […] [ResourceLoading] Failed to load key: 1385568764.285346958 t:35 kt:0 type: 35, -7: GEOErrorDomain I came across this only because rendering of a static map image using MKMapSnapshotter of that location at a certain zoom level keeps failing without an error all the time, i.e. the completion handler is never called, not even with an error. If I change the snapshot region or use a wider span I have no issues. For privacy I won't share the affected location here in the forum. Any ideas? Is this some kind of unhandled error with problematic map data from Apple?
Posted
by NickZ.
Last updated
.
Post not yet marked as solved
1 Replies
616 Views
I'm currently experimenting with MapKit JS version 5.61.1. I initialise a map with the option pointOfInterestFilter, but no matter what I set (including, excluding), it has no effect and all the default POIs will always show. Example (abbreviated): js const map = new mapkit.Map(…, { region: region, pointOfInterestFilter: mapkit.PointOfInterestFilter.including([ mapkit.PointOfInterestCategory.ATM ]), }); I would expect only to see ATMs on the map, but it shows just everything. Manually inspecting map.pointOfInterestFilter._includes indicates, that the setting was set successfully as it shows an array ["ATM"]. By the way, I also noticed that the documentation - https://developer.apple.com/documentation/mapkitjs/mapkit/pointofinterestfilter says there should be the constants mapkit.PointOfInterestFilter.filterIncludingAllCategories and mapkit.PointOfInterestFilter.filterExcludingAllCategories, but they don't appear to be present. Thank you for any tips!
Posted
by NickZ.
Last updated
.
Post not yet marked as solved
5 Replies
1.9k Views
Summary: First of all, I feel fairly confident that there is a bug related to removing annotations from a map that are displayed using MKAnnotationView. Secondly, this leads me to the question of how to use the collisionMode property in order to auto-hide overlapping annotation views. Surely, this property is not exclusively made for MKMarkerAnnotationView?! I have created a screen recording video that visualises the issue, but I won't post the link here. Please feel free to ask. Here’s my problem: I want to have a map that can switch between two states: either display a certain set of annotations as regular balloon shaped MKMarkerAnnotationView markers on a map, or display a different set of annotations as MKAnnotationView (either a custom subclass with some drawing or the default class with an image property; it doesn't make a difference). So far so good, but one observation so far, that I don't understand: MKMarkerAnnotationView have the ability to auto-hide themselves when they get too close to another annotation view that has its collisionMode - https://developer.apple.com/documentation/mapkit/mkannotationview/2873315-collisionmode property not set to .none. How is this achieved? Does the MKMapView do this or is a MKMarkerAnnotationView aware of its surroundings (I don’t think so)? I can't find a way to create the same effect for any other kind of annotation view (MKAnnotationView), they would always overlap. The bug: When my app is in said state where it displays annotations as MKAnnotationView (e.g. an image) and I switch back to display MKMarkerAnnotationView the map appears to retain ”ghost“ collision frames (or something) on the map of all MKAnnotationViews that are supposed to be removed. Those invisible collision areas will remain statically on the map view even when the user moves the map region around. This means, wherever there had been an MKAnnotationView on the screen just before the related annotations were removed, the now displayed MKMarkerAnnotationView markers will auto-hide when they come close to those areas even if there is nothing in the way. To be clear, I call mapView.removeAnnotations(annotations) to remove all annotations and I double-checked in debugging that no more annotations are on the mapView, yet somewhere, somehow internally the mapView seems to retain the collision areas/frames in absolute point coordinates relative to the view on screen (not to earth coordinates) as they don't move with further map movement. Is there anything else I have to do after calling mapView.removeAnnotations to properly clear the map view? This happens in the simulator and on device with iOS 14.2, iOS 13, but it does not happen in the simulator with iOS 12. Additionally, I can confirm that when I set the collisionMode property of the MKAnnotationViews to .none (supported in iOS 14 only), this issue does not occur (pretty much as expected). The whole auto-hiding and collision stuff is a bit of a mystery to me and I could find little about it in the documentation. Any help would be much appreciated! Thanks!
Posted
by NickZ.
Last updated
.